faster_IBD: Extremely fast estimation of identity-by-descent (IBD)...

View source: R/calc_IBD.R

faster_IBDR Documentation

Extremely fast estimation of identity-by-descent (IBD) probabilities.

Description

The method of "quick-and-dirty" IBD estimation was originally developed by Bourke (2014) for tetraploid data only, and was subsequently generalised by van Geest et al. (2017). Can be useful for a first quick analysis, particularly in large hexaploid datasets. However, the higher accuracy of IBD probabilities generated by hmm_IBD makes that function the preferred choice.

Usage

faster_IBD(
  phased_maplist,
  dosage_matrix,
  map_function = "haldane",
  ploidy,
  ploidy2 = NULL,
  fix_threshold = 0.1,
  factor_dist = 1,
  ncores = 1,
  p1name = "P1",
  p2name = "P2",
  method.exp = "simple",
  double_reduction = T
)

Arguments

phased_maplist

A list of linkage maps calculated by polymapR::create_phased_maplist

dosage_matrix

An integer matrix with markers in rows and individuals in columns

map_function

The mapping function to calculate recombination frequency based on map distance (haldane or kosambi)

ploidy

Ploidy level of parents or of the first parent

ploidy2

Ploidy level of the second parent. By default NULL, if parents have equal ploidy levels.

fix_threshold

The threshold to fix the IBD probabilities while correcting for the sum of probabilities.

factor_dist

Factor to increase or decrease the recombination frequencies as calculated from the map distances.

ncores

Number of cores to use for multi-core processing.

p1name

Name of parent 1 in the column names of dosage_matrix

p2name

Name of parent 2 in the column names of dosage_matrix

method.exp

Model to use for probability expansion. Either "simple" or "interval"

Value

A nested list (with the same length as phased_maplist). Each list element contains the following items:

IBDtype

Always "haplotypeIBD" for the output of this function

IBDarray

An array of IBD probabilities. The dimensions of the array are: markers, homologues and individuals.

map

Integrated linkage map positions of markers used in IBD calculation

parental_phase

The parental marker phasing, coded in 1 and 0's

biv_dec

NULL

gap

The gap size used in IBD interpolation, by default NULL. See spline_IBD

genocodes

NULL

pairing

NULL

ploidy

ploidy of parent 1

ploidy2

ploidy of parent 2

method

The method used, here "heur" (heuristic)

error

The error prior used, not relevant here thus NULL

References

Bourke P.M. (2014) QTL analysis in polyploids: Model testing and power calculations. Wageningen University (MSc thesis)

Examples

data("phased_maplist.4x","SNP_dosages.4x")
IBD_list.4x <- fast_IBD(phased_maplist = phased_maplist.4x,
                        dosage_matrix = SNP_dosages.4x,
                        ploidy = 4)

Alethere/SmoothDescent documentation built on April 5, 2022, 5:36 a.m.