lod_int: Calculate LOD support intervals

View source: R/lod_int.R

lod_intR Documentation

Calculate LOD support intervals

Description

Calculate LOD support intervals for a single LOD curve on a single chromosome, with the ability to identify intervals for multiple LOD peaks.

Usage

lod_int(
  scan1_output,
  map,
  chr = NULL,
  lodcolumn = 1,
  threshold = 0,
  peakdrop = Inf,
  drop = 1.5,
  expand2markers = TRUE
)

Arguments

scan1_output

An object of class "scan1" as returned by scan1().

map

A list of vectors of marker positions, as produced by insert_pseudomarkers().

chr

Chromosome ID to consider (must be a single value).

lodcolumn

LOD score column to consider (must be a single value).

threshold

Minimum LOD score for a peak.

peakdrop

Amount that the LOD score must drop between peaks, if multiple peaks are to be defined on a chromosome.

drop

Amount to drop in the support interval. Must be \le peakdrop

expand2markers

If TRUE, QTL intervals are expanded so that their endpoints are at genetic markers.

Details

We identify a set of peaks defined as local maxima that exceed the specified threshold, with the requirement that the LOD score must have dropped by at least peakdrop below the lowest of any two adjacent peaks.

At a given peak, if there are ties, with multiple positions jointly achieving the maximum LOD score, we take the average of these positions as the location of the peak.

The default is to use threshold=0, peakdrop=Inf, and drop=1.5. We then return results a single peak, no matter the maximum LOD score, and give a 1.5-LOD support interval.

Value

A matrix with three columns:

  • ci_lo - lower bound of interval

  • pos - peak position

  • ci_hi - upper bound of interval

Each row corresponds to a different peak.

See Also

bayes_int(), find_peaks(), scan1()

Examples

# read data
iron <- read_cross2(system.file("extdata", "iron.zip", package="qtl2"))


# insert pseudomarkers into map
map <- insert_pseudomarkers(iron$gmap, step=1)

# calculate genotype probabilities
probs <- calc_genoprob(iron, map, error_prob=0.002)

# grab phenotypes and covariates; ensure that covariates have names attribute
pheno <- iron$pheno
covar <- match(iron$covar$sex, c("f", "m")) # make numeric
names(covar) <- rownames(iron$covar)
Xcovar <- get_x_covar(iron)

# perform genome scan
out <- scan1(probs, pheno, addcovar=covar, Xcovar=Xcovar)

# 1.5-LOD support interval for QTL on chr 7, first phenotype
lod_int(out, map, chr=7, lodcolum=1)

qtl2 documentation built on May 29, 2024, 11:46 a.m.