Skip to content

RESTful API

Dr. Lochana C. Menikarachchi edited this page Jul 14, 2021 · 15 revisions

Table 1. RESTful API Parameters of "structure" Module

Request

Name /rest/structure/searchdb
Description Download chemical structures from databases
Method POST
Header Content-Type: text/plain
Body x-www-form-urlencoded

Parameters

Key Value[a] Description
database chemspider,pubchem, hmdb The database from which structures are downloaded
mass e.g. 100.5400 Exact mass (MIMW) of the compound
adduct M+3H, M+2H+Na, M+H+2Na, M+3Na, M+2H, M+H+NH4, M+H+Na, M+H+K, M+ACN+2HM+2Na, M+2ACN+2HM+3ACN+2HM+H, M+NH4 M+Na M+CH3OH+H, M+K M+ACN+H M+2Na-H, M+IsoProp+HM+ACN+Na, M+2K+H M+DMSO+H, M+2ACN+H, M+IsoProp+Na+H2M+H, 2M+NH4 2M+Na, 2M+3H2O+2H2M+K, 2M+ACN+H 2M+ACN+Na, M-3H,M-2H, M-H2O-HM-H, M+Na-2H, M+Cl M+K-2H, M+FA-H, M+Hac-H M+Br, M+TFA-H 2M-H, 2M+FA-H, 2M+Hac-H, 3M-H Mass adduct type
error e.g. 0.5 Instrumental error of the mass spectrometer
errorUnit Da, ppm, ppb Unit of the instrumental error
fileFormat sdf, zip The format of the response data file
location e.g. C:\Users\lochana\Documents|Directory in which response data files are saved

[a] Possible values or examples are shown as a comma separated list

Table 2. RESTful API Parameters of "prefilter" Module

Request

Name /rest/prefilter/applyPreFilters
Description Remove irrelevant chemical structures from downloaded data
Method POST
Header Content-Type: text/plain
Body x-www-form-urlencoded

Parameters

Key Value[a] Description
inputFilePath e.g. C:\Users\lochana\Documents\sample.sdf File path to downloaded chemical structures file
removeHeavyIsotopes True, False Whether to remove heavy isotopes or not
removeStereoisomers True, False Whether to remove stereoisomers or not
keepCompounds e.g. C, H, O Keep compounds with any of user specified elements
compoundMustContain e.g. N, O Keep compounds if they contain all of user specified elements
eliminateOverallCharges True, False Whether to remove compounds with an overall charge

[a] Possible values or examples are shown as a comma separated list

Table 3. RESTful API Parameters of "filter " Module

Request

Name /rest/filter/applyFilter
Description Filter compounds according to qspr models
Method POST
Header Content-Type: text/plain
Body x-www-form-urlencoded

Parameters

Key Value[a] Description
inputFilePath e.g. C:\Users\lochana\Documents\sample.sdf File path to structure data file
propertyFilePath e.g. C:\Users\lochana\Documents\property.txt File path to property file
propertyName e.g. RI Name of the property
experimentalValue e.g. 258.46 Experimental value of the property
error e.g. 0.90 Error in the measurement

[a] Possible values or examples are shown as a comma separated list

Table 4. RESTful API Parameters of "ms-match" Module

Request

Name /rest/msmatch/runCFMID
Description Spectral matching with CFM-ID
Method POST
Header Content-Type: text/plain
Body x-www-form-urlencoded

Parameters

Key Value[a] Description
inputFilePath e.g. C:\Users\lochana\Documents\sample.sdf File path to structure data file
spectrumFilePath e.g. C:\Users\lochana\Documents\spectrum.txt File path to spectrum file
ppmMassTolerance e.g. 10 Mass tolerance in ppm
absMassTolerance e.g. 0.01 Absolute mass tolerance in Daltons
probabilityThreshold e.g. 0.001 Probability below unlikely fragmentations are pruned
scoreType Jaccard, DotProduct Scoring function for comparing spectra
algorithm cfmid Mass spectra simulator
outputFilePath e.g. C:\Users\lochana\chemid\sample.sdf File path to output file

[a] Possible values or examples are shown as a comma separated list

Table 5. RESTful API Parameters of "id " Module

Request

Name /rest/id/rank
Description Rank candidate compounds according to a composite score
Method POST
Header Content-Type: text/plain
Body x-www-form-urlencoded

Parameters

Key Value[a] Description
inputFilePath e.g. C:\Users\lochana\Documents\sample.sdf File path to structure data file
experimentalRI e.g. 240 Experimental retention index (RI) value
experimentalECOM50 e.g. 5.6 Experimental ECOM50 value
experimentalCCS e.g. 258.46 Experimental collision cross section (CCS) value
cfmIDScore e.g. 0.90 CFM-ID spectral matching score
weightRI e.g. 1.00 User specified RI weight (between 0 to 1)
weightECOM50 e.g. 0.25 User specified ECOM50 weight (between 0 to 1)
weightCCS e.g. 0.50 User specified CCS weight (between 0 to 1)
weightCFMID e.g. 1.00 User specified CFMID weight (between 0 to 1)
keepRI True, False Whether to include RI in the composite score
keepECOM50 True, False Whether to include ECOM50 in the composite score
keepCCS True, False Whether to include CCS in the composite score
keepCFMID True, False Whether to include CFMID in the composite score

[a] Possible values or examples are shown as a comma separated list