Learn R Programming

qtl (version 1.39-5)

plot.scanone: Plot LOD curves

Description

Plot the LOD curve for a genome scan with a single-QTL model (the output of scanone).

Usage

"plot"(x, x2, x3, chr, lodcolumn=1, incl.markers=TRUE, xlim, ylim, lty=1, col=c("black","blue","red"), lwd=2, add=FALSE, gap=25, mtick = c("line", "triangle"), show.marker.names=FALSE, alternate.chrid=FALSE, bandcol=NULL, type="l", cex=1, pch=1, bg="transparent", bgrect=NULL, ...)

Arguments

x
An object of class "scanone", as output by scanone.
x2
Optional second scanone object.
x3
Optional third scanone object.
chr
Optional vector indicating the chromosomes to plot. This should be a vector of character strings referring to chromosomes by name; numeric values are converted to strings. Refer to chromosomes with a preceding - to have all chromosomes but those considered. A logical (TRUE/FALSE) vector may also be used.
lodcolumn
An integer, or vector of 3 integers, indicating which of the LOD score columns should be plotted (generally this is 1).
incl.markers
Indicate whether to plot line segments at the marker locations.
xlim
Limits for x-axis (optional).
ylim
Limits for y-axis (optional).
lty
Line types; a vector of length 1 or 3.
col
Line colors; a vector of length 1 or 3.
lwd
Line widths; a vector of length 1 or 3.
add
If TRUE, add to a current plot.
gap
Gap separating chromosomes (in cM).
mtick
Tick mark type for markers (line segments or upward-pointing triangels).
show.marker.names
If TRUE, show the marker names along the x axis.
alternate.chrid
If TRUE and more than one chromosome is plotted, alternate the placement of chromosome axis labels, so that they may be more easily distinguished.
bandcol
Optional color for alternating bands to indicate chromosomes. If NULL (the default), no bands are plotted. A good choice might be bandcol="gray70".
type
Type of plot (see plot): for example, type="l" for lines or type="p" for points only, may be of length 1 or 3.
cex
Point size expansion, for example if type="p" is used. May be of length 1 or 3.
pch
Point type, for example if type="p" is used. See points. May be of length 1 or 3.
bg
Background color for points, for example if type="p" and pch=21 are used. See points. May be of length 1 or 3.
bgrect
Optional background color for the rectangular plotting region.
...
Passed to the function plot when it is called.

Value

Details

This function allows you to plot the results of up to three genome scans against one another. Such objects must conform with each other.

One may alternatively use the argument add to add the plot of an additional genome scan to the current figure, but some care is required: the same chromosomes should be selected, and the results must concern crosses with the same genetic maps.

If a single scanone object containing multiple LOD score columns (for example, from different phenotypes) is input, up to three LOD curves may be plotted, by providing a vector in the argument lodcolumn. If multiple scanone objects are input (via x, x2 and x3), the LOD score columns to be plotted are chosen from the corresponding element of the lodcolumn argument.

See Also

scanone, summary.scanone, par, colors, add.threshold, xaxisloc.scanone

Examples

Run this code
data(fake.f2)

fake.f2 <- calc.genoprob(fake.f2,step=2.5)
out.mr <- scanone(fake.f2, method="mr")
out.em <- scanone(fake.f2, method="em")
plot(out.mr)
plot(out.mr, out.em, chr=c(1,13), lty=1, col=c("violetred","black"))
out.hk <- scanone(fake.f2, method="hk")
plot(out.hk, chr=c(1,13), add=TRUE, col="slateblue")

plot(out.hk, chr=13, show.marker.names=TRUE)

plot(out.hk, bandcol="gray70")

# plot points rather than lines
plot(out.hk, bandcol="gray70", type="p", cex=0.3, pch=21, bg="slateblue")

Run the code above in your browser using DataLab