sim_homologous: Simulate homology groups

View source: R/sim_homologous.R

sim_homologousR Documentation

Simulate homology groups

Description

Simulate two homology groups (one for each parent) and their linkage phase configuration.

Usage

sim_homologous(
  ploidy,
  n.mrk,
  min.d = 0,
  max.d = ploidy + 1,
  prob.dose = NULL,
  max.ph,
  restriction = TRUE,
  seed = NULL
)

Arguments

ploidy

ploidy level. Must be an even number

n.mrk

number of markers

min.d

minimum dosage to be simulated (default = 0)

max.d

maximum dosage to be simulated (default = ploidy + 1)

prob.dose

a vector indicating the proportion of markers for different dosage to be simulated (default = NULL)

max.ph

maximum phase difference

restriction

if TRUE (default), avoid cases where it is impossible to estimate recombination fraction and/or linkage phases via two-point analysis

seed

random number generator seed

Details

This function prevents the simulation of linkage phase configurations which are impossible to estimate via two point methods

Value

a list containing the following components:

hom.allele.p

a list 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

p

contains the indices of the starting positions of the dosages, considering that the vectors contained in p are concatenated. Markers with no doses (zero doses are also considered)

hom.allele.q

Analogously to hom.allele.p

q

Analogously to p

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_. doi: 10.1534/g3.119.400378

Examples

    h.temp <- sim_homologous(ploidy = 6, n.mrk = 20, max.d = 3, max.ph = 3,
                           seed = 123)


mappoly documentation built on Jan. 6, 2023, 1:16 a.m.