View source: R/tidy_recomb_map_inds.R
tidy_recomb_map_inds | R Documentation |
This function takes a compact structure of nested lists and tables describing the founder blocks of identity by descent (IBD) inherited in a pedigree with recombination, and outputs the same data organized as a single table following tidy conventions, which is easy to manipulate externally although it is also larger and more redundant.
tidy_recomb_map_inds(inds)
inds |
The output value from |
A table with one row per IBD block, and the following columns: "ind" containing the label of the individual as given in the input object, "parent" equal to either "pat" or "mat", "chr" the chromosome, "start" and "end" the range of the block in basepairs, and "anc" the label of the founder individual.
recomb_map_inds()
# simulate the ancestors of one person to 3 generations
obj <- fam_ancestors( 3 )
fam <- obj$fam
ids <- obj$ids
# initialize founders
founders <- recomb_init_founders( ids[[ 1 ]], recomb_map_hg38 )
# draw recombination breaks along pedigree, with coordinates in genetic distance (centiMorgans),
# with information for last generation only
inds <- recomb_last_gen( founders, fam, ids )
# map recombination break coordinates to base pairs
inds <- recomb_map_inds( inds, recomb_map_hg38 )
# now that the input structure is ready, this function returns a tidy table version!
inds_tidy <- tidy_recomb_map_inds( inds )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.