Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

fixed bug with negative values in predicted rna features #279

Merged
merged 1 commit into from

2 participants

Travis Harrison Jared Bischof
Travis Harrison
Owner

No description provided.

Jared Bischof jaredbischof merged commit c4c9e46 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 4, 2013
  1. fixed bug with negative values in predicted rna features

    Travis Harrison authored
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/MGRAST/lib/WebPage/MetagenomeOverview.pm
6 src/MGRAST/lib/WebPage/MetagenomeOverview.pm
View
@@ -280,6 +280,10 @@ sub output {
$unkn_aa_reads = 0;
$ann_aa_reads = 0;
$unknown_all = $raw_seqs - ($qc_fail_seqs + $ann_rna_reads);
+ if ($raw_seqs < ($qc_fail_seqs + $ann_rna_reads)) {
+ my $diff = ($qc_fail_seqs + $ann_rna_reads) - $raw_seqs;
+ $unknown_all = ($diff > $unknown_all) ? 0 : $unknown_all - $diff;
+ }
} else {
if ($unknown_all < 0) { $unknown_all = 0; }
if ($raw_seqs < ($qc_fail_seqs + $unknown_all + $unkn_aa_reads + $ann_aa_reads + $ann_rna_reads)) {
@@ -506,7 +510,7 @@ sub output {
my $fc_aa_colors = [[$colors->[0],$colors->[1]], [$colors->[1],$colors->[4],$colors->[2]], [$colors->[2],$colors->[3]], [$colors->[3],$colors->[5]]];
my $fc_rna_colors = [[$colors->[0],$colors->[1]], [$colors->[1],$colors->[4]]];
my $fc_aa_data = [[$raw_seqs,$qc_seqs], [$qc_seqs,$ann_rna_reads,$aa_reads], [$aa_feats,$aa_sims], [$aa_sims,$aa_ontol]];
- my $fc_rna_data = [[$raw_seqs,$qc_rna_seqs], [$qc_rna_seqs,$ann_rna_reads]];
+ my $fc_rna_data = [[$raw_seqs,$qc_rna_seqs], [$qc_rna_seqs, ($ann_rna_reads > $qc_rna_seqs) ? $qc_rna_seqs : $ann_rna_reads]];
my $fc_titles = $is_rna ? array2json($fc_rna_titles, 1) : array2json($fc_aa_titles, 1);
my $fc_colors = $is_rna ? array2json($fc_rna_colors, 2) : array2json($fc_aa_colors, 2);
Something went wrong with that request. Please try again.