cash-computeMap: BC, FS and IC method: Compute ordered linkage maps

$computeMapR Documentation

BC, FS and IC method: Compute ordered linkage maps

Description

Method for inferring parental phase (e.g., ordered parental genotype pair (OPGP)) and estimating recombination fractions in full-sib families.

Usage

BCobj$computeMap(chrom = NULL, init_r = 0.01, ep = 0.001, method = NULL, err = TRUE,
                 multiErr = FALSE, mapped = TRUE, nThreads = 1, inferOPGP = TRUE, rfthres = 0.1)
FSobj$computeMap(chrom = NULL, init_r = 0.01, ep = 0.001, method = NULL, sexSpec = FALSE, err = TRUE,
                 multiErr = FALSE, mapped = TRUE, nThreads = 1, inferOPGP = TRUE, rfthres = 0.1)
ICobj$computeMap(chrom = NULL, init_r = 0.01, ep = 0.001, method = "EM", err = TRUE, 
                 multiErr = FALSE, mapped = TRUE, nThreads = 1, inferOPGP = TRUE, rfthres = 0.1)

Arguments

init_r

A numeric value giving the initial values for the recombination fractions. Each recombination fraction parameter is set to the same initial value.

ep

A numeric value giving the initial value for the sequencing error parameter.

sexSpec

Logical value. If TRUE, sex-specific recombination fractions are are estimated.

multiErr

Locical value. If TRUE, a separate sequencing error rate is used for each SNP, otherwise a common error rate is used for each SNP.

method

A character string specifying whether optimization should be performed using direct maximization (optim) or via the Expectation-Maximum (EM) algorithm (EM).

nThreads

An integer value giving the number of threads to use in computing the likelihood in parallel.

chrom

A integer vector giving the indices of the chromosomes (or linkage groups) to be computed.

err

Locical value. If TRUE, the sequencing error parameter is estimated. Otherwise, the sequenicng error parameter is fixed to the value of the ep argument.

mapped

Locial value. If TRUE, the maps are computed using the marker order given in the combined linkage groups. Otherwise, the maps are computed using the original marker order given by the genomic assembly.

inferOPGP

Logical value. If inferOPGP=TRUE then the OPGPs will always be inferred, otherwise the OPGPs will only be inferred if required.

rfthres

Numeric value. Print output highlighting SNP pairs with high recombination fraction estimates. Helpfully for identifying potentially probmatic SNPs.

Details

This function infers the parental phase (or ordered parental genotype pair (OPGP)) and estimates adjacent recombination fractions using the hidden Markov model (HMM) approach as described in \insertCitebilton2018genetics1;textualGUSMap.

The optimization of the likelihood for the HMM is performed using either the Expectation-Maximumization (EM) algorithm (method="EM"), direct numeric optimization via the optim function (method="optim"), or using 20 iterations of the EM algorithm followed by optimization via direct numeric optimization (method=NULL). The likelihood computations (and computation of derivatives if required) are scaled using forward and backward recursion to avoid overflow issues and are performed in C. These computations are also parallelization via the OpenMP package, where the argument nThreads specifies how many threads to use. Be careful not to set nThreads to more than the number of threads available on your computer (or bad things will happen). In addition, if the package is complied without OpenMP, then this parallelization has no effect and the likelihood is computed in serial.

If mapped = TRUE, then combined linkage groups must have been formed from the $addBIsnps function first (and preferably ordered from the $orderLG function).

Author(s)

Timothy P. Bilton and Chris Scott

References

\insertRef

bilton2018genetics1GUSMap

See Also

BC, FS, IC

Examples

#### Case 1: Compute linkage map from linkage groups
## Simulate some sequencing data
set.seed(6745)
config <- list(list(sample(c(1,2,4), size=30, replace=TRUE)))
F1data <- simFS(0.01, config=config, meanDepth=10, nInd=50, epsilon=0.005)
## Compute 2-point recombination fractions
F1data$rf_2pt(nClust=1)
## create and order linkage groups
F1data$createLG()
F1data$addBIsnps()
F1data$orderLG(ndim=5)

## Compute the linkage map
F1data$computeMap()

#### Case 2: Compute map using original assembly order
F1data$computeMap(mapped = FALSE)

tpbilton/GUSMap documentation built on Feb. 22, 2025, 12:27 p.m.