plot.TRAMP {TRAMPR} | R Documentation |
Plot a TRAMP Object
Description
Creates a graphical representation of matches performed by
TRAMP
. The plot displays (1) “matches”, showing
how samples match the knowns and (2) “peak profiles”, showing
the locations of peaks for individual enzyme/primer combinations.
Usage
## S3 method for class 'TRAMP'
plot(x, sample.fk, ...)
TRAMP.plotone(x, sample.fk, grouped=FALSE, ignore=FALSE,
all.knowns=TRUE, all.samples=FALSE,
all.samples.global=FALSE, col=1:10,
pch=if (grouped) 15 else 16, xmax=NULL, horiz.lines=TRUE,
mar.default=.5, p.top=.5, p.labels=1/3, cex.axis=NULL,
cex.axis.max=1)
Arguments
x |
A |
sample.fk |
The |
grouped |
Logical: Should the matched knowns be grouped? |
ignore |
Logical: Should matches marked as ignored by
|
all.knowns , all.samples , all.samples.global |
Controls which enzyme/primer combinations are displayed (see Details) |
col |
Vector of colours to plot the different enzyme/primer combinations. There must be at least as many colours as there are different combinations. |
pch |
Plotting symbol to use (see |
xmax |
Maximum size (in base pairs) for the plots to cover.
|
horiz.lines |
Logical: Should horizontal grid lines be used for each matched known? |
The following arguments control the layout and margins of the plot:
mar.default |
Margin size (in lines of text) to surround the plot. |
p.top |
Proportion of the plotting area to be used for the
“matches”. The “peak profiles” will share the bottom
|
p.labels |
Proportion of the plotting area to be used for labels
to the left of the plots. |
cex.axis |
Size of the text used for axes. If |
cex.axis.max |
Maximum size of the text used for axes, if
automatically determining the label size (i.e. |
... |
Additional arguments passed to |
Details
This constructs a plot of a TRAMP
fit, illustrating
where knowns match the sample data, and which sample peaks remain
unmatched.
The top portion of the plot displays “matches”, showing
how samples match the knowns. Individual species (or groups if
grouped
is TRUE
) are represented by different horizontal
lines. Where the sample matches a particular known, a symbol is drawn
(Beware: it may look like only one symbol is drawn when several
symbols are plotted on top of one another).
The bottom portion of the plot displays the “peak profile” of
the sample, showing the locations and heights of peaks for
various enzyme/primer combinations (the exact combination depends on
the values of all.knowns
, all.samples
and
all.samples.global
; see below). The height is arbitrary, so
units are ommited.
The arguments all.knowns
, all.samples
and
all.samples.global
control which enzyme/primer combinations are
displayed in the plot. all.knowns=TRUE
displays all
combinations present in the knowns database and
all.samples=TRUE
displays all combinations present in the
samples; when all.samples.global=TRUE
this is combinations
across the entire samples data set, otherwise this is samples present
in the current sample only. At least one of all.knowns
and all.samples
must be TRUE
.
Note
While TRAMP.plotone
does the actual plot, it should not be
called directly; please use plot(x, sample.fk, ...)
.
See Also
plot.TRAMPknowns
, for plotting TRAMPknowns
objects, and plot.TRAMPsamples
, for plotting
TRAMPsamples
objects.
Examples
data(demo.samples)
data(demo.knowns)
res <- TRAMP(demo.samples, demo.knowns)
plot(res, 101)
plot(res, 110)
plot(res, 117)
plot(res, 117, grouped=TRUE)
## Not run:
# Create a PDF file with all matches:
pdf("all_matches.pdf")
plot(res)
dev.off()
## End(Not run)