Description Usage Arguments References See Also Examples
View source: R/plot_qtl_scanone.R
Plotting function to plot either a LOD curve plot or Manhattan plot, using methods based on
R/qtl plot.scanone
(Broman et al. 2003) and qqman manhattan
(Turner 2018), respectively. If you find either useful, please give credit where it is due
to the original author(s).
1 2 3 4 5 6 7 8 9 10 11 |
x |
An R/qtl |
chr |
Vector indicating which sequences to plot. If none are specified, all are plotted. |
lodcolumn |
This parameter indicates which LOD column of |
threshold |
A single |
qtl.intervals |
A |
col |
Analogous to the standard |
gap |
Gap (in centiMorgans) between sequences in multi-sequence plots. |
phenotype |
Name of the phenotype, to be shown in plot information. |
type |
Type of plot. Set to |
Broman KW, Wu H, Sen S, Churchill GA (2003) R/qtl: QTL mapping in experimental crosses. Bioinformatics 19:889-890. (PubMed)
Turner SD (2018) qqman: an R package for visualizing GWAS results using Q-Q and manhattan plots. (Journal of Open Source Software)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | ## Not run:
# Load R/qtl hyper dataset.
data(hyper, package='qtl')
# Estimate genetic map of hyper data.
gmap <- qtl::est.map(hyper, offset=0.0)
# Set newly estimated genetic map.
hyper <- qtl::replace.map(hyper, gmap)
# Calculate genotype probabilities.
hyper <- qtl::calc.genoprob(hyper, step=1.0)
# Do single-QTL analysis.
scanone.result <- qtl::scanone(hyper, pheno='bp')
# Do single-QTL permutation analysis.
scanone.perms <- qtl::scanone(hyper, pheno='bp', n.perm=1000L)
# Get LOD threshold values from single-QTL permutation results.
threshold.vals <- summary(scanone.perms, alpha=0.05)
# Get LOD threshold value for first LOD column.
threshold.val <- qtl:::subset.scanoneperm(threshold.vals, lodcolumn=1L)
# Get QTL intervals for first LOD column.
qtl.intervals <- get_qtl_intervals(scanone.result, lodcolumn=1L, threshold=threshold.val,
ci.function='bayesint')
# Plot complete LOD profile, including any QTL intervals.
plot_qtl_scanone(scanone.result, lodcolumn=1L, threshold=threshold.val,
qtl.intervals=qtl.intervals, phenotype='Blood pressure')
# Plot LOD profile of chromosomes with significant QTL intervals.
plot_qtl_scanone(scanone.result, chr=c('1', '4'), lodcolumn=1L, threshold=threshold.val,
qtl.intervals=qtl.intervals, phenotype='Blood pressure')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.