Overview

Namespaces

  • cli_db
    • propel
      • map
      • om
  • cli_import
  • LoggedPDO
  • None
  • PHP
  • webservices
    • cart
    • combisearch
    • details
      • annotations
        • feature
    • graphs
      • barplot
      • genome
    • listing
    • queue

Classes

  • Job_program_databases
  • Job_results
  • Job_start
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php
 2: 
 3: namespace webservices\queue;
 4: 
 5: require_once 'TranscriptDB/queue.lib.php';
 6: 
 7: class Job_start extends \WebService {
 8: 
 9:     public function execute($querydata) {
10:         $job = $querydata['job'];
11: //decide if we're going to query against a protein or nucleotide database 
12:         $type = ($job['type'] == 'blastp' || $job['type'] == 'tblastn') ? 'prot' : 'nucl';
13:         try {
14: //split our fasta into single independent queries
15:             $queries = split_fasta($job['query'], $type);
16:         } catch (\Exception $e) {
17:             return array('status' => 'error', 'message' => $e->getMessage());
18:         }
19: 
20: 
21: //serializes the additional_data array into a string. this array will be passen into and out of the database for later use
22: //store additional information for your job here
23:         $additional_data = isset($job['additional_data']) ? $job['additional_data'] : array();
24: 
25: //execute job
26:         return create_job($job['type'], $job['database'], $additional_data, $job['parameters'], $queries);
27:     }
28: 
29: }
30: ?>
31: 
32: 
tbro API documentation generated by ApiGen 2.8.0