Description Usage Arguments Examples
View source: R/extract_metadata_phyloseq.R
extract_metadata_phyloseq can extract metadata from a phyloseq object. First, the function will extract metadata from phyloseq object using phyloseq::sample_data, and turn it into a tibble which will turn rownames into a column name 'SampleID'. If feature parameter is given, then will select SampleID and feature column, and add levels to the selected feature column.
1 | extract_metadata_phyloseq(phyloseq, feature = NA, col_name = "SampleID")
|
phyloseq |
A phyloseq object contain otu table, taxonomy table, sample metadata and phylogenetic tree. |
feature |
The column name of the feature you want to select. Default is NA. If NA, will return the complete metadata, else will return subject id and feature column that's given. |
col_name |
Name of column to use for rownames. Default is "SampleID". If If 'SampleID' is in origin metadata, rename it with 'SampleID_origin'. |
1 | extract_metadata_phyloseq(demo_phyloseq_object)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.