Title: | Rapidly Import Classifier Results into 'phyloseq' |
---|---|
Description: | Import classification results from the 'RDP Classifier' (Ribosomal Database Project),' 'USEARCH sintax,' 'vsearch sintax' and the 'QIIME2' (Quantitative Insights into Microbial Ecology) classifiers into 'phyloseq' tax_table objects. |
Authors: | John Quensen [aut, cre, cph] |
Maintainer: | John Quensen <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.0.4.9000 |
Built: | 2025-03-10 05:51:18 UTC |
Source: | https://github.com/jfq3/speedytax |
Import taxonomy results exported from the QIIME2 Bayesian classifiers
import_qiime2_tax_table(in_file)
import_qiime2_tax_table(in_file)
in_file |
A tab-delimited classification table output by QIIME2 |
This function expects up to 7 ranks (Domain, Phylum, Class, Order, Family, Genus and Species) but determines the number actually in the file.
Depending on how the QIIME2 classifier is built, the ranks in the Taxon field of the classification result may be separated by a semicolon or by a semicolon plus a space. This function correctly parses the Taxon field in both cases.
A phyloseq tax_table object
Bolyen E, Rideout JR, Dillon MR, Bokulich NA, et al. 2019. Reproducible, interactive, scalable and extensible microbiome data science using QIIME 2. Nat Biotechnol 37:852-857.
## Example with ranks in Taxon field separated by semicolon plus a space. taxonomy_file <- system.file("extdata", "qiime2_table.tsv", package = "speedytax") example_tax_table <- import_qiime2_tax_table(in_file = taxonomy_file) example_tax_table ## Example with ranks in Taxon field separated by semicolon only. taxonomy_file <- system.file("extdata", "qiime2_table_a.tsv", package = "speedytax") example_tax_table <- import_qiime2_tax_table(in_file = taxonomy_file) example_tax_table
## Example with ranks in Taxon field separated by semicolon plus a space. taxonomy_file <- system.file("extdata", "qiime2_table.tsv", package = "speedytax") example_tax_table <- import_qiime2_tax_table(in_file = taxonomy_file) example_tax_table ## Example with ranks in Taxon field separated by semicolon only. taxonomy_file <- system.file("extdata", "qiime2_table_a.tsv", package = "speedytax") example_tax_table <- import_qiime2_tax_table(in_file = taxonomy_file) example_tax_table
Imports fixed rank taxonomy files created with the RDP Classifier
import_rdp_tax_table(in_file, confidence)
import_rdp_tax_table(in_file, confidence)
in_file |
A fix-rank tab-delimited text file output by the RDP Classifier |
confidence |
The confidence level for filtering the taxonomy |
The RDP Classifier must be given the option -f fixrank (or –format fixrank) in order for this importer to work correctly.
A confidence value of 0.8 for is recommended for full-length 16S rRNA gene sequences and a value of 0.5 is recommended for shorter amplicons.
A phyloseq tax_table object
Wang Q, Garrity GM, Tiedje JM, Cole JR. 2007. Naive Bayesian classifier for rapid assignment of rRNA sequences into the new bacterial taxonomy. Appl Environ Microbiol 73:5261-5267.
taxonomy_file <- system.file("extdata", "rdp_table.tsv", package = "speedytax") example_tax_table <- import_rdp_tax_table(in_file = taxonomy_file) example_tax_table
taxonomy_file <- system.file("extdata", "rdp_table.tsv", package = "speedytax") example_tax_table <- import_rdp_tax_table(in_file = taxonomy_file) example_tax_table
Imports taxonomy files created with USEARCH and vsearch sintax commands
import_sintax_tax_table(in_file, confidence)
import_sintax_tax_table(in_file, confidence)
in_file |
A fix-rank tab-delimited text file output by SINTAX |
confidence |
The confidence level for filtering the taxonomy (0.8 by default) |
This function works with both vsearch and USEARCH sintax results.
A confidence value of 0.8 is recommended for full-length 16S rRNA gene sequences and a value of 0.5 is recommended for shorter amplicons.
A phyloseq tax_table object
Rognes T, Flouri T, Nichols B, Quince C, Mahé F. (2016) VSEARCH: a versatile open source tool for metagenomics. PeerJ 4:e2584. doi: 10.7717/peerj.2584
Edgar RC (2016) SINTAX: a simple non-Bayesian taxonomy classifier for 16S and ITS sequences. bioRxiv. doi:10.1101/074161
# With a vsearch sintax result taxonomy_file <- system.file("extdata", "vsearch_sintax_table.tsv", package = "speedytax") example_tax_table <- import_sintax_tax_table(in_file = taxonomy_file) example_tax_table # With a USEARCH sintax result taxonomy_file <- system.file("extdata", "usearch_sintax_table.tsv", package = "speedytax") example_tax_table <- import_sintax_tax_table(in_file = taxonomy_file) example_tax_table
# With a vsearch sintax result taxonomy_file <- system.file("extdata", "vsearch_sintax_table.tsv", package = "speedytax") example_tax_table <- import_sintax_tax_table(in_file = taxonomy_file) example_tax_table # With a USEARCH sintax result taxonomy_file <- system.file("extdata", "usearch_sintax_table.tsv", package = "speedytax") example_tax_table <- import_sintax_tax_table(in_file = taxonomy_file) example_tax_table
Access the files in speedyseq's inst/extdata sub-directory
read_tax_example(file = NULL)
read_tax_example(file = NULL)
file |
Name of file to return. |
Returns the full path to the requested file from the package sub-directory inst/extdata if it exists, or a list of the files in the directory if no file is specified.
read_tax_example() read_tax_example("rdp_table.tsv")
read_tax_example() read_tax_example("rdp_table.tsv")
Simple Capitalization
simple_cap(x)
simple_cap(x)
x |
A string or vector of strings |
The string with every word capitalized
simple_cap("an old dog learning new tricks")
simple_cap("an old dog learning new tricks")