|
@@ -1,36 +1,28 @@
|
|
<?php
|
|
<?php
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* Display the results of a BLAST job execution
|
|
* Display the results of a BLAST job execution
|
|
- *
|
|
|
|
- * Variables Available in this template:
|
|
|
|
- * $xml_filename: The full path & filename of XML file containing the BLAST results
|
|
|
|
- * @deepaksomanadh: $job_data = meta data related to the current job
|
|
|
|
*/
|
|
*/
|
|
-
|
|
|
|
-// uncomment this to see the contents of the $blastdb object
|
|
|
|
-//echo "blastdb:<pre>";var_dump($blastdb);echo "</pre>";
|
|
|
|
|
|
|
|
// Set ourselves up to do link-out if our blast database is configured to do so.
|
|
// Set ourselves up to do link-out if our blast database is configured to do so.
|
|
$linkout = FALSE;
|
|
$linkout = FALSE;
|
|
-
|
|
|
|
-if ($blastdb->linkout->none === FALSE) {
|
|
|
|
- $linkout_type = $blastdb->linkout->type;
|
|
|
|
- $linkout_regex = $blastdb->linkout->regex;
|
|
|
|
|
|
+if ($blast_job->blastdb->linkout->none === FALSE) {
|
|
|
|
+ $linkout_type = $blast_job->blastdb->linkout->type;
|
|
|
|
+ $linkout_regex = $blast_job->blastdb->linkout->regex;
|
|
|
|
|
|
// Note that URL prefix is not required if linkout type is 'custom'
|
|
// Note that URL prefix is not required if linkout type is 'custom'
|
|
- if (isset($blastdb->linkout->db_id->urlprefix) && !empty($blastdb->linkout->db_id->urlprefix)) {
|
|
|
|
- $linkout_urlprefix = $blastdb->linkout->db_id->urlprefix;
|
|
|
|
|
|
+ if (isset($blast_job->blastdb->linkout->db_id->urlprefix) && !empty($blast_job->blastdb->linkout->db_id->urlprefix)) {
|
|
|
|
+ $linkout_urlprefix = $blast_job->blastdb->linkout->db_id->urlprefix;
|
|
}
|
|
}
|
|
|
|
|
|
// Check that we can determine the linkout URL.
|
|
// Check that we can determine the linkout URL.
|
|
// (ie: that the function specified to do so, exists).
|
|
// (ie: that the function specified to do so, exists).
|
|
- if (function_exists($blastdb->linkout->url_function)) {
|
|
|
|
- $url_function = $blastdb->linkout->url_function;
|
|
|
|
|
|
+ if (function_exists($blast_job->blastdb->linkout->url_function)) {
|
|
|
|
+ $url_function = $blast_job->blastdb->linkout->url_function;
|
|
$linkout = TRUE;
|
|
$linkout = TRUE;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
// Handle no hits. This following array will hold the names of all query
|
|
// Handle no hits. This following array will hold the names of all query
|
|
// sequences which didn't have any hits.
|
|
// sequences which didn't have any hits.
|
|
$query_with_no_hits = array();
|
|
$query_with_no_hits = array();
|
|
@@ -42,12 +34,6 @@ $no_hits = TRUE;
|
|
?>
|
|
?>
|
|
|
|
|
|
<script type="text/javascript">
|
|
<script type="text/javascript">
|
|
- window.onload = function() {
|
|
|
|
- if (!window.location.hash) {
|
|
|
|
- window.location = window.location + '#loaded';
|
|
|
|
- window.location.reload();
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
|
|
// JQuery controlling display of the alignment information (hidden by default)
|
|
// JQuery controlling display of the alignment information (hidden by default)
|
|
$(document).ready(function(){
|
|
$(document).ready(function(){
|
|
@@ -80,20 +66,20 @@ $no_hits = TRUE;
|
|
<div class="blast-job-info">
|
|
<div class="blast-job-info">
|
|
<?php if($xml): ?>
|
|
<?php if($xml): ?>
|
|
<div class="blast-download-info"><strong>Download</strong>:
|
|
<div class="blast-download-info"><strong>Download</strong>:
|
|
- <a href="<?php print '../../' . $html_filename; ?>">Alignment</a>,
|
|
|
|
- <a href="<?php print '../../' . $tsv_filename; ?>">Tab-Delimited</a>,
|
|
|
|
- <a href="<?php print '../../' . $xml_filename; ?>">XML</a>
|
|
|
|
|
|
+ <a href="<?php print '../../' . $blast_job->files->result->html; ?>">Alignment</a>,
|
|
|
|
+ <a href="<?php print '../../' . $blast_job->files->result->tsv; ?>">Tab-Delimited</a>,
|
|
|
|
+ <a href="<?php print '../../' . $blast_job->files->result->xml; ?>">XML</a>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
<br />
|
|
<br />
|
|
<div class="blast-query-info"><strong>Query Information</strong>:
|
|
<div class="blast-query-info"><strong>Query Information</strong>:
|
|
- <?php print $blast_job->display['query_info'];?></div>
|
|
|
|
|
|
+ <?php print $blast_job->files->query;?></div>
|
|
<div class="blast-target-info"><strong>Search Target</strong>:
|
|
<div class="blast-target-info"><strong>Search Target</strong>:
|
|
- <?php print $blast_job->display['target'];?></div>
|
|
|
|
|
|
+ <?php print $blast_job->blastdb->db_name;?></div>
|
|
<div class="blast-date-info"><strong>Submission Date</strong>:
|
|
<div class="blast-date-info"><strong>Submission Date</strong>:
|
|
- <?php print $blast_job->display['date'];?></div>
|
|
|
|
|
|
+ <?php print format_date($blast_job->date_submitted, 'medium');?></div>
|
|
<div class="blast-cmd-info"><strong>BLAST Command executed</strong>:
|
|
<div class="blast-cmd-info"><strong>BLAST Command executed</strong>:
|
|
- <?php print $blast_job->display['blast_cmd'];?></div>
|
|
|
|
|
|
+ <?php print $blast_job->blast_cmd;?></div>
|
|
</div>
|
|
</div>
|
|
<br />
|
|
<br />
|
|
|
|
|
|
@@ -129,8 +115,8 @@ and click the <em>target name </em> to get more information about the target hit
|
|
// significance and 2) additional information including the alignment
|
|
// significance and 2) additional information including the alignment
|
|
foreach ($xml->{'BlastOutput_iterations'}->children() as $iteration) {
|
|
foreach ($xml->{'BlastOutput_iterations'}->children() as $iteration) {
|
|
$children_count = $iteration->{'Iteration_hits'}->children()->count();
|
|
$children_count = $iteration->{'Iteration_hits'}->children()->count();
|
|
- //@deepaksomanadh: Code added for BLAST visualization
|
|
|
|
- // parameters that need to be passed for BLAST image generation
|
|
|
|
|
|
+
|
|
|
|
+ // Save some information needed for the hit visualization.
|
|
$target_name = '';
|
|
$target_name = '';
|
|
$q_name = $xml->{'BlastOutput_query-def'};
|
|
$q_name = $xml->{'BlastOutput_query-def'};
|
|
$query_size = $xml->{'BlastOutput_query-len'};
|
|
$query_size = $xml->{'BlastOutput_query-len'};
|
|
@@ -143,13 +129,21 @@ and click the <em>target name </em> to get more information about the target hit
|
|
$zebra_class = ($count % 2 == 0) ? 'even' : 'odd';
|
|
$zebra_class = ($count % 2 == 0) ? 'even' : 'odd';
|
|
$no_hits = FALSE;
|
|
$no_hits = FALSE;
|
|
|
|
|
|
- // RETRIEVE INFO
|
|
|
|
|
|
+ // SUMMARY ROW
|
|
|
|
+ // -- Save additional information needed for the summary.
|
|
|
|
+ $score = (float) $hit->{'Hit_hsps'}->{'Hsp'}->{'Hsp_score'};
|
|
|
|
+ $evalue = (float) $hit->{'Hit_hsps'}->{'Hsp'}->{'Hsp_evalue'};
|
|
|
|
+ $query_name = (string) $iteration->{'Iteration_query-def'};
|
|
|
|
+
|
|
|
|
+ // If the id is of the form gnl|BL_ORD_ID|### then the parseids flag
|
|
|
|
+ // to makeblastdb did a really poor job. In thhis case we want to use
|
|
|
|
+ // the def to provide the original FASTA header.
|
|
|
|
+ // @todo Deepak changed this to use just the hit_def; inquire as to why.
|
|
$hit_name = (preg_match('/BL_ORD_ID/', $hit->{'Hit_id'})) ? $hit->{'Hit_def'} : $hit->{'Hit_id'};
|
|
$hit_name = (preg_match('/BL_ORD_ID/', $hit->{'Hit_id'})) ? $hit->{'Hit_def'} : $hit->{'Hit_id'};
|
|
- $score = $hit->{'Hit_hsps'}->{'Hsp'}->{'Hsp_score'};
|
|
|
|
- $evalue = $hit->{'Hit_hsps'}->{'Hsp'}->{'Hsp_evalue'};
|
|
|
|
- $query_name = $iteration->{'Iteration_query-def'};
|
|
|
|
|
|
+ // Used for the hit visualization to ensure the name isn't truncated.
|
|
|
|
+ $hit_name_short = (preg_match('/^([^\s]+)/', $hit_name, $matches)) ? $matches[1] : $hit_name;
|
|
|
|
|
|
- // Round e-val to two decimal values
|
|
|
|
|
|
+ // Round e-value to two decimal values.
|
|
$rounded_evalue = '';
|
|
$rounded_evalue = '';
|
|
if (strpos($evalue,'e') != false) {
|
|
if (strpos($evalue,'e') != false) {
|
|
$evalue_split = explode('e', $evalue);
|
|
$evalue_split = explode('e', $evalue);
|
|
@@ -158,21 +152,36 @@ and click the <em>target name </em> to get more information about the target hit
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
$rounded_evalue = $evalue;
|
|
$rounded_evalue = $evalue;
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // State what should be in the summary row for theme_table() later.
|
|
|
|
+ $summary_row = array(
|
|
|
|
+ 'data' => array(
|
|
|
|
+ 'arrow-col' => array('data' => '<div class="arrow"></div>', 'class' => array('arrow-col')),
|
|
|
|
+ 'number' => array('data' => $count, 'class' => array('number')),
|
|
|
|
+ 'query' => array('data' => $query_name, 'class' => array('query')),
|
|
|
|
+ 'hit' => array('data' => $hit_name, 'class' => array('hit')),
|
|
|
|
+ 'evalue' => array('data' => $rounded_evalue, 'class' => array('evalue')),
|
|
|
|
+ ),
|
|
|
|
+ 'class' => array('result-summary')
|
|
|
|
+ );
|
|
|
|
|
|
// ALIGNMENT ROW (collapsed by default)
|
|
// ALIGNMENT ROW (collapsed by default)
|
|
// Process HSPs
|
|
// Process HSPs
|
|
- // @deepaksomanadh: Code added for BLAST visualization
|
|
|
|
- // hit array and corresponding bit scores
|
|
|
|
- // hits=4263001_4262263_1_742;4260037_4259524_895_1411;&scores=722;473;
|
|
|
|
$HSPs = array();
|
|
$HSPs = array();
|
|
|
|
+
|
|
|
|
+ // We need to save some additional summary information in order to draw the
|
|
|
|
+ // hit visualization. First, initialize some variables...
|
|
$track_start = INF;
|
|
$track_start = INF;
|
|
$track_end = -1;
|
|
$track_end = -1;
|
|
$hsps_range = '';
|
|
$hsps_range = '';
|
|
$hit_hsps = '';
|
|
$hit_hsps = '';
|
|
$hit_hsp_score = '';
|
|
$hit_hsp_score = '';
|
|
$target_size = $hit->{'Hit_len'};
|
|
$target_size = $hit->{'Hit_len'};
|
|
-
|
|
|
|
|
|
+ $Hsp_bit_score = '';
|
|
|
|
+
|
|
|
|
+ // Then for each hit hsp, keep track of the start of first hsp and the end of
|
|
|
|
+ // the last hsp. Keep in mind that hsps might not be recorded in order.
|
|
foreach ($hit->{'Hit_hsps'}->children() as $hsp_xml) {
|
|
foreach ($hit->{'Hit_hsps'}->children() as $hsp_xml) {
|
|
$HSPs[] = (array) $hsp_xml;
|
|
$HSPs[] = (array) $hsp_xml;
|
|
|
|
|
|
@@ -182,101 +191,31 @@ and click the <em>target name </em> to get more information about the target hit
|
|
if ($track_end < $hsp_xml->{'Hsp_hit-to'}) {
|
|
if ($track_end < $hsp_xml->{'Hsp_hit-to'}) {
|
|
$track_end = $hsp_xml->{'Hsp_hit-to'} . "";
|
|
$track_end = $hsp_xml->{'Hsp_hit-to'} . "";
|
|
}
|
|
}
|
|
- }
|
|
|
|
- $range_start = (int) $track_start - 50000;
|
|
|
|
- $range_end = (int) $track_end + 50000;
|
|
|
|
-
|
|
|
|
- if ($range_start < 1)
|
|
|
|
- $range_start = 1;
|
|
|
|
|
|
|
|
- // For BLAST visualization
|
|
|
|
- $target_size = $hit->{'Hit_len'};
|
|
|
|
- $Hsp_bit_score = '';
|
|
|
|
- foreach ($hit->{'Hit_hsps'}->children() as $hsp_xml) {
|
|
|
|
|
|
+ // The BLAST visualization code requires the hsps to be formatted in a
|
|
|
|
+ // very specific manner. Here we build up the strings to be submitted.
|
|
|
|
+ // hits=4263001_4262263_1_742;4260037_4259524_895_1411;&scores=722;473;
|
|
$hit_hsps .= $hsp_xml->{'Hsp_hit-from'} . '_' .
|
|
$hit_hsps .= $hsp_xml->{'Hsp_hit-from'} . '_' .
|
|
$hsp_xml->{'Hsp_hit-to'} . '_' .
|
|
$hsp_xml->{'Hsp_hit-to'} . '_' .
|
|
$hsp_xml->{'Hsp_query-from'} . '_' . $hsp_xml->{'Hsp_query-to'} .
|
|
$hsp_xml->{'Hsp_query-from'} . '_' . $hsp_xml->{'Hsp_query-to'} .
|
|
';';
|
|
';';
|
|
- $Hsp_bit_score .= $hsp_xml->{'Hsp_bit-score'} .';';
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- // SUMMARY ROW
|
|
|
|
- // If the id is of the form gnl|BL_ORD_ID|### then the parseids flag
|
|
|
|
- // to makeblastdb did a really poor job. In this case we want to use
|
|
|
|
- // the def to provide the original FASTA header.
|
|
|
|
-
|
|
|
|
- // If our BLAST DB is configured to handle link-outs then use the
|
|
|
|
- // regex & URL prefix provided to create one.
|
|
|
|
- $hit_name = $hit->{'Hit_def'};
|
|
|
|
- $hit_name_short = (preg_match('/^([^\s]+)/', $hit_name, $matches)) ? $matches[1] : $hit_name;
|
|
|
|
- $query_name = $iteration->{'Iteration_query-def'};
|
|
|
|
-
|
|
|
|
- if ($linkout) {
|
|
|
|
-//echo "link out regex: $linkout_regex executed on [$hit_name]<br>";
|
|
|
|
-//preg_match($linkout_regex, $hit_name, $linkout_match);
|
|
|
|
-//echo "<br>matches:<pre>" . var_dump($linkout_match);echo "</pre>";
|
|
|
|
- if (preg_match($linkout_regex, $hit_name, $linkout_match)) {
|
|
|
|
- $linkout_id = $linkout_match[1];
|
|
|
|
- $hit->{'linkout_id'} = $linkout_id;
|
|
|
|
- $hit->{'hit_name'} = $hit_name;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- $hit_url = call_user_func(
|
|
|
|
- $url_function,
|
|
|
|
- $linkout_urlprefix,
|
|
|
|
- $hit,
|
|
|
|
- array(
|
|
|
|
- 'query_name' => $query_name,
|
|
|
|
- 'score' => $score,
|
|
|
|
- 'e-value' => $evalue,
|
|
|
|
- 'HSPs' => $HSPs,
|
|
|
|
- 'Target' => $blastdb->title,
|
|
|
|
- )
|
|
|
|
- );
|
|
|
|
-
|
|
|
|
- // The linkout id might have been set/changed by the custom linkout code.
|
|
|
|
- if ($linkout_type == 'custom' && $hit->{'linkout_id'}) {
|
|
|
|
- $linkout_id = $hit->{'linkout_id'};
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- if ($hit_url) {
|
|
|
|
-/* eksc- l() URL-encodes the URL path too, which is often not what we want.
|
|
|
|
- $hit_name = l(
|
|
|
|
- $linkout_id,
|
|
|
|
- $hit_url,
|
|
|
|
- array('attributes' => array('target' => '_blank'))
|
|
|
|
- );
|
|
|
|
-*/
|
|
|
|
- $hit_name = "
|
|
|
|
- <a href=\"$hit_url\" target=\"_blank\">
|
|
|
|
- $linkout_id
|
|
|
|
- </a>";
|
|
|
|
- }
|
|
|
|
- }//handle linkout
|
|
|
|
-
|
|
|
|
- //@deepaksomanadh: Code added for BLAST visualization
|
|
|
|
- // get the image and display
|
|
|
|
|
|
+ $Hsp_bit_score .= $hsp_xml->{'Hsp_bit-score'} .';';
|
|
|
|
+ }
|
|
|
|
+ // Finally record the range.
|
|
|
|
+ // @todo figure out why we arbitrarily subtract 50,000 here...
|
|
|
|
+ // @more removing the 50,000 and using track start/end appears to cause no change...
|
|
|
|
+ $range_start = (int) $track_start;// - 50000;
|
|
|
|
+ $range_end = (int) $track_end;// + 50000;
|
|
|
|
+ if ($range_start < 1) $range_start = 1;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // Call the function to generate the hit image.
|
|
$hit_img = generate_blast_hit_image($target_name, $Hsp_bit_score, $hit_hsps,
|
|
$hit_img = generate_blast_hit_image($target_name, $Hsp_bit_score, $hit_hsps,
|
|
$target_size, $query_size, $q_name, $hit_name_short);
|
|
$target_size, $query_size, $q_name, $hit_name_short);
|
|
-
|
|
|
|
- $row = array(
|
|
|
|
- 'data' => array(
|
|
|
|
- 'arrow-col' => array('data' => '<div class="arrow"></div>', 'class' => array('arrow-col')),
|
|
|
|
- 'number' => array('data' => $count, 'class' => array('number')),
|
|
|
|
- 'query' => array('data' => $query_name, 'class' => array('query')),
|
|
|
|
- 'hit' => array('data' => $hit_name, 'class' => array('hit')),
|
|
|
|
- 'evalue' => array('data' => $rounded_evalue, 'class' => array('evalue')),
|
|
|
|
- 'arrow-col' => array('data' => '<div class="arrow"></div>', 'class' => array('arrow-col'))
|
|
|
|
- ),
|
|
|
|
- 'class' => array('result-summary')
|
|
|
|
- );
|
|
|
|
- $rows[] = $row;
|
|
|
|
|
|
|
|
- // ALIGNMENT ROW (collapsed by default)
|
|
|
|
- // Process HSPs
|
|
|
|
|
|
|
|
- $row = array(
|
|
|
|
|
|
+ // State what should be in the alignment row for theme_table() later.
|
|
|
|
+ $alignment_row = array(
|
|
'data' => array(
|
|
'data' => array(
|
|
'arrow' => array(
|
|
'arrow' => array(
|
|
'data' => theme('blast_report_alignment_row', array('HSPs' => $HSPs, 'hit_visualization' => $hit_img)),
|
|
'data' => theme('blast_report_alignment_row', array('HSPs' => $HSPs, 'hit_visualization' => $hit_img)),
|
|
@@ -286,7 +225,57 @@ and click the <em>target name </em> to get more information about the target hit
|
|
'class' => array('alignment-row', $zebra_class),
|
|
'class' => array('alignment-row', $zebra_class),
|
|
'no_striping' => TRUE
|
|
'no_striping' => TRUE
|
|
);
|
|
);
|
|
- $rows[] = $row;
|
|
|
|
|
|
+
|
|
|
|
+ // LINK-OUTS.
|
|
|
|
+ // It was determined above whether link-outs were supported for the
|
|
|
|
+ // tripal blast database used as a search target. Thus we only want to
|
|
|
|
+ // determine a link-out if it's actually supported... ;-)
|
|
|
|
+ if ($linkout) {
|
|
|
|
+
|
|
|
|
+ // First extract the linkout text using the regex provided through
|
|
|
|
+ // the Tripal blast database node.
|
|
|
|
+ if (preg_match($linkout_regex, $hit_name, $linkout_match)) {
|
|
|
|
+ $hit->{'linkout_id'} = $linkout_match[1];
|
|
|
|
+ $hit->{'hit_name'} = $hit_name;
|
|
|
|
+
|
|
|
|
+ // Allow custom functions to determine the URL to support more complicated
|
|
|
|
+ // link-outs rather than just using the tripal database prefix.
|
|
|
|
+ $hit_url = call_user_func(
|
|
|
|
+ $url_function,
|
|
|
|
+ $linkout_urlprefix,
|
|
|
|
+ $hit,
|
|
|
|
+ array(
|
|
|
|
+ 'query_name' => $query_name,
|
|
|
|
+ 'score' => $score,
|
|
|
|
+ 'e-value' => $evalue,
|
|
|
|
+ 'HSPs' => $HSPs,
|
|
|
|
+ 'Target' => $blast_job->blastdb->db_name,
|
|
|
|
+ )
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ // Create Link.
|
|
|
|
+ if ($hit_url) {
|
|
|
|
+ // It is important to url-encode links, especially in this case,
|
|
|
|
+ // since jbrowse links have double quotes in them which result in
|
|
|
|
+ // truncated links due to <a href="yoururl"></a> (notice the double quotes).
|
|
|
|
+ $hit_name = l(
|
|
|
|
+ $hit->{'linkout_id'},
|
|
|
|
+ $hit_url,
|
|
|
|
+ array('attributes' => array('target' => '_blank'))
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ //HACK: change '%3F' to '?' to work around a Drupal bug"
|
|
|
|
+ $hit_name = str_replace('%3F', '?', $hit_name);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // Replace the target name with the link.
|
|
|
|
+ $summary_row['data']['hit']['data'] = $hit_name;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // ADD TO TABLE ROWS
|
|
|
|
+ $rows[] = $summary_row;
|
|
|
|
+ $rows[] = $alignment_row;
|
|
|
|
|
|
}//end of if - checks $hit
|
|
}//end of if - checks $hit
|
|
}//end of foreach - iteration_hits
|
|
}//end of foreach - iteration_hits
|
|
@@ -331,38 +320,9 @@ else {
|
|
|
|
|
|
<p><?php print l(
|
|
<p><?php print l(
|
|
'Edit this query and re-submit',
|
|
'Edit this query and re-submit',
|
|
- $blast_job->form_options['job_url'],
|
|
|
|
- array('query' => array('jid' => base64_encode($job_id))));
|
|
|
|
|
|
+ $blast_form_url,
|
|
|
|
+ array('query' => array('resubmit' => blast_ui_make_secret($job_id))));
|
|
?></p>
|
|
?></p>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
-<!-- Recent Jobs -->
|
|
|
|
-<?php
|
|
|
|
-
|
|
|
|
- // Gets the list of recent jobs filtered to the current blast program (ie: blastn).
|
|
|
|
-
|
|
|
|
- if ($recent_jobs) {
|
|
|
|
-
|
|
|
|
- print '<h2>Recent Jobs</h2>';
|
|
|
|
-
|
|
|
|
- $table = array(
|
|
|
|
- 'header' => array('Query Information', 'Search Target', 'Date Requested', ''),
|
|
|
|
- 'rows' => array(),
|
|
|
|
- 'attributes' => array('class' => array('tripal-blast', 'recent-jobs')),
|
|
|
|
- 'sticky' => FALSE
|
|
|
|
- );
|
|
|
|
-
|
|
|
|
- foreach ($recent_jobs as $job) {
|
|
|
|
-
|
|
|
|
- // Define a row for the current job.
|
|
|
|
- $table['rows'][] = array(
|
|
|
|
- $job['query_info'],
|
|
|
|
- $job['target'],
|
|
|
|
- $job['date'],
|
|
|
|
- l('See Results', $job['job_output_url'])
|
|
|
|
- );
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- print theme('table', $table);
|
|
|
|
- }
|
|
|
|
-?>
|
|
|
|
|
|
+<?php print theme('blast_recent_jobs', array()); ?>
|