collapse_do_alleles: Collapse alleles for simulated DO genotypes

View source: R/collapse_do_alleles.R

collapse_do_allelesR Documentation

Collapse alleles for simulated DO genotypes

Description

When simulating Diversity Outbreds, we need to specify parents 1-16, with 9-16 being the males from strains 1-8. This function collapses replaces alleles 9-16 with 1-8, to make the result ordinary DO-type data.

Usage

collapse_do_alleles(xodata)

Arguments

xodata

The sort of detailed genotype/crossover data generated by sim_from_pedigree().

Value

The input object, with alleles 9-16 replaced by 1-8.

See Also

sim_do_pedigree(), sim_do_pedigree_fix_n(), sim_from_pedigree()

Examples

# simulate DO pedigree
tab <- sim_do_pedigree(8)

# simulate genotypes for that pedigree
dat <- sim_from_pedigree(tab)
# collapse to alleles 1-8
dat <- collapse_do_alleles(dat)

# also works with data on multiple chromosomes
dat <- sim_from_pedigree(tab, c("1"=100, "2"=75, "X"=100), xchr="X")
dat <- collapse_do_alleles(dat)

simcross documentation built on May 29, 2024, 2:41 a.m.