plot_qtl_scanone: Draw a plot of an 'R/qtl' 'scanone' result.

Description Usage Arguments References See Also Examples

View source: R/plot_qtl_scanone.R

Description

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).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
plot_qtl_scanone(
  x,
  chr = NULL,
  lodcolumn = NULL,
  threshold = NULL,
  qtl.intervals = NULL,
  col = c("gray10", "gray60"),
  gap = 25L,
  phenotype = NULL,
  type = NULL
)

Arguments

x

An R/qtl scanone object.

chr

Vector indicating which sequences to plot. If none are specified, all are plotted.

lodcolumn

This parameter indicates which LOD column of x to consider. This must be either a LOD column name or an index with respect to the set of LOD columns. If no LOD column is specified and one such column is found, that column is used by default; otherwise a LOD column must be specified.

threshold

A single numeric LOD significance threshold, or a summary.scanoneperm object containing one such threshold and its associated significance level.

qtl.intervals

A list of data.frame objects created from the same data as x, such that each data.frame contains three rows of information about the lower interval limit, peak, and upper interval limit (respectively) of a given QTL. These intervals are only included in the plot if they would be visually distinguishable.

col

Analogous to the standard 'col' plotting parameter. This is recycled to match the number of sequences being plotted. As in the package qqman, this defaults to two alternating monochrome shades.

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 'l' to output a standard LOD curve, or to 'p' for a Manhattan plot of individual LOD scores. If no plot type is specified, this is automatically set based on the number of markers being plotted.

References

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)

See Also

R/qtl website

qqman package

Examples

 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)

gact/utl documentation built on June 1, 2021, 4:24 p.m.