tripal_organism_unigenes.tpl.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. $node = $variables['node'];
  3. $organism = $node->organism;
  4. $unigenes = $organism->tripal_analysis_unigene->unigenes;
  5. //dpm($unigenes);
  6. ?>
  7. <div id="tripal_organism-unigenes-box" class="tripal_feature-info-box tripal-info-box">
  8. <div class="tripal_feature-info-box-title tripal-info-box-title">Unigenes</div>
  9. <div class="tripal_feature-info-box-desc tripal-info-box-desc">Below is a list of unigenes available for <i><?php print $organism->genus ?> <?php print $organism->species ?></i>. Click the unigene name for further details.</div>
  10. <?php if(count($unigenes) > 0){ ?>
  11. <table id="tripal_organism-unigenes-table" class="tripal_feature-table tripal-table tripal-table-horz">
  12. <tr>
  13. <th>Unigene Name</th>
  14. <th>Analysis Name</th>
  15. <th>Date Constructed</th>
  16. <th>Stats</th>
  17. </tr>
  18. <?php
  19. $i = 0;
  20. foreach ($unigenes as $unigene){
  21. $class = 'tripal-table-odd-row';
  22. if($i % 2 == 0 ){
  23. $class = 'tripal-table-even-row';
  24. }
  25. ?>
  26. <tr class="<?php print $class ?>">
  27. <td>
  28. <?php
  29. if($unigene->nid){
  30. print "<a href=\"".url("node/$unigene->nid")."\">$unigene->unigene_name</a>";
  31. } else {
  32. print $unigene->unigene_name;
  33. }?>
  34. </td>
  35. <td><?php print $unigene->name; ?></td>
  36. <td><?php print preg_replace("/^(\d+-\d+-\d+) .*/","$1",$unigene->timeexecuted); ?></td>
  37. <td nowrap>
  38. <?php if($unigene->num_reads){print "Reads: $unigene->num_reads<br>";} ?>
  39. <?php if($unigene->num_clusters){print "Clusters: $unigene->num_clusters<br>";} ?>
  40. <?php if($unigene->num_contigs){print "Contigs: $unigene->num_contigs<br>";} ?>
  41. <?php if($unigene->num_singlets){print "Singlets: $unigene->num_singlets<br>";} ?>
  42. </td>
  43. </tr>
  44. <?php
  45. $i++;
  46. } ?>
  47. </table>
  48. <?php } else { ?>
  49. <div class="tripal-no-results">There are no unigenes for this organism</div>
  50. <?php }?>
  51. </div>