Title: | Rapidly Import Classifier Results into 'phyloseq' |
Version: | 1.0.4 |
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. |
License: | MIT + file LICENSE |
Imports: | dplyr, phyloseq, Rcpp, stringr, tibble, tidyr |
Encoding: | UTF-8 |
RoxygenNote: | 7.3.1 |
LinkingTo: | Rcpp |
NeedsCompilation: | yes |
Packaged: | 2024-05-14 00:37:49 UTC; johnq |
Author: | John Quensen |
Maintainer: | John Quensen <quensenj@msu.edu> |
Repository: | CRAN |
Date/Publication: | 2024-05-14 02:30:02 UTC |
speedytax: 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.
Author(s)
Maintainer: John Quensen quensenj@msu.edu (ORCID) [copyright holder]
Import QIIME2 Classification Table
Description
Import taxonomy results exported from the QIIME2 Bayesian classifiers
Usage
import_qiime2_tax_table(in_file)
Arguments
in_file |
A tab-delimited classification table output by QIIME2 |
Details
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.
Value
A phyloseq tax_table object
References
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.
Examples
## 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
Import RDP Classifier Taxonomy Table
Description
Imports fixed rank taxonomy files created with the RDP Classifier
Usage
import_rdp_tax_table(in_file, confidence)
Arguments
in_file |
A fix-rank tab-delimited text file output by the RDP Classifier |
confidence |
The confidence level for filtering the taxonomy |
Details
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.
Value
A phyloseq tax_table object
References
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.
Examples
taxonomy_file <- system.file("extdata", "rdp_table.tsv", package = "speedytax")
example_tax_table <- import_rdp_tax_table(in_file = taxonomy_file)
example_tax_table
Import SINTAX Taxonomy Table
Description
Imports taxonomy files created with USEARCH and vsearch sintax commands
Usage
import_sintax_tax_table(in_file, confidence)
Arguments
in_file |
A fix-rank tab-delimited text file output by SINTAX |
confidence |
The confidence level for filtering the taxonomy (0.8 by default) |
Details
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.
Value
A phyloseq tax_table object
References
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
Examples
# 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
Get path to example taxonomy files
Description
Access the files in speedyseq's inst/extdata sub-directory
Usage
read_tax_example(file = NULL)
Arguments
file |
Name of file to return. |
Value
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.
Examples
read_tax_example()
read_tax_example("rdp_table.tsv")
Simple Capitalization
Description
Simple Capitalization
Usage
simple_cap(x)
Arguments
x |
A string or vector of strings |
Value
The string with every word capitalized
Examples
simple_cap("an old dog learning new tricks")