View source: R/simulate_data.R
createF1Hybrids | R Documentation |
Creates hybrids by sampling one allele from one pop and the other allele from the other pop based on observed allele frequencies. Missing genotypes are sampled based on the combined rate of missing genotypes or data can be simulated wiht no missing genotypes. Alleles at different loci are sampled independently. Note that if a sex marker exists in the data set, it is treated like any other marker, resulting in XX, XY, and YY genotypes in the hybrids. You may want to remove it prior to simulation using the 'removeLoci' function. Loci with all missing genotypes in one population are simulated to have all missing genotypes in the hybrids REGARDLESS of the input value for 'missingGenos'.
createF1Hybrids(x, pop1, pop2, newName, n = 50, missingGenos = TRUE)
x |
an EFGLdata object |
pop1 |
one parent population (must be in 'x') |
pop2 |
the other parent population (must be in 'x') |
newName |
a string giving the name of the population to put hybrids into. This MUST be a new pop. |
n |
the number of hybrids to simulate |
missingGenos |
TRUE to simulate missing genotypes, FALSE to not |
an EFGLdata object with all the populations in 'x', plus the new simulated hybrid population
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.