advanced_batch_search {cmmr} | R Documentation |
Encapsulation of CEU Mass Mediator advanced batch search API.
Description
advanced_batch_search
returns the body string of a POST request.
using the following code to install the dependencies:
install.packages(c("httr", "progress", "RJSONIO"))
Usage
advanced_batch_search(cmm_url = paste0("http://ceumass.eps.uspceu.es/mediator/api/v3/",
"advancedbatch"), chemical_alphabet = "all", modifiers_type = "none",
metabolites_type = "all-except-peptides", databases = "[\"hmdb\"]",
masses_mode = "mz", ion_mode = "positive", adducts = "[\"all\"]",
deuterium = "false", tolerance = "7.5", tolerance_mode = "ppm",
masses = "[400.3432, 288.2174]", all_masses = "[]",
retention_times = "[18.842525, 4.021555]",
all_retention_times = "[]",
composite_spectra = paste0("[[{ \"mz\": 400.3432, \"intensity\": 307034.88 }, ",
"{ \"mz\": 311.20145, \"intensity\": 400.03336 }]]"))
Arguments
cmm_url |
'http://ceumass.eps.uspceu.es/mediator/api/v3/advancedbatch' or your local one |
chemical_alphabet |
"CHNOPS", "CHNOPSCL", "ALL" |
modifiers_type |
"none", "NH3", "HCOO", "CH3COO", "HCOONH3", "CH3COONH3" |
metabolites_type |
"all-except-peptides", "only-lipids", "all-including-peptides" |
databases |
"all", "all-except-mine", "HMDB", "LipidMaps", "Metlin", "Kegg", "in-house", "mine" |
masses_mode |
"neutral", "mz" |
ion_mode |
"positive", "negative" |
adducts |
for positive mode ["M+H", "M+2H", "M+Na", "M+K", "M+NH4", "M+H-H2O"] for negative mode ["M-H", "M+Cl", "M+FA-H", "M-H-H2O"], for neutral ["M"] |
deuterium |
boolean 'true' 'false' |
tolerance |
double (Range: [0..100]) |
tolerance_mode |
"ppm", "mDa" |
masses |
double |
all_masses |
array of doubles |
retention_times |
double |
all_retention_times |
array of doubles |
composite_spectra |
array of arrays of spectra_object |
Value
If all inputs are all correctly formatted, a dataframe will be returned for the result.
Author(s)
Yaoxiang Li yl814@georgetown.edu
Georgetown University, USA
License: GPL (>= 3)
Examples
df <- advanced_batch_search(
cmm_url = paste0(
'http://ceumass.eps.uspceu.es/mediator/api/v3/',
'advancedbatch'),
chemical_alphabet = 'all',
modifiers_type = 'none',
metabolites_type = 'all-except-peptides',
databases = '["hmdb"]',
masses_mode = 'mz',
ion_mode = 'positive',
adducts = '["all"]',
deuterium = 'false',
tolerance = '7.5',
tolerance_mode = 'ppm',
masses = '[400.3432, 288.2174]',
all_masses = '[]',
retention_times = '[18.842525, 4.021555]',
all_retention_times = '[]',
composite_spectra = paste0(
'[[{ "mz": 400.3432, "intensity": 307034.88 }, ',
'{ "mz": 311.20145, "intensity": 400.03336 }]]'
))