getChemicalProperties: Returns chemical properties given a metabolite list

View source: R/rampChemPropQueries.R

getChemicalPropertiesR Documentation

Returns chemical properties given a metabolite list

Description

Returns chemical properties given a metabolite list

Usage

getChemicalProperties(mets, propertyList = "all")

Arguments

mets

a list object of source prepended metaboite ids, representing a metabolite set of interest

propertyList

an optional list of specific properties to extract. Options include 'all' (default), 'smiles', 'inchi_key', 'inchi_key_prefix', 'inchi', 'mw', 'monoisotop_mass', 'formula', 'common_name'. If a props list is not supplied, all property fields will be returned.

Value

Returns chemcial property information for the list of input metabolites and a query report reporting on the number of metabolite ids that were matched and the list of un-matched input ids.

The returned object (return_obj below) contains two results. Use str(return_obj) to see the structure described here.

return_obj$chem_props chemical properties for all matched input ids.

return_obj$query_report this reports on the query list size, the number of input ids that were found in the database, and a list of metabolite ids that were not found in the database.

Examples

## Not run: 
# metabolite list of interest
mets = 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')
pkg.globals <- setConnectionToRaMP(dbname="ramp2",username="root",conpass="",host = "localhost")
chemProps <- getChemicalProperties(mets, propertyList = c('iso_smiles', 'inchi_key', 'common_name'))
head(chemProps$chem_props)

## End(Not run)

ncats/RaMP-DB documentation built on Oct. 28, 2023, 8:12 a.m.