123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309 |
- <?php if ($picture) {
- print $picture;
- $feature = $node->feature;
- $accession = $node->accession;
- $organism = $node->organism;
- }?>
- <div class="node<?php if ($sticky) { print " sticky"; } ?><?php if (!$status) { print " node-unpublished"; } ?>">
- <?php if ($page == 0) { ?><h2 class="nodeTitle"><a href="<?php print $node_url?>"><?php print $title?></a>
- <?php global $base_url;
- if ($sticky) { print '<img src="'.base_path(). drupal_get_path('theme','sanqreal').'/img/sticky.gif" alt="sticky icon" class="sticky" />'; } ?>
- </h2><?php }; ?>
- <?php if (!$teaser): ?>
- <?php if ($submitted): ?>
- <div class="metanode"><p><?php print t('') .'<span class="author">'. theme('username', $node).'</span>' . t(' - Posted on ') . '<span class="date">'.format_date($node->created, 'custom', "d F Y").'</span>'; ?></p></div>
- <?php endif; ?>
- <!-- theme_tripal_feature_feature_id -->
- <!--<div id="feature_notice"><img src="sites/all/modules/tripal_analysis_blast/images/info-128x128.png"><br><i>Feature information and annotations have moved. See below</i></div>-->
- <div id="feature-view">
- <?php
- if($feature->is_obsolete == 't'){
- drupal_set_message(t('This feature is obsolete and no longer used in analysis, but is here for reference.'));
- }?>
- <table class="tripal_table_vert">
- <tr><th>Name</th><td><?php print $feature->featurename; ?></td></tr>
- <tr><th nowrap>Unique Name</th><td><?php print $feature->uniquename; ?></td></tr>
- <tr><th>Internal ID</th><td><?php print $accession; ?></td></tr>
- <tr><th>Length</th><td><?php print $feature->seqlen ?></td></tr>
- <tr><th>Type</th><td><?php print $feature->cvname; ?></td>
- </tr>
- <tr><th>Organism</th><td>
- <?php
- if ($node->org_nid) {
- print"<a href=\"". url("node/$node->org_nid") ."\">$organism->genus $organism->species ($organism->common_name)</a>";
- } else {
- print"$organism->genus $organism->species ($organism->common_name)";
- }
- ?>
- </td>
- </tr>
-
- <!-- Add library information which this feature belongs to-->
- <?php if ($node->lib_additions) { ?>
- <tr><th>Library</th><td>
- <?php
- $libraries = $node->lib_additions;
- foreach ($libraries as $lib_url => $lib_name) {
- // Check if library exists as a node in drupal
- if ($lib_url) {
- ?>
- <a href="<?php print $lib_url?>"><?php print $lib_name?></a><BR>
- <?php
- } else {
- print $lib_name;
- }
- }
- ?>
- </td></tr>
- <?php } ?>
- <!-- End of library addition -->
-
- <!-- theme_tripal_feature_feature_synonyms -->
- <?php
- $synonyms = $node->synonyms;
- if(count($synonyms) > 0){
- ?>
- <tr><th>Synonyms</th><td>
- <?php
- // iterate through each synonym
- if (is_array($synonyms)) {
- foreach ($synonyms as $result){
- print $result->name."<br>";
- }
- } else {
- print $synonyms;
- }
- ?>
- </td></tr>
- <?php } ?>
- <!-- End of theme_tripal_feature_feature_synonyms -->
- </table>
- </div>
- <!-- End of theme_tripal_feature_feature_id -->
- <?php endif; ?>
- <div class="content">
- <?php if (!$teaser): ?>
- <!-- Control link for the expandableBoxes -->
- <br><a id="tripal_expandableBox_toggle_button" onClick="toggleExpandableBoxes()">[-] Collapse All</a><br><br>
- <!-- End of Control link for the expandableBoxes -->
- <!-- Start of sequences -->
- <div id="feature-sequence" class="tripal_feature-info-box">
- <div class="tripal_expandableBox"><h3>Sequence</h3></div>
- <div class="tripal_expandableBoxContent">
- <?php print $feature->cvname; ?> sequence
- <pre id="tripal_feature-sequence"><?php
- if($feature->residues){
- print ereg_replace("(.{100})","\\1<br>",$feature->residues);
- } else {
- print "sequence currently not available";
- }
- ?></pre>
- </div></div>
- <!-- End of sequences -->
- <!-- Start of theme_tripal_feature_feature_references -->
- <?php
- $references = $node->references;
- if(count($references) > 0){
- ?>
- <div id="feature-references" class="tripal_feature-info-box">
- <div class="tripal_expandableBox"><h3>References</h3></div>
- <div class="tripal_expandableBoxContent">
- <table class="tripal_feature-references-table">
- <tr>
- <th>Dababase</th>
- <th>Accession</th>
- </tr>
- <?php
- foreach ($references as $result){
- ?>
- <tr>
- <td><?php print $result->db_name?></td>
- <td><?php if($result->urlprefix){ ?><a href="<?php print $result->urlprefix.$result->accession?>"><?php print $result->accession?></a><?php } else { print $result->accession; } ?></td>
- </tr>
- <?php } ?>
- </table></div></div>
- <?php } ?>
- <!-- End of theme_tripal_feature_feature_references -->
- <!-- Start of theme_tripal_feature_feature_featurelocs -->
- <?php
- $featurelocs = $node->featurelocs;
- if(count($featurelocs) > 0){
- ?>
- <div id="feature-featurelocs" class="tripal_feature-info-box">
- <div class="tripal_expandableBox"><h3>Locations</h3></div>
- <div class="tripal_expandableBoxContent">
- <table class="tripal_feature-locations-table">
- <tr>
- <th>Feature</th>
- <th>Type</th>
- <th>Position</th>
- <th>Phase</th>
- <th>Strand</th>
- </tr>
- <?php foreach ($featurelocs as $index => $loc){ ?>
- <tr>
- <td><?php print $loc->name ?></td>
- <td><?php print $loc->cvname ?></td>
- <td><?php print $loc->fmin . ".." . $loc->fmax ?></td>
- <td><?php print $loc->phase ?></td>
- <td><?php print $loc->strand ?></td>
- </tr>
- <?php } ?>
- </table></div></div>
- <?php } ?>
- <!-- End of theme_tripal_feature_feature_references -->
- <!-- Start of theme_tripal_feature_feature_myfeaturelocs -->
- <?php
- $myfeaturelocs = $node->myfeaturelocs;
- if(count($myfeaturelocs) > 0){
- ?>
- <div id="feature-myfeaturelocs" class="tripal_feature-info-box">
- <div class="tripal_expandableBox"><h3>Features Located on <?php print $feature->featurename;?></h3></div>
- <div class="tripal_expandableBoxContent">
- <table>
- <tr>
- <th>Feature</th>
- <th>Type</th>
- <th>Position</th>
- <th>Phase</th>
- <th>Strand</th>
- </tr>
- <?php foreach ($myfeaturelocs as $index => $loc){ ?>
- <tr>
- <td><?php print $loc->name ?></td>
- <td><?php print $loc->cvname ?></td>
- <td><?php print $loc->fmin . ".." . $loc->fmax ?></td>
- <td><?php print $loc->phase ?></td>
- <td><?php print $loc->strand ?></td>
- </tr>
- <?php } ?>
- </table></div></div>
- <?php } ?>
- <!-- End of theme_tripal_feature_feature_references -->
- <!-- Start of theme_tripal_feature_feature_relationships -->
- <?php
- print "<div id=\"feature-srelationships\" class=\"tripal_feature-info-box\">";
- print "<div class=\"tripal_expandableBox\"><h3>Relationships</h3></div>";
- print "<div class=\"tripal_expandableBoxContent\">";
- $srelationships = $node->subject_relationships;
- if(count($srelationships) > 0){
- print "<b>Subject Relationships</b><br>";
- print "
- <table class=\"tripal_feature-relationships-subject-table\">
- <tr>
- <th>Relationship</th>
- <th>Feature</th>
- <th>Type</th>
- </tr>
- ";
- foreach ($srelationships as $result){
- print "<tr>";
- print "<td><b>$result->rel_type</b></td>";
- print "<td>";
- if(isset($result->object_nid)){
- print "<a href=\"" . url("node/$result->object_nid") . "\">$result->object_name</a> ";
- } else {
- print "$result->object_name ";
- }
- print "</td>";
- print "<td>$result->object_type</td>";
- }
- print "</table><br>";
- }
- ?>
- <!-- End of theme_tripal_feature_feature_relationships -->
- <!-- Start of theme_tripal_feature_feature_relationships -->
- <?php
- $orelationships = $node->object_relationships;
- $other_seqs = array();
- if(count($orelationships) > 0){
- print "<b>Object Relationships</b><br>";
- print "
- <table class=\"tripal_feature-relationships-object-table\">
- <tr>
- <th>Feature</th>
- <th>Type</th>
- <th>Relationship</th>
- <th>Position</th>
- </tr>
- ";
- foreach ($orelationships as $result){
- $subject_name = $result->subject_uniquename;
- if($result->subject_name) {
- $subject_name = $result->subject_name;
- }
- print "<tr>";
- print "<td>";
- if(isset($result->subject_nid)){
- print "<a href=\"" . url("node/$result->subject_nid") . "\">$result->subject_name ($result->subject_type)</a> ";
- } else {
- print "$subject_name";
- }
- print "</td>";
- print "<td>$result->subject_type</td>";
- print "<td><b>$result->rel_type</b></td>";
- if($result->src_name){
- print "<td>$result->src_name ($result->src_cvname):$result->fmin $result->fmax</td>";
- } else {
- print "<td></td>";
- }
- print "</tr>";
- // anything with a src_name does not have a location on a
- // reference sequence, so let's keep track of those and print
- // the sequences later. Those that are located elsewhere
- // will get printed separately.
- if(!$result->src_name){
- $other_seqs[]=$result;
- }
- }
- print "</table>";
-
- // print the sequences for those that are located on a references
- // sequence
- $rel_info = $node->relationship_object_info;
- foreach($rel_info as $index => $info){
- if($info->source){
- print "<br><b>Sequence Context:</b><br>";
- print "$info->source:$info->fmin..$info->fmax<br>";
- print $info->residues;
- }
- }
- // now print any remaining sequences
- foreach($other_seqs as $i => $rel){
- print "<br><b>$rel->subject_type sequence</b>";
- print "<pre id=\"tripal_feature-sequence\">";
- print ereg_replace("(.{100})","\\1<br>",$rel->subject_residues);
- print "</pre>";
- }
- print "</div></div>";
- }
- ?>
- <!-- End of theme_tripal_feature_feature_relationships -->
-
- <?php endif; ?>
- <?php print $content?>
- </div>
-
- <?php if (!$teaser): ?>
- <?php if ($links) { ?><div class="links"><?php print $links?></div><?php }; ?>
- <?php endif; ?>
- <?php if ($teaser): ?>
- <?php if ($links) { ?><div class="linksteaser"><div class="links"><?php print $links?></div></div><?php }; ?>
- <?php endif; ?>
- <?php if (!$teaser): ?>
- <?php if ($terms) { ?><div class="taxonomy"><span><?php print t('tags') ?></span> <?php print $terms?></div><?php } ?>
- <?php endif; ?>
- </div>
|