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

View source: R/rampChemClassQueries.R

runEnrichChemClassR Documentation

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

Description

The function performs enrichment analysis for Classyfire classes, sub-classess, and super-classes, and for #'LipidMaps categories, main classess, and sub classes.

Usage

runEnrichChemClass(
  mets,
  background = "database",
  backgroundType = "database",
  inferIdMapping = F,
  db = RaMP()
)

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").

backgroundType

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.

db

a RaMP database object

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
metabolites.of.interest = c("pubchem:64969",
                            "chebi:16958",
                            "chemspider:20549",
                            "kegg:C05598",
                            "chemspider:388809",
                            "pubchem:53861142",
                            "hmdb:HMDB0001138",
                            "hmdb:HMDB0029412")

chemical.enrichment <- runEnrichChemClass(mets = metabolites.of.interest, db = rampDB)

## End(Not run)

ncats/RaMP-DB documentation built on June 10, 2025, 10:50 a.m.