addSpecies: Add species-level annotation to a taxonomic table.

Description Usage Arguments Value See Also Examples

View source: R/taxonomy.R


addSpecies wraps the assignSpecies function to assign genus-species binomials to the input sequences by exact matching against a reference fasta. Those binomials are then merged with the input taxonomic table with species annotations appended as an additional column to the input table. Only species identifications where the genera in the input table and the binomial classification are consistent are included in the return table.


addSpecies(taxtab, refFasta, allowMultiple = FALSE, verbose = FALSE)



(Required). A taxonomic table, the output of assignTaxonomy.


(Required). The path to the reference fasta file, or an R connection. Can be compressed. This reference fasta file should be formatted so that the id lines correspond to the genus-species binomial of the associated sequence:

>SeqID genus species ACGAATGTGAAGTAA......


(Optional). Default FALSE. Defines the behavior when multiple exact matches against different species are returned. By default only unambiguous identifications are return. If TRUE, a concatenated string of all exactly matched species is returned. If an integer is provided, multiple identifications up to that many are returned as a concatenated string.


(Optional). Default FALSE. If TRUE, print status to standard output.


A character matrix one column larger than input. Rows correspond to sequences, and columns to the taxonomic levels. NA indicates that the sequence was not classified at that level.

See Also

assignTaxonomy, assignSpecies


## Not run: 
 taxtab <- assignTaxonomy(dadaF, "rdp_train_set_14.fa.gz")
 taxtab <- addSpecies(taxtab, "rdp_species_assignment_14.fa.gz")

## End(Not run)

dada2 documentation built on May 20, 2017, 9:15 p.m.
Search within the dada2 package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.