metacoder (version 0.3.7)

parse_dada2: Convert the output of dada2 to a taxmap object

Description

Convert the ASV table and taxonomy table returned by dada2 into a taxmap object. An example of the input format can be found by following the dada2 tutorial here: shttps://benjjneb.github.io/dada2/tutorial.html

Usage

parse_dada2(
  seq_table,
  tax_table,
  class_key = "taxon_name",
  class_regex = "(.*)",
  include_match = TRUE
)

Value

taxmap

Arguments

seq_table

The ASV abundance matrix, with rows as samples and columns as ASV ids or sequences

tax_table

The table with taxonomic classifications for ASVs, with ASVs in rows and taxonomic ranks as columns.

class_key

(`character` of length 1) The identity of the capturing groups defined using `class_regex`. The length of `class_key` must be equal to the number of capturing groups specified in `class_regex`. Any names added to the terms will be used as column names in the output. At least one `"taxon_name"` must be specified. Only `"info"` can be used multiple times. Each term must be one of those described below: * `taxon_name`: The name of a taxon. Not necessarily unique, but are interpretable by a particular `database`. Requires an internet connection. * `taxon_rank`: The rank of the taxon. This will be used to add rank info into the output object that can be accessed by `out$taxon_ranks()`. * `info`: Arbitrary taxon info you want included in the output. Can be used more than once.

class_regex

(`character` of length 1) A regular expression with capturing groups indicating the locations of data for each taxon in the `class` term in the `key` argument. The identity of the information must be specified using the `class_key` argument. The `class_sep` option can be used to split the classification into data for each taxon before matching. If `class_sep` is `NULL`, each match of `class_regex` defines a taxon in the classification.

include_match

(`logical` of length 1) If `TRUE`, include the part of the input matched by `class_regex` in the output object.

See Also

Other parsers: extract_tax_data(), lookup_tax_data(), parse_edge_list(), parse_greengenes(), parse_mothur_tax_summary(), parse_mothur_taxonomy(), parse_newick(), parse_phylo(), parse_phyloseq(), parse_qiime_biom(), parse_rdp(), parse_silva_fasta(), parse_tax_data(), parse_ubiome(), parse_unite_general()