Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

xaxisloc.scanone

Get x-axis locations in scanone plot


Description

Get x-axis locations for given cM positions on given chromosomes in a plot from plot.scanone)

Usage

xaxisloc.scanone(out, thechr, thepos, chr, gap=25)

Arguments

out

An object of class "scanone", as output by scanone. This must be identical to what was used in the call to plot.scanone.

thechr

Chromosome IDs at which x-axis locations are to be determined.

thepos

Chromosome positions at which x-axis locations are to be determined.

chr

Optional vector specifying which chromosomes were plotted. This must be identical to what was used in the call to plot.scanone.

gap

Gap separating chromosomes (in cM). This must be identical to what was used in the call to plot.scanone.

Details

This function allows you to identify the x-axis locations in a plot of genome scan results, produced by plot.scanone. This is useful for adding annotations, such as text or arrows.

The arguments out, chr, and gap must match what was used in the call to plot.scanone.

The arguments thechr and thepos indicate the genomic positions for which x-axis locations are desired. If they both have length > 1, they must have the same length. If one has length > 1 and one has length 1, the one with length 1 is expanded to match.

Value

A numeric vector of x-axis locations.

Author(s)

Karl W Broman, broman@wisc.edu

See Also

Examples

data(hyper)

hyper <- calc.genoprob(hyper)
out <- scanone(hyper, method="hk")
plot(out, chr=c(1, 4, 6, 15))

# add arrow and text to indicate peak LOD score
mxout <- max(out)
x <- xaxisloc.scanone(out, mxout$chr, mxout$pos, chr=c(1,4,6,15))
arrows(x+30, mxout$lod, x+5, mxout$lod, len=0.1, col="blue")
text(x+35, mxout$lod, "the peak", col="blue", adj=c(0, 0.5))

qtl

Tools for Analyzing QTL Experiments

v1.48-1
GPL-3
Authors
Karl W Broman <broman@wisc.edu> and Hao Wu, with ideas from Gary Churchill and Saunak Sen and contributions from Danny Arends, Robert Corty, Timothee Flutre, Ritsert Jansen, Pjotr Prins, Lars Ronnegard, Rohan Shah, Laura Shannon, Quoc Tran, Aaron Wolen, Brian Yandell, and R Core Team
Initial release
2021-03-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.