Command Line Access to Structure Database (LMSD)

Introduction | Text/ontology-based search | Structure-based search | Programmatic Access

We provide support for command line data retrieval as CSV, TSV, and SDF files for any search type that can be performed via a web browser. Options are available to control display of column headers, types of delimiters for CSV files (comma or semicolon), and double quoting of values.

Two command line scripts are available to search and retrieve LMSD data: LMSDRecord.php and LMSDSearch.php.

The LMSDRecord.php script supports retrieval of detailed information for a specific lipid with a valid LMID as CSV/TSV or SD file. The LMSDSearch.php is provided to search LMSD using a variety of parameters specified in a user query and retrieve the data for those LMSD records which match the query. The usage details and examples for these two scripts are provided in the following two sections.

If you write a script to automate calls to LMSD, please be kind and do not hit our server more often than once per 20 seconds. We may have to kill scripts that hit our server more frequently.

LMSDRecord.php script

Available parameters

All parameters are case sensitive.

Common parameters to control CSV, TSV, SDF, and MDLMOL output

ParameterPossible valuesDefaultComments
ModeFile or DownloadFileMust be set to eliminate html
OutputTypeTSV, CSV, SDF, MDLMOLMDLMOLTSV=tab separated values
CSV=comma or semicolon separated values
SDF=Structure Data File
MDLMOL=Mol Structure Data File
OutputDelimiterFor TSV: Tab
For CSV: Comma or Semicolon
Comma
OutputQuoteYes,NoNo
OutputColumnHeaderYes,NoYes
Examples:
Please note that the following examples are meant to be typed on one line.

wget -O "LMFA08040013.mol" "http://www.lipidmaps.org/data/LMSDRecord.php?Mode=File&LMID=LMFA08040013"
returns a MDLMOL file for LMID LMFA08040013

wget -O "LMFA08040013.sdf" "http://www.lipidmaps.org/data/LMSDRecord.php?Mode=File&LMID=LMFA08040013&OutputType=SDF"
returns a SDF file for LMID LMFA08040013

wget -O "LMFA08040013.csv" "http://www.lipidmaps.org/data/LMSDRecord.php?Mode=File&LMID=LMFA08040013&OutputType=CSV&OutputQuote=Yes"
returns a CSV file for LMID LMFA08040013 with double quotes around column values

wget -O "LMFA08040013.tsv" "http://www.lipidmaps.org/data/LMSDRecord.php?Mode=File&LMID=LMFA08040013&OutputType=TSV"
returns a TSV file for LMID LMFA08040013

LMSDSearch.php script

Available parameters

All parameters are case sensitive.

Common parameters to control CSV, TSV, and SDF output

ParameterPossible valuesDefaultComments
OutputModeFileFileMust be set to eliminate html
OutputTypeTSV, CSV, SDFTSVTSV=tab separated values
CSV=comma or semicolon separated values
SDF=Structure Data File
OutputDelimiterFor TSV: Tab
For CSV: Comma or Semicolon
Comma
OutputQuoteYes,NoNo
OutputColumnHeaderYes,NoYes

Mode parameter

For command-line data retrieveal, the Mode parameter must be set to one of:

  Mode=ProcessStrSearch
  Mode=ProcessTextSearch
  Mode=ProcessTextOntologySearch

When used with no other parameters, the following will all return the entire LMSD:

wget -O "Test" "http://www.lipidmaps.org/data/structure/LMSDSearch.php?Mode=ProcessStrSearch&OutputMode=File"

wget -O "Test" "http://www.lipidmaps.org/data/structure/LMSDSearch.php?Mode=ProcessStrSearch&OutputMode=File&OutputType=SDF"

wget -O "Test" "http://www.lipidmaps.org/data/structure/LMSDSearch.php?Mode=ProcessStrSearch&OutputMode=File&OutputType=CSV&OutputColumnHeader=Yes"

wget -O "Test" "http://www.lipidmaps.org/data/structure/LMSDSearch.php?Mode=ProcessTextSearch&OutputMode=File"

wget -O "Test" "http://www.lipidmaps.org/data/structure/LMSDSearch.php?Mode=ProcessTextOntologySearch&OutputMode=File"

Optional Parameters for mode=ProcessStrSearch

(Structure-based search)
ParameterPossible valuesExampleDefault
LMIDanyLMSL02000001none
Nameanyaceticnone
FormulaanyC110H202N2O39P2none
SearchTypeSubStructure,ExactMatchExactMatchSubStructure
SMILESStringaNY VAlid SMILES stringc1ccccc1none
Examples:
Please note that the following examples are meant to be typed on one line and that results for these examples may change as more records are added to the database, or if any changes are made to the existing records.

wget -O "Test" "http://www.lipidmaps.org/data/structure/LMSDSearch.php?Mode=ProcessStrSearch&OutputMode=File&LMID=LMSL02000001"

wget -O "Test.tsv" "http://www.lipidmaps.org/data/structure/LMSDSearch.php?Mode=ProcessStrSearch&OutputMode=File&OutputType=TSV&SearchType=SubStructure&SMILESString=c1ccccc1"

Web interfaces for Structure-based searches can be found at:
http://www.lipidmaps.org/data/structure/LMSDSearch.php?Mode=SetupStrSearch

Optional Parameters for Mode=ProcessTextSearch or mode=ProcessTextOntologySearch

(Text-based or Text/ontology -based searches)
ParameterPossible valuesExampleDefault
LMIDany LM_IDLMSL02000001none
Nameany part of any common namefatnone
Formulaany formulaCHO2none
ExactMassany positive number45none
ExactMassOffSetany positive number5none
CoreClass 1=Fatty Acyls [FA]
2=Glycerolipids [GL]
3=Glycerophospholipids [GP]
4=Sphingolipids [SP]
5=Sterol Lipids [ST]
6=Prenol Lipids [PR]
7=Saccharolipids [SL]
8=Polyketides [PK]
1none
MainClasse.g.:
FA10=101
FA11=111
ST05=505
101none
SubClasse.g.:
ST0402=50402
50402none
Examples:
Please note that the following examples are meant to be typed on one line and that results for these examples may change as more records are added to the database, or if any changes are made to the existing records.

wget -O "Test" "http://www.lipidmaps.org/data/structure/LMSDSearch.php?Mode=ProcessTextSearch&OutputMode=File&CoreClass=1"
returns all Fatty acids

wget -O "Test" "http://www.lipidmaps.org/data/structure/LMSDSearch.php?Mode=ProcessTextSearch&OutputMode=File&CoreClass=1&MainClass=101&SubClass=10101"
returns all Straight chain fatty acids [FA0101]

wget -O "Test" "http://www.lipidmaps.org/data/structure/LMSDSearch.php?Mode=ProcessTextOntologySearch&OutputMode=File&CoreClass=1&MainClass=101&SubClass=10101"
returns all Straight chain fatty acids [FA0101]

wget -O "Test" "http://www.lipidmaps.org/data/structure/LMSDSearch.php?Mode=ProcessTextSearch&OutputMode=File&SubClass=10101"
returns all Straight chain fatty acids [FA0101]

wget -O "Test" "http://www.lipidmaps.org/data/structure/LMSDSearch.php?Mode=ProcessTextSearch&OutputMode=File&CoreClass=2&MainClass=202&SubClass=20201&ExactMass=594&ExactMassOffSet=10"
returns all Diacylglycerols [GL0201] with mass between 584.00 and 604.00

wget -O "Test.tsv" "http://www.lipidmaps.org/data/structure/LMSDSearch.php?Mode=ProcessTextSearch&OutputMode=File&OutputType=TSV&OutputQuote=Yes&Name=acetic""
returns all lipids whose common name contains 'acetic', tab-delimited with values quoted

wget -O "Test" "http://www.lipidmaps.org/data/structure/LMSDSearch.php?Mode=ProcessTextSearch&OutputMode=File&CoreClass=1&MainClass=101&SubClass=10101&ExactMass=45&ExactMassOffSet=1&Name=fat"
returns one record: LM_ID=LMFA01010000, Common Name=fatty acid

Additional parameters for ProcessTextOntologySearch mode

Up to four set of triplets - OntologyParamName, OntologyParamModifier, and OntologyParamValue - to control the ontology search. The name of the parameters are generated by appended a integer value from 1 to 4 to each set of the four set of names triplets. For example:
ParameterPossible valuesExampleDefault
OntologyParamName1carbons, doublebonds, triplebonds, rings, OH, NH2, OOH, ketones, epoxides, COOH, methyls, SH, Br, Cl, F, Methylenes, CHO, OMe, OAc, COOMe, Ester, Ethercarbonsnone
OntologyParamModifier1eq, ge, lelenone
OntologyParamValue1any valid number20none
OntologyParamName2carbons, doublebonds, triplebonds, rings, OH, NH2, OOH, ketones, epoxides, COOH, methyls, SH, Br, Cl, F, Methylenes, CHO, OMe, OAc, COOMe, Ester, Ethercarbonsnone
OntologyParamModifier2eq, ge, lelenone
OntologyParamValue2any valid number20none
OntologyParamName3carbons, doublebonds, triplebonds, rings, OH, NH2, OOH, ketones, epoxides, COOH, methyls, SH, Br, Cl, F, Methylenes, CHO, OMe, OAc, COOMe, Ester, Ethercarbonsnone
OntologyParamModifier3eq, ge, lelenone
OntologyParamValue3any valid number20none
OntologyParamName4carbons, doublebonds, triplebonds, rings, OH, NH2, OOH, ketones, epoxides, COOH, methyls, SH, Br, Cl, F, Methylenes, CHO, OMe, OAc, COOMe, Ester, Ethercarbonsnone
OntologyParamModifier4eq, ge, lelenone
OntologyParamValue4any valid number20none
Examples:
Please note that the following examples are meant to be typed on one line and that results for these examples may change as more records are added to the database, or if any changes are made to the existing records.

wget -O "Test" "http://www.lipidmaps.org/data/structure/LMSDSearch.php?Mode=ProcessTextOntologySearch&OutputMode=File&OntologyParamName1=carbons&OntologyParamModifier1=eq&OntologyParamValue1=20&OntologyParamName2=doublebonds&OntologyParamModifier2=eq&OntologyParamValue2=1"
returns a list of mostly fatty acids, with some glycerophospholipids

Web interfaces for Text-based and Text/ontology -based searches can be found at:
http://www.lipidmaps.org/data/structure/LMSDSearch.php?Mode=SetupTextSearch
http://www.lipidmaps.org/data/structure/LMSDSearch.php?Mode=SetupTextOntologySearch
logo LIPID MAPS is funded by a Wellcome Trust.