sim_mpp_cross: Simulate MPP crosses population

View source: R/sim_mpp_cross.R

sim_mpp_crossR Documentation

Simulate MPP crosses population

Description

The function simulates a multi-parent population composed of N F2 crosses. It uses the genotypes data provided in the argument geno_par. The cross scheme is specified in the argument cross_scheme. The functions call function from the simcross package (Broman, 2019)

Usage

sim_mpp_cross(geno_par, map, cross_scheme, n_ind_cr = NULL)

Arguments

geno_par

Character genotype marker matrix of the parents used for the simulation. The allele must be coded with one letter per allele. For example, AA, CC, GG, etc. The rownames must specify the parent identifiers used in the crossing scheme (cross_scheme).

map

Data.frame. Correspondig three columns genetic map (marker, chr, pos in cM).

cross_scheme

Three column marker matrix specifying: the cross indicator, the first parent (male), and the second parent (female). The parents identifiers must be the same as the rownames of geno_par.

n_ind_cr

numeric vector indicating the number of simulated genotype per cross. by default 100 genotypes per cross.

Value

List with genotype marker matrices of all simulated crosses in different format:

Author(s)

Vincent Garin

References

Karl W. Broman (2019) R/simcross: an R package for simulating and plotting general experimental crosses. https://github.com/kbroman/simcross

Examples


data("geno_par")
rownames(geno_par) <- paste0('P', 1:nrow(geno_par))

data("EUNAM_map")
rownames(map) <- map[, 1]

# NAM crossing scheme with 9 parents
cross_scheme <- cross_scheme_NAM(9)

geno <- sim_mpp_cross(geno_par = geno_par, map = map,
                     cross_scheme = cross_scheme,
                     n_ind_cr = rep(100, nrow(cross_scheme)))



vincentgarin/mppSim documentation built on Oct. 11, 2024, 3:18 p.m.