tripal_feature_sequence.tpl.php 961 B

12345678910111213141516171819202122
  1. <?php
  2. $feature = $variables['node']->feature;
  3. // add the residues to the feature object. Fields of type 'text' in Chado
  4. // are not automatically added, so we must add them manually
  5. $feature = tripal_core_expand_chado_vars($feature,'field','feature.residues');
  6. ?>
  7. <div id="tripal_feature-sequence-box" class="tripal_feature-info-box tripal-info-box">
  8. <div class="tripal_feature-info-box-title tripal-info-box-title"><?php print $feature->type_id->name ?> Sequence</div>
  9. <div class="tripal_feature-info-box-desc tripal-info-box-desc">The sequence for this <?php print $feature->type_id->name; ?> </div>
  10. <?php
  11. if($feature->residues){ ?>
  12. <pre id="tripal_feature-sequence-residues"><?php
  13. // format the sequence to break ever 100 residues
  14. print ereg_replace("(.{60})","\\1<br>",$feature->residues); ?>
  15. </pre> <?php
  16. } else {
  17. print '<div class="tripal-no-results">The sequence is currently not available</div>';
  18. } ?>
  19. </div>