Overview

Namespaces

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

Classes

  • Dbxref
  • Interpro_predpeps
  • Mapman
  • Pub
  • Repeatmasker
  • Synonym
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php
 2: 
 3: namespace webservices\details\annotations\feature;
 4: 
 5: use \PDO as PDO;
 6: 
 7: /**
 8:  * Web Service.
 9:  * Returns all Dbxrefs associated with specified feature, grouped by GO namespaces if GO.
10:  */
11: class Dbxref extends \WebService {
12: 
13:     public function getById($param_isoform_id) {
14:         global $db;
15: #UI hint
16:         if (false)
17:             $db = new PDO();
18: 
19:         $query_get_isoform_dbxrefs = <<<EOF
20: SELECT 
21:   DISTINCT ON (cvterm.dbxref_id, cv.cv_id)
22:   db.name AS dbname, dbxref.accession, dbxref.version AS dbversion, cvterm.name AS name, cvterm.definition AS definition, cv.name AS go_namespace 
23: FROM 
24:   feature_dbxref
25:   JOIN dbxref ON (dbxref.dbxref_id = feature_dbxref.dbxref_id)
26:   JOIN db ON (db.db_id = dbxref.db_id)
27:   LEFT JOIN cvterm ON (cvterm.dbxref_id = dbxref.dbxref_id)
28:   LEFT JOIN cv ON (cv.cv_id = cvterm.cv_id)
29: WHERE 
30:   feature_dbxref.feature_id = :isoform_id
31: EOF;
32: 
33:         $stm_get_isoform_dbxrefs = $db->prepare($query_get_isoform_dbxrefs);
34:         $stm_get_isoform_dbxrefs->bindParam('isoform_id', $param_isoform_id);
35: 
36:         $ret = array();
37: 
38:         $stm_get_isoform_dbxrefs->execute();
39:         while ($isoform_dbxref = $stm_get_isoform_dbxrefs->fetch(PDO::FETCH_ASSOC)) {
40:                 $ret[$isoform_dbxref['dbname']][$isoform_dbxref['go_namespace']][] = $isoform_dbxref;
41:         }
42: 
43:         return $ret;
44:     }
45: 
46:     public function execute($querydata) {
47: 
48:         return $this->getById($querydata['query1']);
49:     }
50: 
51: }
52: ?>
53: 
tbro API documentation generated by ApiGen 2.8.0