agglomerate_taxmap: Agglomerate taxmap Objects

Description Usage Arguments Details Value See Also Examples

View source: R/metacoder.R

Description

A function similar to the phyloseq::tax_glom function, that assembles abundance data at a specified rank. This removes subtaxa and reassigns the values at the specified rank.

Usage

1
agglomerate_taxmap(obj, rank, validated = FALSE)

Arguments

obj

A Taxmap object.

rank

The rank that will be agglomerated to.

validated

This parameter provides a way to override validation steps. Use carefully. Default: FALSE

Details

This function helps analyzing taxonomic data at intermediate ranks by agglomerating the observation data and the taxmap object.

Value

A taxmap object that has been agglomerated at the specified rank.

See Also

filter_taxa

validate_MicrobiomeR_format

Other Advanced Metacoder Filters: cov_filter, otu_prevalence_filter, otu_proportion_filter, taxa_prevalence_filter

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
if(interactive()){
# This example uses data that are no longer available in the MicrobiomeR package,
# however, they can be easily generated with \code{\link{MicrobiomeR}{as_basic_format}}.
library(MicrobiomeR)
basic_silva <- as_MicrobiomeR_format(MicrobiomeR::raw_silva_2, "basic_format")
phylum_obj <- agglomerate_taxmap(obj = basic_silva, rank = "Phylum")
class_obj <- agglomerate_taxmap(obj = basic_silva, rank = "Class")
order_obj <- agglomerate_taxmap(obj = basic_silva, rank = "Order")
 }

## End(Not run)

vallenderlab/MicrobiomeR documentation built on Aug. 30, 2019, 11:24 p.m.