cross_simulate: Simulate an autopolyploid full-sib population

View source: R/cross_simulate.R

cross_simulateR Documentation

Simulate an autopolyploid full-sib population

Description

Simulate an autopolyploid full-sib population with one or two informative parents under random chromosome segregation.

Usage

cross_simulate(
  parental.phases,
  map.length,
  n.ind,
  draw = FALSE,
  file = "output.pdf",
  prefix = NULL,
  seed = NULL,
  width = 12,
  height = 6,
  prob.P = NULL,
  prob.Q = NULL
)

Arguments

parental.phases

a list containing the linkage phase information for both parents

map.length

the map length

n.ind

number of individuals in the offspring

draw

if TRUE, draws a graphical representation of the parental map, including the linkage phase configuration, in a pdf output (default = FALSE)

file

name of the output file. It is ignored if draw = TRUE

prefix

prefix used in all marker names.

seed

random number generator seed (default = NULL)

width

the width of the graphics region in inches (default = 12)

height

the height of the graphics region in inches (default = 6)

prob.P

a vector indicating the proportion of preferential pairing in parent P (currently ignored)

prob.Q

a vector indicating the proportion of preferential pairing in parent Q (currently ignored)

Details

parental.phases.p and parental.phases.q are lists of vectors containing linkage phase configurations. Each vector contains the numbers of the homologous chromosomes in which the alleles are located. For instance, a vector containing (1,3,4) means that the marker has three doses located in the chromosomes 1, 3 and 4. For zero doses, use 0. For more sophisticated simulations, we strongly recommend using PedigreeSim V2.0 https://github.com/PBR/pedigreeSim

Value

an object of class mappoly.data. See read_geno for more information

Author(s)

Marcelo Mollinari, mmollin@ncsu.edu

References

Mollinari, M., and Garcia, A. A. F. (2019) Linkage analysis and haplotype phasing in experimental autopolyploid populations with high ploidy level using hidden Markov models, _G3: Genes, Genomes, Genetics_. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1534/g3.119.400378")}

Examples

    h.temp <- sim_homologous(ploidy = 6, n.mrk = 20)
    fake.poly.dat <- cross_simulate(h.temp, map.length = 100, n.ind = 200)
    plot(fake.poly.dat)
                                   
                                  

mmollina/MAPPoly documentation built on March 8, 2024, 2:04 a.m.