Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed bug in source field on Analysis page. Was preventing users from…

… downloading sequences from the workbench when they used "Representative Hit" to do their Analysis.
  • Loading branch information...
commit 1492c89f2492a29f81e3acfd63051202b5ab4471 1 parent a0014a5
jaredbischof jaredbischof authored

Showing 1 changed file with 6 additions and 14 deletions. Show diff stats Hide diff stats

  1. +6 14 src/MGRAST/lib/WebPage/Analysis.pm
20 src/MGRAST/lib/WebPage/Analysis.pm
@@ -1914,17 +1914,9 @@ sub single_visual {
1914 1914 } else {
1915 1915 $mgs .= "metagenome ".$mgnames->[0];
1916 1916 }
1917   - my $sorcs = "";
1918   - my @sources = $cgi->param('source');
1919   - foreach my $source (@sources) {
1920   - $settings_preserve .= "<input type='hidden' name='source' value='".$source."'>";
1921   - }
1922   - if (scalar(@sources) > 1) {
1923   - my $last = pop(@sources);
1924   - $sorcs = join(", ", @sources)." and $last";
1925   - } else {
1926   - $sorcs = $sources[0];
1927   - }
  1917 + my $source = $cgi->param('source');
  1918 + $settings_preserve .= "<input type='hidden' name='source' value='".$source."'>";
  1919 +
1928 1920 my $cutoffs = "a maximum e-value of 1e-" . ($cgi->param('evalue') || '0') . ", ";
1929 1921 $cutoffs .= "a minimum identity of " . ($cgi->param('identity') || '0') . " %, ";
1930 1922 $cutoffs .= "and a minimum alignment length of " . ($cgi->param('alength') || '1') . ' measured in aa for protein and bp for RNA databases';
@@ -1946,7 +1938,7 @@ sub single_visual {
1946 1938 $settings_preserve .= "<input type='hidden' name='alength' value='" . ($cgi->param('alength') || '1') . "'>";
1947 1939 my $fid = $cgi->param('fid') || int(rand(1000000));
1948 1940
1949   - my $settings = "<i>This data was calculated for $mgs. The data was compared to $sorcs using $cutoffs.$pset</i><br/>";
  1941 + my $settings = "<i>This data was calculated for $mgs. The data was compared to $source using $cutoffs.$pset</i><br/>";
1950 1942
1951 1943 ## determine if any metagenomes missing from results
1952 1944 my $missing_txt = "";
@@ -2014,7 +2006,7 @@ sub single_visual {
2014 2006 { name => 'align len std dev', visible => 0, sortable => 1, tooltip => 'standard deviation of<br>the alignment length of the hits' },
2015 2007 { name => 'md5s', visible => 0 },
2016 2008 { name => '# hits', visible => 1, sortable => 1, filter => 1, operators => ['less','more'], tooltip => 'number of unique hits in protein or rna database' },
2017   - { name => "<input type='button' onclick='buffer_data(\"table\", \"".$t->id."\", \"18\", \"16\", \"0\", \"-\", \"9\");' value='to workbench'>", input_type => 'checkbox', tooltip => 'check to select features<br>to add to workbench' } ];
  2009 + { name => "<input type='button' onclick='buffer_data(\"table\", \"".$t->id."\", \"18\", \"16\", \"0\", \"".$source."\", \"9\");' value='to workbench'>", input_type => 'checkbox', tooltip => 'check to select features<br>to add to workbench' } ];
2018 2010
2019 2011 #### do the pivoting
2020 2012 unless (defined $cgi->param('group_by')) {
@@ -2297,7 +2289,7 @@ sub single_visual {
2297 2289 }
2298 2290 }
2299 2291 }
2300   - return clear_progress_image()."<h3 style='margin-top: 0px;'>".$header_names->{$level}." Distribution (".$cgi->param('single_bar_sel').") <input type='button' value='download' title='click to download tabular data' onclick='myWindow=window.open(\"\",\"\",\"width=600,height=500\");myWindow.document.write(\"<pre>$download_data_string</pre>\");myWindow.focus();'> <input type='button' value='to workbench' onclick='buffer_data(\"barchart\", \"$level$fid\", \"$sorcs phylogenetic\", \"".$cgi->param('single_bar_sel')."\", \"0\", \"".join(";",$cgi->param('source'))."\");'></h3></a>".$dom_v->output."<br><input type='hidden' id='$level$fid\_md5s' value='".join(";", keys(%$md5s))."'><input type='hidden' id='$level$fid\_mgids' value='".join(";", @comp_mgs)."'><div id='".(int($level)+1)."_$fid'></div>";
  2292 + return clear_progress_image()."<h3 style='margin-top: 0px;'>".$header_names->{$level}." Distribution (".$cgi->param('single_bar_sel').") <input type='button' value='download' title='click to download tabular data' onclick='myWindow=window.open(\"\",\"\",\"width=600,height=500\");myWindow.document.write(\"<pre>$download_data_string</pre>\");myWindow.focus();'> <input type='button' value='to workbench' onclick='buffer_data(\"barchart\", \"$level$fid\", \"$source phylogenetic\", \"".$cgi->param('single_bar_sel')."\", \"0\", \"".join(";",$cgi->param('source'))."\");'></h3></a>".$dom_v->output."<br><input type='hidden' id='$level$fid\_md5s' value='".join(";", keys(%$md5s))."'><input type='hidden' id='$level$fid\_mgids' value='".join(";", @comp_mgs)."'><div id='".(int($level)+1)."_$fid'></div>";
2301 2293 }
2302 2294 }
2303 2295

0 comments on commit 1492c89

Please sign in to comment.
Something went wrong with that request. Please try again.