get_asv_table: Compiled ASV Table with Abundance & Taxonomic Classification

get_asv_tableR Documentation

Compiled ASV Table with Abundance & Taxonomic Classification

Description

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.

Usage

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
)

Arguments

x

The object from phyloseq_to_df().

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 phyloseq_to_df() function.

Abundance

The Abundance column name. By default, the Sample ID column name is "abundance" from the phyloseq_to_df() function.

Kingdom

The taxonomic Kingdom column name. By default, the taxonomic Kingdom column name is "Kingdom" from the phyloseq_to_df() function.

Phylum

The taxonomic Phylum column name. By default, the taxonomic Phylum column name is "Classified.Phylum" from the phyloseq_to_df() function.

Class

The taxonomic Class column name. By default, the taxonomic Class column name is "Classified.Class" from the phyloseq_to_df() function.

Order

The taxonomic Order column name. By default, the taxonomic Order column name is "Classified.Order" from the phyloseq_to_df() function.

Family

The taxonomic Family column name. By default, the taxonomic Family column name is "Classified.Family" from the phyloseq_to_df() function.

Genus

The taxonomic Genus column name. By default, the taxonomic Genus column name is "Genus" from the phyloseq_to_df() function.

Species

The taxonomic Species column name. By default, the taxonomic Species column name is "Classified.Species" from the phyloseq_to_df() function.

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.

Value

A dataframe.

Examples

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")


escamero/mirlyn documentation built on Aug. 6, 2023, 9:30 p.m.