Skip to contents

Get the compute result from a Microbiome Dataset in a particular format. Some formats may not be supported for all compute results.

Usage

getComputeResult(object, format = c("data.table"), ...)

# S4 method for ComputeResult
getComputeResult(object, format = c("data.table", "igraph"), ...)

# S4 method for CorrelationResult
getComputeResult(
  object,
  format = c("data.table", "igraph"),
  correlationCoefThreshold = 0.5,
  pValueThreshold = 0.05
)

# S4 method for DifferentialAbundanceResult
getComputeResult(object, format = c("data.table"))

Arguments

object

A Microbiome Dataset

format

The format of the compute result. Currently only "data.table" and "igraph" are supported.

...

additional arguments passed to getComputeResult method of the subclasses of ComputeResult

correlationCoefThreshold

threshold to filter edges by correlation coefficient. Edges with correlation coefficients below this threshold will be removed. Default is .5

pValueThreshold

threshold to filter edges by p-value. Edges with p-values above this threshold will be removed. Default is .05

Value

The compute result in the specified format

Examples

correlationOutput <- MicrobiomeDB::selfCorrelation(
     getCollection(
  microbiomeData::DiabImmune, 
  "16S (V4) Genus (Relative taxonomic abundance analysis)"), 
     method='spearman', 
     verbose=FALSE
)
#> 
#> 2024-06-26 14:28:48.184477 Removed 1 records with no data.
#> 
#> 2024-06-26 14:28:48.191186 Removed 1 records with no data.
correlationDT <- getComputeResult(correlationOutput, "data.table")
correlationIGraph <- getComputeResult(correlationOutput, "igraph")