find_peaks | R Documentation |
Find peaks in a set of LOD curves (output from scan1()
find_peaks(
scan1_output,
map,
threshold = 3,
peakdrop = Inf,
drop = NULL,
prob = NULL,
thresholdX = NULL,
peakdropX = NULL,
dropX = NULL,
probX = NULL,
expand2markers = TRUE,
sort_by = c("column", "pos", "lod"),
cores = 1
)
scan1_output |
An object of class |
map |
A list of vectors of marker positions, as produced by
|
threshold |
Minimum LOD score for a peak (can be a vector with
separate thresholds for each lod score column in
|
peakdrop |
Amount that the LOD score must drop between peaks,
if multiple peaks are to be defined on a chromosome. (Can be a vector with
separate values for each lod score column in
|
drop |
If provided, LOD support intervals are included in the
results, and this indicates the amount to drop in the support
interval. (Can be a vector with
separate values for each lod score column in
|
prob |
If provided, Bayes credible intervals are included in the
results, and this indicates the nominal coverage.
(Can be a vector with
separate values for each lod score column in
|
thresholdX |
Separate threshold for the X chromosome; if
unspecified, the same threshold is used for both autosomes and the
X chromosome. (Like |
peakdropX |
Like |
dropX |
Amount to drop for LOD support intervals on the X
chromosome. Ignored if |
probX |
Nominal coverage for Bayes intervals on the X
chromosome. Ignored if |
expand2markers |
If TRUE (and if |
sort_by |
Indicates whether to sort the rows by lod column, genomic position, or LOD score. |
cores |
Number of CPU cores to use, for parallel calculations.
(If |
For each lod score column on each chromosome, we return 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.
A data frame with each row being a single peak on a single chromosome for a single LOD score column, and with columns
lodindex
- lod column index
lodcolumn
- lod column name
chr
- chromosome ID
pos
- peak position
lod
- lod score at peak
If drop
or prob
is provided, the results will include
two additional columns: ci_lo
and ci_hi
, with the
endpoints of the LOD support intervals or Bayes credible wintervals.
scan1()
, lod_int()
, bayes_int()
# 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)
# find just the highest peak on each chromosome
find_peaks(out, map, threshold=3)
# possibly multiple peaks per chromosome
find_peaks(out, map, threshold=3, peakdrop=1)
# possibly multiple peaks, also getting 1-LOD support intervals
find_peaks(out, map, threshold=3, peakdrop=1, drop=1)
# possibly multiple peaks, also getting 90% Bayes intervals
find_peaks(out, map, threshold=3, peakdrop=1, prob=0.9)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.