View source: R/add_threshold.R
xaxisloc.scanone | R Documentation |
Get x-axis locations for given cM positions on given chromosomes in a
plot from plot.scanone
)
xaxisloc.scanone(out, thechr, thepos, chr, gap=25)
out |
An object of class |
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
|
gap |
Gap separating chromosomes (in cM). This must be identical
to what was used in the call to |
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.
A numeric vector of x-axis locations.
Karl W Broman, broman@wisc.edu
plot.scanone
,
add.threshold
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.