View source: R/add_threshold.R
| add.threshold | R Documentation |
Add a significance threshold to a plot created by
plot.scanone), using the permutation results.
add.threshold(out, chr, perms, alpha=0.05, lodcolumn=1, gap=25, ...)
out |
An object of class |
chr |
Optional vector specifying which chromosomes to plot. If a selected subset of chromosomes were plotted, they must be specified here. |
perms |
Permutation results from |
alpha |
Significance level of the threshold. |
lodcolumn |
An integer indicating which of column in the permutation results should be used. |
gap |
Gap separating chromosomes (in cM). This must be identical
to what was used in the call to |
... |
Passed to the function |
This function allows you to add a horizontal line at the significance
threshold to genome scan results plotted by
plot.scanone.
The arguments out, chr, and gap must match what
was used in the call to plot.scanone.
The argument perms must be specified. If X-chromosome-specific
permutations were performed (via the argument perm.Xsp in the
call to scanone), separate thresholds will be
plotted for the autosomes and the X chromosome. These are calculated
via the summary.scanoneperm function.
None.
Karl W Broman, broman@wisc.edu
scanone,
plot.scanone,
summary.scanoneperm, xaxisloc.scanone
data(hyper)
hyper <- calc.genoprob(hyper)
out <- scanone(hyper, method="hk")
operm <- scanone(hyper, method="hk", n.perm=100, perm.Xsp=TRUE)
plot(out, chr=c(1,4,6,15,"X"))
add.threshold(out, chr=c(1,4,6,15,"X"), perms=operm, alpha=0.05)
add.threshold(out, chr=c(1,4,6,15,"X"), perms=operm, alpha=0.1,
col="green", lty=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.