bayes_int  R Documentation 
Calculate Bayes credible intervals for a single LOD curve on a single chromosome, with the ability to identify intervals for multiple LOD peaks.
bayes_int(
scan1_output,
map,
chr = NULL,
lodcolumn = 1,
threshold = 0,
peakdrop = Inf,
prob = 0.95,
expand2markers = TRUE
)
scan1_output 
An object of class 
map 
A list of vectors of marker positions, as produced by

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. 
prob 
Nominal coverage for the interval. 
expand2markers 
If TRUE, QTL intervals are expanded so that their endpoints are at genetic markers. 
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
prob=0.95
. We then return results a single peak, no matter the
maximum LOD score, and give a 95% Bayes credible interval.
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.
lod_int()
, find_peaks()
, scan1()
# 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)
# 95% Bayes credible interval for QTL on chr 7, first phenotype
bayes_int(out, map, chr=7, lodcolum=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.