Converting SummarizedExperiment into MicrobiomeStat

A step-by-step guide on converting SummarizedExperiment data format for compatibility with MicrobiomeStat.

The Bioconductor package SummarizedExperiment provides a convenient representation of experimental data. MicrobiomeStat provides a straightforward method for converting SummarizedExperiment objects.

# Check if the 'airway' package is installed
if (!requireNamespace("airway", quietly = TRUE)) {
  # If not installed, install 'airway'
  BiocManager::install("airway")
}

# Load necessary libraries
library(airway)

# Use the provided 'airway' dataset as an example
data(airway)

# Convert the SummarizedExperiment object 'airway' into a MicrobiomeStat data object
airway_obj <- mStat_convert_SummarizedExperiment_to_data_obj(airway)

The function mStat_convert_SummarizedExperiment_to_data_obj requires:

  • se.obj: A SummarizedExperiment object for conversion.

Post conversion, the data is organized into a MicrobiomeStat data object with the following components:

  • feature.tab: A matrix derived from assay data.

  • feature.ann: A matrix consisting of rowData or feature annotations. Only the features present in the assay data are retained.

  • meta.dat: A data frame containing colData or sample metadata.

For efficient analysis, features with an aggregate count of zero in the assay data are excluded during the conversion process.

Last updated