Skip to contents

Checks if the data has been rarefied by inspecting if all samples have equal total counts.

Usage

is_rarefied(data.obj)

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.

Value

Logical. TRUE if data is rarefied (all samples have equal counts), FALSE otherwise.

Examples

# Assuming peerj32.obj is a data object with OTU and metadata tables
data(peerj32.obj)
is_rarefied(peerj32.obj)
#> [1] FALSE