pool_taxon_counts | R Documentation |
Enables comparing analyses at different taxonomic resolutions, as seen in \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1128/mbio.03161-21")}. Implementation adapted from here.
pool_taxon_counts(otu_shared_dat, otu_tax_dat, taxon_level)
otu_shared_dat |
data frame created from a shared file at the OTU level. |
otu_tax_dat |
data frame created from a taxonomy file at the OTU level. Must be from the same dataset as the shared file. |
taxon_level |
taxonomic level to pool OTUs into.
Options: "kingdom", "phylum", "class", "order", "family", "genus".
This should be the name of a column in |
a shared data frame with the OTUs at the specified taxon_level
and
a corresponding taxonomy dataframe with new OTU numbers.
Kelly Sovacool, sovacool@umich.edu
Pat Schloss pschloss@umich.edu
tax_dat <- read_tax(system.file("extdata", "test.taxonomy",
package = "schtools"
))
shared_dat <- readr::read_tsv(system.file("extdata", "test.shared",
package = "schtools"
))
pool_taxon_counts(shared_dat, tax_dat, "genus")
pool_taxon_counts(shared_dat, tax_dat, "family")
pool_taxon_counts(shared_dat, tax_dat, "phylum")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.