Description Usage Arguments Details Author(s) See Also Examples
Taxonomic classification is the process of assigning an organism a label that is part of a taxonomic hierarchy (e.g., Phylum, Class, Order, Family, Genus). Here, labels are assigned based on an organism's DNA or RNA sequence at a rank level determined by the classification's confidence. Class Taxa provides objects and functions for storing and viewing training and testing objects used in taxonomic classification.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
x |
An object of class |
y |
An (optional) object of class |
showRanks |
Logical specifying whether to show all rank levels when plotting an object of class |
n |
Numeric vector giving the frequency of each classification if |
... |
Other optional parameters. |
i |
Numeric or character vector of indices to extract from objects of class |
j |
Numeric or character vector of rank levels to extract from objects of class |
threshold |
Numeric specifying the confidence |
Objects of class Taxa are stored as lists, and can have either subclass Train or Test. The function LearnTaxa returns an object of subclass Train, while the function IdTaxa can return an object of class Test.
Training objects are built from a set of reference sequences with known taxonomic classifications. List elements contain information required by IdTaxa for assigning a classification to test sequences.
Testing objects can be generated by IdTaxa from a Training object and a set of test sequences. Each list element contains the taxon, confidence, and (optionally) rank name of the taxonomic assignment.
The information stored in Taxa can be visualized with the plot function or displayed with print. Only objects of subclass Train can be subsetted without losing their class.
Erik Wright eswright@pitt.edu
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | data("TrainingSet_16S")
plot(TrainingSet_16S)
# import test sequences
fas <- system.file("extdata", "Bacteria_175seqs.fas", package="DECIPHER")
dna <- readDNAStringSet(fas)
# remove any gaps in the sequences
dna <- RemoveGaps(dna)
# classify the test sequences
ids <- IdTaxa(dna, TrainingSet_16S, strand="top")
ids
plot(ids) # plot all rank levels
plot(ids[, 1:4]) # plot the first rank levels
plot(ids[j=c("rootrank", "class", "genus")]) # plot specific rank levels
plot(ids[threshold=70]) # plot high confidence classifications
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.