chemicalClassEnrichment: Returns chemical class information comparing a metabolite...

View source: R/rampChemClassQueries.R

chemicalClassEnrichmentR Documentation

Returns chemical class information comparing a metabolite subset to a metabolite population, including Fisher Exact Test enrichment p-values and FDR values.

Description

Returns chemical class information comparing a metabolite subset to a metabolite population, including Fisher Exact Test enrichment p-values and FDR values.

Usage

chemicalClassEnrichment(
  db = RaMP(),
  mets,
  background = "database",
  background_type = "database",
  inferIdMapping = F
)

Arguments

mets

a vector of source prepended metabolite ids

background

an optional list of source prepended metaboite ids to be used as the background reference of metabolites for enrichment. The background can be either a list of ids, a file name containing the id list, one id per column (no file header row) or a specificed biospecimen type (available biospecimen types: "Blood", "Adipose tissue", "Heart", "Urine", "Brain", "Liver", "Kidney","Saliva", or "Feces").

background_type

one of 'database' (all analytes in the RaMP Database), 'list' (a list of input ids), or 'file' in which case the background parameter will be a file path, or 'biospecimen' where the specified background parameter is a RaMP HMDB metabolite ontology term (see background parameter, above. for the most common biospecimen background values).

inferIdMapping

if FALSE, the method only reports on class annotations made directly on the input ids. If inferIdMapping is set to TRUE, the input ids are cross-referenced or mapped to other existing ids that contain metabolite class annotations. Following id cross references can expand coverage if the input type is other than HMDB ids or LIPIDMAPS ids. The default value is FALSE.

Value

a list of dataframes, each holding chemical classs enrichment statistics for specific chemical classification systems, such as HMDB Classyfire class categories and LIPIDMAPS class categories. The results list chemical classes, metabolite hits counts, Fisher Exact p-values and Benjamini-Hochberg corrected p-values (FDR estimates)

Examples

## Not run: 
# metabolite list of interest
metList = c('hmdb:HMDB0000056',
            'hmdb:HMDB0000439',
            'hmdb:HMDB0000479',
            'hmdb:HMDB0000532',
            'hmdb:HMDB0001015',
            'hmdb:HMDB0001138',
            'hmdb:HMDB0029159',
            'hmdb:HMDB0029412',
            'hmdb:HMDB0034365',
            'hmdb:HMDB0035227',
            'hmdb:HMDB0007973',
            'hmdb:HMDB0008057',
            'hmdb:HMDB0011211')

# the background population can be a separate ID list (preferred) or all database entries
# (skip pop parameter).
pkg.globals <- setConnectionToRaMP(dbname="ramp2",username="root",conpass="",host = "localhost")
enrichedClassStats <- chemicalClassEnrichment(mets = metList)

## End(Not run)

ncats/RaMP-DB documentation built on June 1, 2024, 9:34 p.m.