construct_otu_table: construct_otu_table

View source: R/construct_otu_table.R

construct_otu_tableR Documentation

construct_otu_table

Description

construct_otu_table can construct a OTU table with a phyloseq object.

Usage

construct_otu_table(
  phyloseq,
  level = "all",
  relative_abundance = FALSE,
  hundred_percent = FALSE
)

Arguments

phyloseq

A phyloseq object contain otu table, taxonomy table, sample metadata and phylogenetic tree.

level

The coloumn name of the level wanted to select. Default is "all". If "all" then retain all taxonomy level, else ONLY retain the given taxonomy level, drop everything else. Level name should be one of "all", "Kingdom", "Phylum", "Class", "Order", "Family", "Genus", "Species".

relative_abundance

Turn OTU table into relative abundance or not. Default is FALSE. If TRUE, the raw count value will be converted to relative abundance and total sum is 1.

hundred_percent

Default is FALSE, if TRUE, turn relative abundance to 100 percent, total sum is 100.

Examples

construct_otu_table(demo_phyloseq_object, level = "Genus") %>% .[,1:5]

yeguanhuav/visualization416S documentation built on March 22, 2022, 9:03 p.m.