createF1Hybrids: Create F1 hybrids from two populations

View source: R/simulate_data.R

createF1HybridsR Documentation

Create F1 hybrids from two populations

Description

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'.

Usage

createF1Hybrids(x, pop1, pop2, newName, n = 50, missingGenos = TRUE)

Arguments

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

Value

an EFGLdata object with all the populations in 'x', plus the new simulated hybrid population


delomast/EFGLmh documentation built on June 1, 2024, 6:55 a.m.