---
title: "Outcrossing Populations"
author: "[Statistical Genetics Lab](http://statgen.esalq.usp.br) <br/> Department of Genetics <br/> Luiz de Queiroz College of Agriculture <br/> University of São Paulo"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Outcrossing Populations}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r knitr_init, echo=FALSE, cache=FALSE, message=FALSE}
knitr::opts_chunk$set(collapse = TRUE,
                      comment = "#>",
                      fig.width = 6,
                      fig.height = 6,
                      fig.align = "center",
                      dev = "png",
                      dpi = 36,
                      cache = TRUE)
```

```{r, echo=FALSE, results='hide', message=FALSE, cache.comments=FALSE, warning=FALSE}
library(onemap)
```

**[Access the complete version of this vignette here](https://cristianetaniguti.github.io/onemap/Outcrossing_Populations.html)**

To have access to all example datasets. Install `onemap` from GitHub and run the following command:

```{r, eval=FALSE}
#install.packages("devtools") ## if you do not have it installed
devtools::install_github("cristianetaniguti/onemap")
```

The following example is intended to show the usage of `OneMap`
functions for linkage mapping in outcrossing (non-inbred) populations.
With basic knowledge of R syntax, one should have no problems using
it. If you are not familiar with R, we recommend reading the vignette
[Introduction to R](https://statgen-esalq.github.io/tutorials/onemap/Introduction_R.html).

Hopefully, these examples will be clear enough to help any user to
understand its functionality and start using it. You do not need to be
an expert in R to build your linkage map, but some concepts are
necessary and will help you through the process.

The software has been available on CRAN since 2007 
([OneMap on CRAN](https://cran.r-project.org/package=onemap)) and has 
undergone several updates, adding new features and optimization up to version 3.2.0 in 2024. 
Future updates will focus solely on maintaining accessibility and functionality. 
**New feature development and optimization efforts are now being directed toward the 
[MAPpoly](https://github.com/mmollina/MAPpoly) and 
[MAPpoly2](https://github.com/mmollina/mappoly2) packages**.  

**MAPpoly** is a more robust package designed for constructing linkage maps
 in polyploid species. Its optimized algorithms also provide improved efficiency for 
diploid species compared to OneMap. Therefore, we recommend using MAPpoly instead 
of OneMap in the following scenarios for diploid species:  

- When working with only biallelic markers (e.g., SNPs).  
- For outcrossing full-sib (F1), F2, or backcross populations.  
- For datasets with a large number of markers (>5,000).  
- For multi-population datasets (e.g., progeny from multiple parents; see MAPpoly2).  

However, **OneMap** remains the best choice if you have:  

- Populations derived from recombinant inbred lines (RILs).  
- Datasets with multiallelic or dominant markers.  

For guidance on best practices in building linkage maps while accounting for genotyping 
errors, please refer to Taniguti et. al 2023.  