TRAMPR package contains a vignette, which includes a worked
example; type vignette("TRAMPRdemo") to view it.TRAMP(samples, knowns, accept.error=1.5, min.comb=4, method="maximum")TRAMPsamples object, containing
unidentified samples.TRAMPknowns object, containing
identified TRFLP patterns.method).min.comb to NA will
require that all enzyme/primer combinations in"maximum",
"euclidian" or "manhattan" (or any unambiguous
abbreviation).TRAMP object, with elements:labels(samples)) and columns are
different knowns (with colnames from labels(knowns)). Do not
access the presence/absence matrix directly, but use
summary.TRAMP, which provides options for labelling
knowns, grouping knowns, and excluding sample.pk
and knowns.pk for the samples and knowns, respectively.error),
recording the number of enzyme/primer combinations present for each
combination of samples and knowns.create.diffsmatrix.diffsmatrix
(see create.diffsmatrix for details).presence.ign is included to allow
matches to be ignored. However, this interface is experimental and
its current format should not be relied on - use
remove.TRAMP.match rather than interacting directly with
presence.ign.
Matching is based only on peak size (in base pairs), and does not
consider peak heights.TRAMP attempts to determine which species in the
accept.error base pairs (default 2), and
where at least min.comb enzyme/primer combinations are shared
between a sample and a known (default 4).
The three-dimensional matrix of match errors is generated by
create.diffsmatrix. In the resulting array,
m[i,j,k] is the difference (in base pairs) between the
ith sample and the jth known for the kth
enzyme/primer combination.
If $p_k$ and $q_k$ are the sizes of peaks for the $k$th
enzyme/primer combination for a sample and known (respectively), then
maximum distance is defined as
$$\max(|p_k - q_k|)$$
Euclidian distance is defined as
$$\frac{1}{n}\sqrt{\sum (p_k - q_k)^2}$$
and Manhattan distance is defined as
$$\frac{1}{n}\sum{|p_k - q_k|}$$
where $n$ is the number of shared enzyme/primer combinations,
since this may vary across sample/known combinations. For Euclidian
and Manhattan distances, accept.error then becomes the
mean distance, rather than the total distance.create.diffsmatrix for discussion of how differences
between sample and known profiles are generated.
plot.TRAMP, which displays TRAMP fits graphically.
summary.TRAMP, which creates a presence/absence matrix.
remove.TRAMP.match, which marks TRAMP matches as
ignored.data(demo.knowns)
data(demo.samples)
res <- TRAMP(demo.samples, demo.knowns)
## The resulting object can be interrogated with methods:
## The goodness of fit of the sample with sample.pk=101 (see
## ?\link{plot.TRAMP}).
plot(res, 101)
## To see all plots (this produces many figures), one after another.
op <- par(ask=TRUE)
plot(res)
par(op)
## Produce a presence/absence matrix (see ?\link{summary.TRAMP}).
m <- summary(res)
head(m)Run the code above in your browser using DataLab