Learn R Programming

mappoly (version 0.3.3)

poly_cross_simulate: Simulate an autopolyploid full-sib population

Description

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

Usage

poly_cross_simulate(
  ploidy,
  rf.vec,
  n.mrk,
  n.ind,
  hom.allele,
  draw = FALSE,
  file = "output.pdf",
  seed = NULL,
  width = 12,
  height = 6,
  prob.P = NULL,
  prob.Q = NULL
)

Value

an object of class mappoly.data. See

read_geno for more information

Arguments

ploidy

ploidy level. Must be an even number

rf.vec

vector containing the recombination fractions between adjacent markers. If a single recombination fraction is provided, it is repeated \(n.mrk-1\) times

n.mrk

number of markers

n.ind

number of individuals in the offspring

hom.allele

a list containing the linkage phase information for both parents

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

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)

Author

Marcelo Mollinari, mmollin@ncsu.edu

Details

hom.allele.p and hom.allele.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

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_. tools:::Rd_expr_doi("10.1534/g3.119.400378")

Examples

Run this code
    h.temp <- sim_homologous(ploidy = 6, n.mrk = 20, max.d = 3, max.ph = 3, seed = 123)
    fake.poly.dat <- poly_cross_simulate(ploidy = 6, rf.vec = .05, n.mrk = 20,
                                  n.ind = 200, h.temp, seed = 123)
    plot(fake.poly.dat)
                                   
                                  

Run the code above in your browser using DataLab