RNA CoSSMos API FAQ
RNA CoSSMos offers an HTTP-based API interface for developers to easily pass queries to the database so that downstream processing applications can easily acquire database data without having to worry about navigation via GUI.
This API uses specialized parameters, placed in the GET variables of a URL (i.e., after the "?" in http://cossmos.slu.edu/api.php?parameters...) to query the database and output motif data that is readily parseable in any language.
The RNA CoSSMos API may be access by directing an HTTP request to http://cossmos.slu.edu/api.php. Parameters are passed to the API interface using GET variables. For instance, to get all 1x1 symmetrical mismatches under PDB identifier 157D, one would query http://cossmos.slu.edu/api.php?motif=1x1&pdbid=157D. However, queries are not limited to PDB IDs, and in fact any search parameter available on the default search page may be used. The syntax of these parameters, and any caveats, are enumerated below.
API Query Parameters and Syntax
Contained in the table below are all the parameters that the API will accept in the URL query. Each additional parameter after the first should be preceded by a "&" symbol. For instance, a two parameter query would look like: http://cossmos.slu.edu/api.php?param1=value1¶m2=value2. When a parameter is not specified, it is defaulted to not affect the search results at all.
|Parameter||Syntax and Description|
|pdbid||PDB ID Number. This should be in the form of XXXX, where X is an alphanumeric character.|
|5to3seq||The sequence for the "top" (5' to 3') strand. This is the only parameter needed for hairpin queries. Accepts the same nucleotides and wildcards that the graphical search does.|
|3to5seq||The sequence for the "bottom" (3' to 5') strand. This parameter has NO effect on hairpin searches. Accepts the same nucleotides wildcards that the graphical search does.|
|author||Name of author(s) on the structure's accompanying publication.|
|keywords||Keywords placed in the header of the PDB file in which the motif is found.|
|source||Source of the RNA studied in which the motif is found (organism, synthetic RNA, etc.)|
|exp_method|| Experimental method used for structure determination. Needs to be one of three valid parameters:
1 for x-ray crystallography 2 for cryo-electron microscopy 3 for NMR
|exp_high||Upper limit of resolution (x-ray) or number of structures (NMR). Only works if exp_method parameter is used as well. Should be a positive integer (NMR) or real number (x-ray).|
|exp_low||Lower limit of resolution (x-ray) or number of structures (NMR). Only works if exp_method parameter is used as well. Should be a positive integer (NMR) or real number (x-ray).|
|delim||Specifies the delimeter used to separate fields in the database output. Argument must be an ASCII character code (see http://www.asciitable.com/) ranging from 1 to 255. Default character is "#"|
|line_delim||Specifies the delimeter used to separate lines in the database output. Argument must be an ASCII character code (see http://www.asciitable.com/) ranging from 1 to 255. Default is "\n" (new line escape sequence).|
|suppress||This parameter, if set to 1, will suppress header output as well as any warnings that may be thrown. Use this only if you are 100% sure your query will work.|
Please note that any search query errors that are due to syntax may not be caught by the API and will instead return an apparently all-normal null results set. If this is the case, please carefully check your query for syntax validity.