TRAMPR (version 1.0-8)

build.knowns: Automatically Build Knowns Database

Description

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.

Usage

build.knowns(d, min.ratio=3, min.comb=NA, restrict=FALSE, ...)

Arguments

d

A TRAMPsamples object, containing samples from which to build the knowns database.

min.ratio

Minimum ratio of maximum to second highest peak to accept known (see Details).

min.comb

Minimum number of enzyme/primer combinations required for each known (see Details for behaviour of default).

restrict

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).

Value

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.

Details

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.

Examples

Run this code
# 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