Skip to contents

Removes specified features from the feature table and annotations.

Usage

mStat_remove_feature(data.obj, featureIDs, feature.level = NULL)

Arguments

data.obj

A MicrobiomeStat data object, which is a list containing at minimum the following components:

  • feature.tab: A matrix of feature abundances (taxa/genes as rows, samples as columns)

  • meta.dat: A data frame of sample metadata (samples as rows)

Optional components include:

  • feature.ann: A matrix/data frame of feature annotations (e.g., taxonomy)

  • tree: A phylogenetic tree object (class "phylo")

  • feature.agg.list: Pre-aggregated feature tables by taxonomy

Data objects can be created using converters like mStat_convert_phyloseq_to_data_obj or importers like mStat_import_qiime2_as_data_obj.

featureIDs

Character vector of feature IDs to remove.

feature.level

Taxonomic level to match feature IDs. Use "original" for row names.

Value

A MicrobiomeStat data object with specified features removed.

Examples

if (FALSE) { # \dontrun{
data(peerj32.obj)
featureIDs <- rownames(peerj32.obj$feature.tab)[1:3]
peerj32.obj <- mStat_remove_feature(peerj32.obj, featureIDs, feature.level = "original")
} # }