functional-accessors: FunctionalEnrichment S4 class accessors

hitsR Documentation

FunctionalEnrichment S4 class accessors

Description

Accessor methods for the FunctionalEnrichment S4 class.

Usage

hits(x)

## S4 method for signature 'FunctionalEnrichment'
hits(x)

## S4 method for signature 'FunctionalEnrichment'
explanatoryFeatures(x)

enrichmentResults(x)

## S4 method for signature 'FunctionalEnrichment'
enrichmentResults(x)

generateResultsTable(x, method = availableMethods(), nlimit = 250, ...)

## S4 method for signature 'FunctionalEnrichment'
generateResultsTable(x, method = availableMethods(), nlimit = 250)

Arguments

x

object of S4 class FunctionalEnrichment

method

the method results to access. One of availableMethods.

nlimit

argument to pass to argument nlimit of FELLA::generateResultsTable. Limits the order of the sub-graph solutions for methods diffusion and pagerank.

...

ignored

Value

A tibble or a list of objects of FELLA.USER S4 class depending on the method used.

Examples

## Perform random forest on the example data 
random_forest <- assigned_data %>% 
metabolyseR::randomForest(
  cls = 'class'
)

## Perform functional enrichment analysis
enrichment_results <- functionalEnrichment(
  random_forest,
  'bdi',
  methods = 'hypergeom',
  organism_data = organismData(
    'bdi',
    database_directory = system.file(
      'bdi',
      package = 'riches'),
    internal_directory = FALSE
  )
)

## Access the m/z feature KEGG compound matches
hits(enrichment_results)

## Access the explanatory features used for functional enrichment
explanatoryFeatures(enrichment_results)

## Access the FELLA.USER functional enrichment object
enrichmentResults(enrichment_results)

## Extract a table of enrichment results
generateResultsTable(enrichment_results)

jasenfinch/riches documentation built on April 24, 2023, 9:45 a.m.