This function uses several filters to select likely knowns, and
construct a TRAMPknowns
object from a
TRAMPsamples
object. Samples are considered to be
“potential knowns” if they have data for an adequate number of
enzyme/primer combinations, and if for each combination they have
either a single peak, or a peak that is “distinct enough” from
any other peaks.
build.knowns(d, min.ratio=3, min.comb=NA, restrict=FALSE, ...)
A TRAMPsamples
object, containing samples from which
to build the knowns database.
Minimum ratio of maximum to second highest peak to accept known (see Details).
Minimum number of enzyme/primer combinations required for each known (see Details for behaviour of default).
Logical: Use only cases where d$info$species
is
non-blank? (These are assumed to come from samples of a known
species. However, it is not guaranteed that all samples with data for
species
will become knowns; if they fail either the
min.ratio
or min.comb
checks they will be excluded.)
Additional arguments passed to TRAMPknowns
(e.g. cluster.pars
, file.pat
and any additional
objects).
A new TRAMPknowns
object. It will generally be neccessary to
edit this object; see read.TRAMPknowns
for details on
how to write, edit, and read back a modified object.
For all samples and enzyme/primer combinations, the ratio of the
largest to the second largest peak is calculated. If it is greater
than min.ratio
, then that combination is accepted. If the
sample has at least min.comb
valid enzyme/primer combinations,
then that sample is included in the knowns database. If
min.comb
is NA
(the default), then every
enzyme/primer combination present in the data is required.
# NOT RUN {
data(demo.samples)
demo.knowns.auto <- build.knowns(demo.samples, min.comb=4)
plot(demo.knowns.auto, cex=.75)
# }
Run the code above in your browser using DataLab