Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In the first example, the client has a BED file available on its server (at http://www.clientA.com/data/example1.bed) that it wishes for GREAT to process.

*http://www.clientA.com/data/example1.bed:*

No Format
# SRF example data
chr5    60663738        60663788        SRF.1
chr5    137828954       137829004       SRF.2
chr5    137828665       137828715       SRF.3
chr7    5536799         5536849         SRF.4

...

In the second example, the client has a script (at http://www.clientB.com/data/example2.php) that generates BED data for GREAT to process.

*http://www.clientB.com/data/example2.php:*

Code Block
php
php
<?php
if ($_GET["tf"] == "Srf") {
     echo "chr5    60663738        60663788        SRF.1\n";
     echo "chr5    137828954       137829004       SRF.2\n";
     echo "chr5    137828665       137828715       SRF.3\n";
     echo "chr7    5536799         5536849         SRF.4\n";
   }
else if ($_GET["tf"] == "Nrsf") {
     echo "chr1    11017025        11017401        NRSF.1\n";
     echo "chr6    12605475        12606176        NRSF.2\n";
     echo "chr8    12680375        12681376        NRSF.3\n";
     echo "chr4    13416275        13416776        NRSF.4\n";
   }
?>

...

In the first example, the client has a BED file available on its server (at http://www.clientA.com/data/example1.bed) that it wishes for GREAT to process. The client wants to do further automated processing, and thus wishes to have the GREAT results in a machine-readable tab-separated format.

*http://www.clientA.com/data/example1.bed:*

No Format
# SRF example data
chr5    60663738        60663788        SRF.1
chr5    137828954       137829004       SRF.2
chr5    137828665       137828715       SRF.3
chr7    5536799         5536849         SRF.4

...

The GREAT server currently accepts a maximum of 5 API requests for all API users at any given time. More than 5 requests will be denied. To make the maximum of 5 API calls
you will need to split your jobs and process them separately. A possibly way of processing the data is seen in our greatBatchQuery.py script. Feel free to adapt it to your needs.

How does greatBatchQuery.py work?

  • Create a joblist of the format: outputFile queryURL where each line is a new job
    • EX:
      No Format
      results1.tsv http://great.stanford.edu/public/cgi-bin/greatStart.php?outputType=batch&requestSpecies=hg18&requestName=Example+Data&requestSender=Client+A&requestURL=http%3A%2F%2Fwww.clientA.com%2Fdata%2Fexample1.bed
      results2.tsv http://great.stanford.edu/public/cgi-bin/greatStart.php?outputType=batch&requestSpecies=hg18&requestName=Example+Data&requestSender=Client+A&requestURL=http%3A%2F%2Fwww.clientA.com%2Fdata%2Fexample2.bed
      
  • Then run ./greatBatchQuery.py joblist