merge_taxa | R Documentation |
x
into one species/taxa/OTU.Takes as input an object that describes species/taxa
(e.g. phyloseq-class
, otu_table-class
,
phylo-class
, taxonomyTable-class
),
as well as
a vector of species that should be merged.
It is intended to be able to operate at a low-level such that
related methods, such as tip_glom
and tax_glom
can both reliably call merge_taxa
for their respective purposes.
merge_taxa(x, eqtaxa, archetype=1) ## S4 method for signature 'phyloseq' merge_taxa(x, eqtaxa, archetype = eqtaxa[which.max(taxa_sums(x)[eqtaxa])]) ## S4 method for signature 'sample_data' merge_taxa(x, eqtaxa, archetype = 1L) ## S4 method for signature 'otu_table' merge_taxa(x, eqtaxa, archetype = eqtaxa[which.max(taxa_sums(x)[eqtaxa])]) ## S4 method for signature 'phylo' merge_taxa(x, eqtaxa, archetype = 1L) ## S4 method for signature 'XStringSet' merge_taxa(x, eqtaxa, archetype = 1L) ## S4 method for signature 'taxonomyTable' merge_taxa(x, eqtaxa, archetype = 1L)
x |
(Required). An object that describes species (taxa). This includes
|
eqtaxa |
(Required). The species names, or indices, that should be merged together.
If |
archetype |
(Optional). A single-length numeric or character.
The index of |
The object, x
, in its original class, but with the specified
species merged into one entry in all relevant components.
tip_glom
, tax_glom
, merge_phyloseq
,
merge_samples
# data(esophagus) tree <- phy_tree(esophagus) otu <- otu_table(esophagus) otutree0 <- phyloseq(otu, tree) # plot_tree(otutree0) otutree1 <- merge_taxa(otutree0, 1:8, 2) # plot_tree(esophagus, ladderize="left")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.