genedrop: Function to perform gene-dropping

View source: R/gene_dropping_functions.R

genedropR Documentation

Function to perform gene-dropping

Description

This function carries out gene-dropping down a provided pedigree

Usage

genedrop(
  pedigree,
  map_dist,
  chr_loci_num,
  found_hap,
  to_raw = TRUE,
  sample_hap = TRUE,
  recom_freq = "kosambi",
  progress = TRUE
)

Arguments

pedigree

A dataframe or matrix. A pedigree containing 'ID', 'Sire' and 'Dam' columns

map_dist

A vector of map distances in cM. The vector should be the same length as the total number of loci in chr_loci_num. Each value should be the difference in cM between the two markers, such that the first value in the vector is the difference between marker 1 and marker 2. The final value in the vector is therefore redundant but should be included (e.g. as 0). Alternatively can be set to NULL if recombination frequencies are provided using recom_freq.

chr_loci_num

A vector containing the number of loci on each chromosome

found_hap

A vector of founder haplotypes, if sample_hap=FALSE the pair of haplotypes for each individual should in the same order as in the provided pedigree

to_raw

logical TRUE or FALSE. If TRUE the genotypes is stored are raw vectors. This allows quicker gene-dropping and reduces the size of the output. It must be FALSE if alleles do not all have numeric values between 0 and 255

sample_hap

logical TRUE or FALSE. If TRUE founder haplotypes are assigned to founders at random. If FALSE pairs of haplotypes are assigned to founders in the order they appear in the pedigree. When FALSE the number of haplotypes in found_hap must be twice the numeber of founders present in the pedigree

recom_freq

'kosambi' is default, this setting calculates recombination frequencies based using the map distances provided in map_dist. Alternatively a vector of the recombination frequencies between each marker can be provided. The vector should be the same length as the total number of loci in chr_loci_num The first value in the vector should be the recombination frequency between markers 1 and 2. The final value in the vector is therefore redundant but should be included (e.g. as 0. Values between chromosomes are best set to 0.5 although this happens automatically during gene-dropping.

progress

logical, default TRUE. Determines in progress should be displayed will gene-dropping


simplydch/GeneDrop documentation built on July 8, 2024, 8:17 p.m.