next up previous contents index
Next: 3.2 Get: Retrieves Results Up: 3 Quick Start Previous: 3 Quick Start   Contents   Index


3.1 Put: Pushes A Search Request With Custom Settings Into splitd

Let's say we want to perform a search with a nucleotide query sequence already present within the NCBI database, whose accession is NM_000240. We want to search using blastn againt the nucleotide database nr. In addition, we need to enable low-complexity filtering, set the Expect value cutoff to 0.01, request the output in HTML format, display NCBI GI numbers in the output, and show only the first 10 hits. Using lynx (a text mode web broswer available on most Unix or Linux systems), the URL for the first 'Put' step will look like the following (-source switch in lynx displays the HTML source of the complete result):

bash-2.06$ lynx -source \

'http://www.ncbi.nlm.nih.gov/blast/Blast.cgi?QUERY=NM_000240\

&DATABASE=nr&PROGRAM=blastn&FILTER=L&EXPECT=0.01\

&FORMAT_TYPE=HTML&NCBI_GI=on&HITLIST_SIZE=10&CMD=Put'

Note that we have continued long lines using back slashes (\) as allowed using the Unix or Linux 'sh' commandline shell program. Portion within the quotes (minus the back slashes) is the actual URL. One can also choose to do this using other scripting tools such as Perl, Python, Java, or other commercial packages.

In the 'url-encoded' format, the '?' marks the start of a list of parameters, which is followed by a list of ampersand (&) separated 'parameter=value' pairs. The names of parameters are generally self-explanatory, and they are also explained in more detail in the Parameters section below (5). We set 'CMD=Put', which means that we want to put this new search into splitd. In the example, we use an accession as query. We can also specify a query sequence in FASTA or plain sequence format, which will require the escaping of special characters, see 8.3).

The output of the 'Put' command will be a valid HTML page, the contents of which may be ignored except for the following important section:

<!-QBlastInfoBegin

RID = 6ZXJ7X1P014

RTOE = 20

QBlastInfoEnd

->

This portion of the output is special and contains the RID and the estimated 'Request Time of Execution' (RTOE) for the search, given in seconds. The RID uniquely identifies each individual search and is valid for 36 hours. It is a mandatory parameter for the second 'Get' or formatting step.

Caution: if the search URL was not constructed correctly or there are other server related errors, the result will deviate from the above. Automated search scripts should check for errors (8.2). Also note that the format of RID has changed. One should treat it as a string token rather than parsing it literally.


next up previous contents index
Next: 3.2 Get: Retrieves Results Up: 3 Quick Start Previous: 3 Quick Start   Contents   Index
Tao Tao 2007-08-03