phyloseq_sep_tax: Split phyloseq object by taxonomic rank.

View source: R/phyloseq_sep_tax.R

phyloseq_sep_taxR Documentation

Split phyloseq object by taxonomic rank.

Description

This function splits a phyloseq object by a specified taxonomic rank, returning a list of objects whose components each correspond to a taxonomic rank.

Usage

phyloseq_sep_tax(physeq, TaxRank = "Phylum", drop_NA = FALSE)

Arguments

physeq

A phyloseq-class object

TaxRank

Taxonomy rank name (e.g., "Phylum")

drop_NA

Logical, remove ranks with NAs

Value

List of phyloseq objects

Examples

data(GlobalPatterns)
# Subset data
GP <- subset_taxa(GlobalPatterns, Phylum %in% c("Acidobacteria", "Actinobacteria", "Firmicutes", "Verrucomicrobia"))
phyloseq_sep_tax(GP, TaxRank = "Phylum")


vmikk/metagMisc documentation built on June 20, 2024, 7:20 a.m.