simulate_linked_genotypes: simulate genotype-pairs from linked markers using Mendel

Description Usage Arguments Value

View source: R/mendel-interface.R

Description

This is the main function to use. Pass it a data frame of markers (indexed in order) and it will pass them off to Mendel, drop the genes, do genotyping error and then return a list of vectors which hold the genotype index that you can use to subscript the joint probability vectors with. This function assumes that the loci in df are ordered appropriately (i.e have been run through reindex_markers()) and that the components in C are named Chrom.Locus.Pos, as is typical. Obviously the C list should corresponds exactly to the markers/alleles in df.

Usage

1

Arguments

df

A data frame of markers with the columns Chrom, Locus, Pos, Allele, LocIdx, AlleIdx, and Freq. This should have been run through reindex_markers().

ped

The pedigree to be simulating from

Value

A wide-format tibble of genotypes. Each genotype occupies one column with the index of each allele separated by a slash, like: "1/2" or "1/1".


eriqande/gdropR documentation built on Feb. 25, 2021, 2:59 p.m.