View source: R/summarize_features.R
summarize.features | R Documentation |
This function summarize features on a specific taxonomic level
summarize.features(siamcat, level = 'g__',
feature.type='original', verbose=1)
siamcat |
object of class siamcat-class |
level |
string, at which level to summarize (e.g. |
feature.type |
string, on which type of features should the function
work? Can be either |
verbose |
integer, control output: |
This function will summarize features at different taxonomic levels, e.g. transform species-level relative abundance into genus-level taxonomic profiles.
The function expects a SIAMCAT object that either contains an entry in the tax_table slot of its phyloseq object, OR a set of feature names which encode taxonomic information, e.g.
k__Bacteria;p__Actinobacteria;c__Actinobacteria;o__Acidimicrobiales;..
Then, for a given taxonomic level (e.g. g__
), the function will
sum up all the relative abundances of features belonging to the same group
at that specific taxonomic level.
Please note that this function is currently maturing and not necessarily reliable!!!
object of class siamcat-class with a summarized feature table
## load the phyloseq example data
data("GlobalPatterns")
## create an example label
label <- create.label(meta=sample_data(GlobalPatterns),
label = "SampleType",
case = c("Freshwater", "Freshwater (creek)", "Ocean"))
# run the constructor function
siamcat <- siamcat(phyloseq=GlobalPatterns, label=label, verbose=1)
siamcat <- summarize.features(siamcat, level='Genus', verbose=3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.