Web Service
It is possible to access some of the LRG information programatically via the XML-RPC protocol. This enables methods to be called on a remote server and the result to be returned to the client over HTTP. Parameters and return values are encoded using XML. For detailed instructions on how to communicate via the XML-RPC protocol, please refer to e.g. online tutorials.
The methods exposed by the service can be viewed by calling system.listMethods without any arguments. The method signature and a brief description can be obtained by calling system.methodSignature and system.methodHelp with the name of the method as parameter.
In order to use the web service, you need to first request an authentication key by sending an email to help@lrg-sequence.org. The obtained authentication key must be passed as the first argument to all methods. The URL of the LRG web service is http://www.lrg-sequence.org/xmlrpc.php.
Below is a description of the methods available from the LRG web service (lrg_service.<Method>):
|
Method |
Description | Input arguments | Return type |
|---|---|---|---|
| getCoordinates NEW! | Returns the genomic coordinates of the supplied LRG identifiers |
<string> Authentication key |
<string> in text format "chromosome:start:end:strand" OR <string> in JSON format |
| getPublic | Returns the LRG identifiers for published LRG records | <string> Authentication key | <array> |
| getPending | Returns the LRG identifiers for pending LRG records | <string> Authentication key | <array> |
| getStatus NEW! | Returns the status of a specified LRG id, e.g. public, pending | <string> Authentication key <string> LRG id |
<string> |
| getLRGId | Returns LRG identifier(s) (if available) for an array of supplied HGNC symbols |
<string> Authentication key |
<struct> |
| getLRGIdFromXref NEW! | Returns LRG identifier(s) (if available) for an array of supplied synonym symbols and/or external reference identifiers. |
<string> Authentication key |
<struct> |
| getSymbol | Returns HGNC symbols (if available) for an array of supplied LRG identifiers |
<string> Authentication key |
<struct> |
| getReferenceTranscriptSource | Returns the LRG transcript(s) of the specified LRG id and the accession of the source transcript that it was based on when created, typically a RefSeq identifier |
<string> Authentication key |
<struct> |
| getMapping | Returns the mapping of the supplied LRG id to the specified genome assembly |
<string> Authentication key |
<struct> |
| getReferenceSequence | Returns the genomic LRG sequence for a specified LRG id |
<string> Authentication key |
<string> |
| getReferenceAllele | Returns the LRG reference allele for the supplied LRG identifier and (1-based) start and end coordinates |
<string> Authentication key |
<string> |
| getcDNA | Returns the cDNA sequence for a specified LRG id and transcript |
<string> Authentication key |
<string> |
| getCDS | Returns the CDS for a specified LRG id and transcript |
<string> Authentication key |
<string> |
| getTranslation | Returns the translated peptide sequence for a specified LRG id and transcript |
<string> Authentication key |
<string> |
Example
For example, the XML request to get the LRG identifier corresponding to the gene with HGNC symbol COL1A1 is:
<methodCall>
<methodName>lrg_service.getLRGId</methodName>
<params>
<param><value><string>***********************</string></value></param>
<param><array><data><value><string>COL1A1</string></value></data></array></param>
</params>
</methodCall>
And the corresponding response is:
<methodResponse>
<params>
<param>
<value><struct>
<member>
<name>COL1A1</name>
<value><array><data><value><string>LRG_1</string></value></data></array></value>
</member>
</struct></value>
</param>
</params>
</methodResponse>
Client libraries for the XML-RPC protocol exist for a wide range of programming languages. A more extensive example of some calls using the web service functionality via the XML_RPC2 PHP client can be found here and the typical output from the example can be viewed here.



