Skip to contents

Get the compute result from a Microbiome Dataset in a particular format with metadata.

Usage

getComputeResultWithMetadata(
  object,
  dataset,
  format = c("data.table"),
  metadataVariables = NULL
)

# S4 method for ComputeResult,MbioDataset
getComputeResultWithMetadata(
  object,
  dataset = NULL,
  format = c("data.table"),
  metadataVariables = NULL
)

# S4 method for ComputeResult,Collection
getComputeResultWithMetadata(
  object,
  dataset = NULL,
  format = c("data.table"),
  metadataVariables = NULL
)

# S4 method for ComputeResult,AbundanceData
getComputeResultWithMetadata(
  object,
  dataset = NULL,
  format = c("data.table"),
  metadataVariables = NULL
)

Arguments

object

A Microbiome Dataset

dataset

The MbioDataset, AbundanceData or Collection object from which the compute result was obtained.

format

The format you want the compute result in. Currently only "data.table" is supported.

metadataVariables

The metadata variables to include in the compute result. If NULL, no metadata variables will be included.

Value

The compute result in the specified format

Examples

alphaDivOutput <- MicrobiomeDB::alphaDiv(
     getCollection(
  microbiomeData::DiabImmune, 
  "16S (V4) Genus (Relative taxonomic abundance analysis)"), 
     method='shannon', 
     verbose=FALSE
)

alphaDivDT <- getComputeResultWithMetadata(
     alphaDivOutput, 
     microbiomeData::DiabImmune, 
     metadataVariables = c('country', 'delivery_mode')
)