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.
# S3 method for 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)
A TRAMP
object.
The sample.fk
to plot. If omitted, then all
samples are plotted, one after the other (this is useful for
generating a summary of all fits for printing out: see Example).
Logical: Should the matched knowns be grouped?
Logical: Should matches marked as ignored by
remove.TRAMP.match
be excluded?
Controls which enzyme/primer combinations are displayed (see Details)
Vector of colours to plot the different enzyme/primer combinations. There must be at least as many colours as there are different combinations.
Plotting symbol to use (see points
for
possible values and their interpretation). By default, this will
use filled circles when ungrouped and filled squares when grouped.
Maximum size (in base pairs) for the plots to cover.
NULL
(the default) uses the range of all data found in the
TRAMPsamples
object (rounded up to the nearest 100).
NA
will use the range of all data in the current sample.
Logical: Should horizontal grid lines be used for each matched known?
Margin size (in lines of text) to surround the plot.
Proportion of the plotting area to be used for the
“matches”. The “peak profiles” will share the bottom
1-p.top
of the plot.
Proportion of the plotting area to be used for labels
to the left of the plots. 1-p.labels
will be used for the
plots (try increasing this if you have very long species or group
names).
Size of the text used for axes. If NULL
(the
default), then the largest cex that will exactly fit labels is
chosen (up to cex.axis.max
).
Maximum size of the text used for axes, if
automatically determining the label size (i.e. cex.axis
is
NULL
).
Additional arguments passed to TRAMP.plotone
.
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
.
plot.TRAMPknowns
, for plotting TRAMPknowns
objects, and plot.TRAMPsamples
, for plotting
TRAMPsamples
objects.
# NOT RUN {
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()
# }
Run the code above in your browser using DataLab