Description Usage Arguments Details Value See Also Examples
Determine if TRFLP profiles may match those in a database of knowns. The resulting object can be used to produce a presence/absence matrix of known profiles in environmental samples.
The TRAMPR
package contains a vignette, which includes a worked
example; type vignette("TRAMPRdemo")
to view it.
1 | TRAMP(samples, knowns, accept.error=1.5, min.comb=4, method="maximum")
|
samples |
A |
knowns |
A |
accept.error |
The largest acceptable difference (in base pairs)
between any peak in the sample data and the knowns database (see
Details; interpretation will depend on the value of |
min.comb |
Minimum number of enzyme/primer combinations required
before presence will be tested. The default (4) should be
reasonable in most cases. Setting |
method |
Method used in calculating the difference between
samples and knowns; may be one of |
TRAMP
attempts to determine which species in the
‘knowns’ database may be present in a collection of
samples.
A sample matches a known if it has a peak that is “close
enough” to every peak in the known for every enzyme/primer
combination that they share. The default is to accept matches where
the largest distance between a peak in the knowns database and the
sample is less than 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
i
th sample and the j
th known for the k
th
enzyme/primer combination.
If p_k and q_k are the sizes of peaks for the kth 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
sqrt(sum (p_k - q_k)^2)/n
and Manhattan distance is defined as
sum(|p_k - q_k|)/n
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.
A TRAMP
object, with elements:
presence |
Presence/absence matrix. Rows are different samples
(with rownames from |
error |
Matrix of distances between the samples and known,
calculated by one of the methods described above. Rows correspond
to different samples, and columns correspond to different knowns.
The matrix dimension names are set to the values |
n |
A two-dimensional matrix (same dimensions as |
diffsmatrix |
Three-dimensional array of output from
|
enzyme.primer |
Different enzyme/primer combinations present in
the data, in the order of the third dimension of |
samples, knowns, accept.error, min.comb, method |
The input data objects and arguments, unmodified. |
In addition, an element 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.
See 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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 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)
## Not run:
## To see all plots (this produces many figures), one after another.
op <- par(ask=TRUE)
plot(res)
par(op)
## End(Not run)
## Produce a presence/absence matrix (see ?\link{summary.TRAMP}).
m <- summary(res)
head(m)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.