Overview

Namespaces

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

Classes

  • Console_CommandLine_Action_ExtendedHelp
  • LightOpenID
  • Log_firebugJSON
  • WebService

Interfaces

  • CLI_Command

Functions

  • acquire_database
  • cli_error_handler
  • connect_queue_db
  • create_job
  • display_feature
  • display_feature_by_id
  • display_isoform_by_id
  • display_unigene_by_id
  • download
  • execute_command
  • execute_job
  • execute_query_dir
  • get_db_connection
  • get_job_results
  • get_program_databases
  • myErrorHandler
  • pdo_connect
  • report_results_cleanup
  • requestVal
  • smarty_function_call_webservice
  • smarty_function_dbxreflink
  • smarty_function_interprolink
  • smarty_function_publink
  • smarty_modifier_clean_id
  • split_fasta
  • unzip
  • Overview
  • Namespace
  • Function
  • Tree
 1: <?php
 2: 
 3: //TODO: http://jqueryui.com/tooltip/#custom-content
 4: function smarty_function_dbxreflink($params, &$smarty) {
 5:     require_once 'TranscriptDB//db.php';
 6:     global $db_urls, $db;
 7:     if (!isset($db_urls))
 8:         $db_urls = array(
 9:             'GO' => 'http://amigo.geneontology.org/cgi-bin/amigo/term_details?term=GO:',
10:             'HMMSmart' => 'http://smart.embl-heidelberg.de/smart/do_annotation.pl?BLAST=DUMMY&DOMAIN=',
11:             'superfamily' => 'http://supfam.cs.bris.ac.uk/SUPERFAMILY/cgi-bin/search.cgi?search_field='
12:         );
13: 
14:     if (!isset($db_urls[$params['dbxref']['dbname']])) {
15:         $stm = $db->prepare('SELECT urlprefix FROM db WHERE name=:dbname');
16:         $stm->bindValue('dbname', $params['dbxref']['dbname']);
17:         $stm->execute();
18:         if (($row = $stm->fetch(PDO::FETCH_ASSOC)) != false) {
19:             $db_urls[$params['dbxref']['dbname']] = $row['urlprefix'];
20:         }
21:         else
22:             $db_urls[$params['dbxref']['dbname']] = '';
23:     }
24:     $description = sprintf('<span class="has-tooltip" data-dbxref="DbxRef|%1$s:%2$s" data-name="Name|%3$s"  data-dbversion="DBVersion|%4$s" data-definition="Definition|%5$s">%1$s:%2$s %3$s</span>'
25:             , $params['dbxref']['dbname']
26:             , $params['dbxref']['accession']
27:             , $params['dbxref']['name']
28:             , !empty($params['dbxref']['dbversion']) ? $params['dbxref']['dbversion'] : ''
29:             , $params['dbxref']['definition']
30:         );
31: 
32:     if ($db_urls[$params['dbxref']['dbname']] == '')
33:         return $description;
34:     else
35:         return sprintf('<a href="%1$s%2$s" target="_blank">%3$s</a>', $db_urls[$params['dbxref']['dbname']], $params['dbxref']['accession'], $description);
36: }
37: 
38: ?>
39: 
tbro API documentation generated by ApiGen 2.8.0