Command Line Access to Structure Database (LMSD)
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.
LMSDRecord.php script
Available parameters
All parameters are case sensitive.
Common parameters to control CSV, TSV, SDF, and MDLMOL output
Parameter | Possible values | Default | Comments |
---|---|---|---|
Mode | File or Download | File | Must be set to eliminate html |
OutputType | TSV, CSV, SDF, MDLMOL | MDLMOL |
TSV=tab separated values CSV=comma or semicolon separated values SDF=Structure Data File MDLMOL=Mol Structure Data File |
OutputDelimiter |
For TSV: Tab For CSV: Comma or Semicolon |
Comma | |
OutputQuote | Yes,No | No | |
OutputColumnHeader | Yes,No | Yes |
Examples
Note: Updated URLs October 2021
Please note that the following examples are meant to be typed on one line.
wget -O "LMFA08040013.mol" "https://www.lipidmaps.org/databases/lmsd/LMFA08040013?format=mdlmol"
returns a MDLMOL file for LMID LMFA08040013
wget -O "LMFA08040013.sdf" "https://www.lipidmaps.org/databases/lmsd/LMFA08040013?format=sdf"
returns a SDF file for LMID LMFA08040013
wget -O "LMFA08040013.csv" "https://www.lipidmaps.org/databases/lmsd/LMFA08040013?format=csv"
returns a CSV file for LMID LMFA08040013 with double quotes around column values
wget -O "LMFA08040013.tsv" "https://www.lipidmaps.org/databases/lmsd/LMFA08040013?format=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
Parameter | Possible values | Default | Comments |
---|---|---|---|
OutputMode | File | File | Must be set to eliminate html |
OutputType | TSV, CSV, SDF | TSV |
TSV=tab separated values CSV=comma or semicolon separated values SDF=Structure Data File |
OutputDelimiter |
For TSV: Tab For CSV: Comma or Semicolon |
Comma | |
OutputQuote | Yes,No | No | |
OutputColumnHeader | Yes,No | Yes |
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)
Parameter | Possible values | Example | Default |
---|---|---|---|
LMID | any | LMSL02000001 | none |
Name | any | acetic | none |
Formula | any | C110H202N2O39P2 | none |
SearchType | SubStructure,ExactMatch | ExactMatch | SubStructure |
SMILESString | aNY VAlid SMILES string | c1ccccc1 | none |
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)
Parameter | Possible values | Example | Default |
---|---|---|---|
LMID | any LM_ID | LMSL02000001 | none |
Name | any part of any common name | fat | none |
Formula | any formula | CHO2 | none |
ExactMass | any positive number | 45 | none |
ExactMassOffSet | any positive number | 5 | none |
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] |
1 | none |
MainClass |
e.g.: FA10=101 FA11=111 ST05=505 |
101 | none |
SubClass |
e.g.: ST0402=50402 |
50402 | none |
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:
Parameter | Possible values | Example | Default |
---|---|---|---|
OntologyParamName1 | carbons, doublebonds, triplebonds, rings, OH, NH2, OOH, ketones, epoxides, COOH, methyls, SH, Br, Cl, F, Methylenes, CHO, OMe, OAc, COOMe, Ester, Ether | carbons | none |
OntologyParamModifier1 | eq, ge, le | le | none |
OntologyParamValue1 | any valid number | 20 | none |
OntologyParamName2 | carbons, doublebonds, triplebonds, rings, OH, NH2, OOH, ketones, epoxides, COOH, methyls, SH, Br, Cl, F, Methylenes, CHO, OMe, OAc, COOMe, Ester, Ether | carbons | none |
OntologyParamModifier2 | eq, ge, le | le | none |
OntologyParamValue2 | any valid number | 20 | none |
OntologyParamName3 | carbons, doublebonds, triplebonds, rings, OH, NH2, OOH, ketones, epoxides, COOH, methyls, SH, Br, Cl, F, Methylenes, CHO, OMe, OAc, COOMe, Ester, Ether | carbons | none |
OntologyParamModifier3 | eq, ge, le | le | none |
OntologyParamValue3 | any valid number | 20 | none |
OntologyParamName4 | carbons, doublebonds, triplebonds, rings, OH, NH2, OOH, ketones, epoxides, COOH, methyls, SH, Br, Cl, F, Methylenes, CHO, OMe, OAc, COOMe, Ester, Ether | carbons | none |
OntologyParamModifier4 | eq, ge, le | le | none |
OntologyParamValue4 | any valid number | 20 | none |
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