get_asv_table | R Documentation |
get_asv_table()
will produce a compiled ASV table with abundance and taxonomic
classifications using the output from phyloseq_to_df()
.
In combination with the dplyr::filter()
function, users may select a
specific taxonomic group.
get_asv_table(
x,
OTU = "OTU",
Sample = "sample",
Abundance = "abundance",
Kingdom = "Kingdom",
Phylum = "Phylum",
Class = "Class",
Order = "Order",
Family = "Family",
Genus = "Genus",
Species = "Species",
proportion = TRUE
)
x |
The object from |
OTU |
The ASV column name. By default, the OTU column name is "OTU". |
Sample |
The Sample ID column name. By default, the Sample ID column name is
"sample" from the |
Abundance |
The Abundance column name. By default, the Sample ID column name
is "abundance" from the |
Kingdom |
The taxonomic Kingdom column name. By default, the taxonomic Kingdom
column name is "Kingdom" from the |
Phylum |
The taxonomic Phylum column name. By default, the taxonomic Phylum column
name is "Classified.Phylum" from the |
Class |
The taxonomic Class column name. By default, the taxonomic Class column
name is "Classified.Class" from the |
Order |
The taxonomic Order column name. By default, the taxonomic Order column
name is "Classified.Order" from the |
Family |
The taxonomic Family column name. By default, the taxonomic Family column
name is "Classified.Family" from the |
Genus |
The taxonomic Genus column name. By default, the taxonomic Genus
column name is "Genus" from the |
Species |
The taxonomic Species column name. By default, the taxonomic Species
column name is "Classified.Species" from the |
proportion |
A Boolean value determining whether abundances of ASV should be expressed as raw read counts or % abundance of the library. By default, the % abundance will be applied. |
A dataframe.
library(mirlyn)
data(example)
example_df <- phyloseq_to_df(example)
# ASV Table for All ASV
example_asv_table <- get_asv_table(example_df, OTU = "Row.names")
# Filter by Taxonomic Level of Interest
library(dplyr)
cyano_example <- example_df %>% filter(Phylum == "Cyanobacteria")
cyano_example_asv_table <- get_asv_table(cyano_example, OTU = "Row.names")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.