|
@@ -8,7 +8,7 @@ $linkout = FALSE;
|
|
if ($blast_job->blastdb->linkout->none === FALSE) {
|
|
if ($blast_job->blastdb->linkout->none === FALSE) {
|
|
$linkout_type = $blast_job->blastdb->linkout->type;
|
|
$linkout_type = $blast_job->blastdb->linkout->type;
|
|
$linkout_regex = $blast_job->blastdb->linkout->regex;
|
|
$linkout_regex = $blast_job->blastdb->linkout->regex;
|
|
-
|
|
+
|
|
|
|
|
|
if (isset($blast_job->blastdb->linkout->db_id->urlprefix) && !empty($blast_job->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;
|
|
$linkout_urlprefix = $blast_job->blastdb->linkout->db_id->urlprefix;
|
|
@@ -64,22 +64,35 @@ $no_hits = TRUE;
|
|
|
|
|
|
<!-- Provide Information to the user about their blast job -->
|
|
<!-- Provide Information to the user about their blast job -->
|
|
<div class="blast-job-info">
|
|
<div class="blast-job-info">
|
|
-<?php if($xml): ?>
|
|
+<?php if($xml):
|
|
|
|
+ $output_files = array();
|
|
|
|
+ if (file_exists($blast_job->files->result->html))
|
|
|
|
+ $output_files['html'] = array('path' => url($blast_job->files->result->html), 'title' => 'Alignment');
|
|
|
|
+ if (file_exists($blast_job->files->result->tsv))
|
|
|
|
+ $output_files['tsv'] = array('path' => url($blast_job->files->result->tsv), 'title' => 'Tab-Delimited');
|
|
|
|
+ if (file_exists($blast_job->files->result->gff))
|
|
|
|
+ $output_files['gff'] = array('path' => url($blast_job->files->result->gff), 'title' => 'GFF3');
|
|
|
|
+ if (file_exists($blast_job->files->result->xml))
|
|
|
|
+ $output_files['xml'] = array('path' => url($blast_job->files->result->xml), 'title' => 'XML');
|
|
|
|
+?>
|
|
<div class="blast-download-info"><strong>Download</strong>:
|
|
<div class="blast-download-info"><strong>Download</strong>:
|
|
- <a href="<?php print '../../' . $blast_job->files->result->html; ?>">Alignment</a>,
|
|
+ <?php
|
|
- <a href="<?php print '../../' . $blast_job->files->result->tsv; ?>">Tab-Delimited</a>,
|
|
+ $i = 0;
|
|
- <a href="<?php print '../../' . $blast_job->files->result->xml; ?>">XML</a>,
|
|
+ foreach($output_files as $file) {
|
|
- <a href="<?php print '../../' . $blast_job->files->result->gff; ?>">GFF</a>
|
|
+ $i++;
|
|
|
|
+ print l($file['title'], $file['path']);
|
|
|
|
+ if (sizeof($output_files) != $i) print ', ';
|
|
|
|
+ } ?>
|
|
</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->files->query;?></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->blastdb->db_name;?></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 format_date($blast_job->date_submitted, 'medium');?></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->blast_cmd;?></div>
|
|
<?php print $blast_job->blast_cmd;?></div>
|
|
</div>
|
|
</div>
|
|
<br />
|
|
<br />
|
|
@@ -94,8 +107,8 @@ $no_hits = TRUE;
|
|
if ($xml) {
|
|
if ($xml) {
|
|
?>
|
|
?>
|
|
|
|
|
|
-<p>The following table summarizes the results of your BLAST.
|
|
+<p>The following table summarizes the results of your BLAST.
|
|
-Click on a <em>triangle </em> on the left to see the alignment and a visualization of the hit,
|
|
+Click on a <em>triangle </em> on the left to see the alignment and a visualization of the hit,
|
|
and click the <em>target name </em> to get more information about the target hit.</p>
|
|
and click the <em>target name </em> to get more information about the target hit.</p>
|
|
|
|
|
|
<?php
|
|
<?php
|
|
@@ -122,7 +135,7 @@ and click the <em>target name </em> to get more information about the target hit
|
|
$q_name = $xml->{'BlastOutput_query-def'};
|
|
$q_name = $xml->{'BlastOutput_query-def'};
|
|
$query_size = $xml->{'BlastOutput_query-len'};
|
|
$query_size = $xml->{'BlastOutput_query-len'};
|
|
$target_size = $iteration->{'Iteration_stat'}->{'Statistics'}->{'Statistics_db-len'};
|
|
$target_size = $iteration->{'Iteration_stat'}->{'Statistics'}->{'Statistics_db-len'};
|
|
-
|
|
+
|
|
if ($children_count != 0) {
|
|
if ($children_count != 0) {
|
|
foreach ($iteration->{'Iteration_hits'}->children() as $hit) {
|
|
foreach ($iteration->{'Iteration_hits'}->children() as $hit) {
|
|
if (is_object($hit)) {
|
|
if (is_object($hit)) {
|
|
@@ -135,12 +148,12 @@ and click the <em>target name </em> to get more information about the target hit
|
|
$score = (float) $hit->{'Hit_hsps'}->{'Hsp'}->{'Hsp_score'};
|
|
$score = (float) $hit->{'Hit_hsps'}->{'Hsp'}->{'Hsp_score'};
|
|
$evalue = (float) $hit->{'Hit_hsps'}->{'Hsp'}->{'Hsp_evalue'};
|
|
$evalue = (float) $hit->{'Hit_hsps'}->{'Hsp'}->{'Hsp_evalue'};
|
|
$query_name = (string) $iteration->{'Iteration_query-def'};
|
|
$query_name = (string) $iteration->{'Iteration_query-def'};
|
|
-
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- $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'};
|
|
|
|
|
|
$hit_name_short = (preg_match('/^([^\s]+)/', $hit_name, $matches)) ? $matches[1] : $hit_name;
|
|
$hit_name_short = (preg_match('/^([^\s]+)/', $hit_name, $matches)) ? $matches[1] : $hit_name;
|
|
|
|
|
|
@@ -148,13 +161,13 @@ and click the <em>target name </em> to get more information about the target hit
|
|
$rounded_evalue = '';
|
|
$rounded_evalue = '';
|
|
if (strpos($evalue,'e') != false) {
|
|
if (strpos($evalue,'e') != false) {
|
|
$evalue_split = explode('e', $evalue);
|
|
$evalue_split = explode('e', $evalue);
|
|
- $rounded_evalue = round($evalue_split[0], 2, PHP_ROUND_HALF_EVEN);
|
|
+ $rounded_evalue = round($evalue_split[0], 2, PHP_ROUND_HALF_EVEN);
|
|
$rounded_evalue .= 'e' . $evalue_split[1];
|
|
$rounded_evalue .= 'e' . $evalue_split[1];
|
|
}
|
|
}
|
|
- else {
|
|
+ else {
|
|
$rounded_evalue = $evalue;
|
|
$rounded_evalue = $evalue;
|
|
}
|
|
}
|
|
-
|
|
+
|
|
|
|
|
|
$summary_row = array(
|
|
$summary_row = array(
|
|
'data' => array(
|
|
'data' => array(
|
|
@@ -166,7 +179,7 @@ and click the <em>target name </em> to get more information about the target hit
|
|
),
|
|
),
|
|
'class' => array('result-summary')
|
|
'class' => array('result-summary')
|
|
);
|
|
);
|
|
-
|
|
+
|
|
|
|
|
|
|
|
|
|
$HSPs = array();
|
|
$HSPs = array();
|
|
@@ -180,12 +193,12 @@ and click the <em>target name </em> to get more information about the target hit
|
|
$hit_hsp_score = '';
|
|
$hit_hsp_score = '';
|
|
$target_size = $hit->{'Hit_len'};
|
|
$target_size = $hit->{'Hit_len'};
|
|
$Hsp_bit_score = '';
|
|
$Hsp_bit_score = '';
|
|
-
|
|
+
|
|
|
|
|
|
|
|
|
|
foreach ($hit->{'Hit_hsps'}->children() as $hsp_xml) {
|
|
foreach ($hit->{'Hit_hsps'}->children() as $hsp_xml) {
|
|
$HSPs[] = (array) $hsp_xml;
|
|
$HSPs[] = (array) $hsp_xml;
|
|
-
|
|
+
|
|
if ($track_start > $hsp_xml->{'Hsp_hit-from'}) {
|
|
if ($track_start > $hsp_xml->{'Hsp_hit-from'}) {
|
|
$track_start = $hsp_xml->{'Hsp_hit-from'} . "";
|
|
$track_start = $hsp_xml->{'Hsp_hit-from'} . "";
|
|
}
|
|
}
|
|
@@ -196,22 +209,22 @@ and click the <em>target name </em> to get more information about the target hit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- $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'} .';';
|
|
+ $Hsp_bit_score .= $hsp_xml->{'Hsp_bit-score'} .';';
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$range_start = (int) $track_start;
|
|
$range_start = (int) $track_start;
|
|
$range_end = (int) $track_end;
|
|
$range_end = (int) $track_end;
|
|
- if ($range_start < 1) $range_start = 1;
|
|
+ if ($range_start < 1) $range_start = 1;
|
|
-
|
|
+
|
|
|
|
|
|
|
|
|
|
- $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);
|
|
|
|
|
|
|
|
|
|
@@ -226,19 +239,19 @@ 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
|
|
);
|
|
);
|
|
-
|
|
+
|
|
|
|
|
|
|
|
|
|
-
|
|
+
|
|
|
|
|
|
if ($linkout) {
|
|
if ($linkout) {
|
|
-
|
|
+
|
|
|
|
|
|
|
|
|
|
if (preg_match($linkout_regex, $hit_name, $linkout_match)) {
|
|
if (preg_match($linkout_regex, $hit_name, $linkout_match)) {
|
|
$hit->{'linkout_id'} = $linkout_match[1];
|
|
$hit->{'linkout_id'} = $linkout_match[1];
|
|
$hit->{'hit_name'} = $hit_name;
|
|
$hit->{'hit_name'} = $hit_name;
|
|
-
|
|
+
|
|
|
|
|
|
|
|
|
|
$hit_name = call_user_func(
|
|
$hit_name = call_user_func(
|
|
@@ -254,11 +267,11 @@ and click the <em>target name </em> to get more information about the target hit
|
|
)
|
|
)
|
|
);
|
|
);
|
|
}
|
|
}
|
|
-
|
|
+
|
|
|
|
|
|
$summary_row['data']['hit']['data'] = $hit_name;
|
|
$summary_row['data']['hit']['data'] = $hit_name;
|
|
}
|
|
}
|
|
-
|
|
+
|
|
|
|
|
|
$rows[] = $summary_row;
|
|
$rows[] = $summary_row;
|
|
$rows[] = $alignment_row;
|
|
$rows[] = $alignment_row;
|
|
@@ -266,7 +279,7 @@ and click the <em>target name </em> to get more information about the target hit
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
+
|
|
else {
|
|
else {
|
|
|
|
|
|
$query_name = $iteration->{'Iteration_query-def'};
|
|
$query_name = $iteration->{'Iteration_query-def'};
|
|
@@ -305,7 +318,7 @@ else {
|
|
?>
|
|
?>
|
|
|
|
|
|
<p><?php print l(
|
|
<p><?php print l(
|
|
- 'Edit this query and re-submit',
|
|
+ 'Edit this query and re-submit',
|
|
$blast_form_url,
|
|
$blast_form_url,
|
|
array('query' => array('resubmit' => blast_ui_make_secret($job_id))));
|
|
array('query' => array('resubmit' => blast_ui_make_secret($job_id))));
|
|
?></p>
|
|
?></p>
|