Skip to content

Commit

Permalink
Merge pull request #379 from mgcam/better_contam_comparison
Browse files Browse the repository at this point in the history
reduce uncertainty in ranking close results
  • Loading branch information
jmtcsngr authored Nov 29, 2016
2 parents 6e006b4 + 45596a3 commit ae94c0f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ LIST OF CHANGES FOR NPG-QC PACKAGE
- back to testing with mysql 5.7.13 in travis
- drop node 0.12 from node travis matrix
- add perl 5.22-shrplib to travis matrix
- to reduce uncertainty in ranking close results, increase precision
used for ranking contamination results

release 62.5
- a very concise replacement for NPG_QC pages
Expand Down
2 changes: 1 addition & 1 deletion lib/npg_qc/autoqc/role/contamination.pm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ sub normalised_contamination {
my $value = ( $raw_count / $fastq_size )
* $genome_correction{$organism}
* $PERCENT;
$normalized_value{$organism} = sprintf '%.1f', $value;
$normalized_value{$organism} = sprintf '%.2f', $value;
}

return \%normalized_value;
Expand Down
8 changes: 4 additions & 4 deletions t/60-autoqc-results-contamination.t
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ ok(!$r->normalised_contamination(), 'normalized measure not defined if read_coun
$r->read_count(100_000);

is_deeply( $r->normalised_contamination(),
{ Homo_sapiens => '62.0',
Danio_rerio => '0.0',
Mus_musculus => '1.3',
Clostridium_difficile => '0.3', },
{ Homo_sapiens => '62.00',
Danio_rerio => '0.00',
Mus_musculus => '1.34',
Clostridium_difficile => '0.30', },
'Calculate normalized measures' );

my $comment1 = 'ABC';
Expand Down

0 comments on commit ae94c0f

Please sign in to comment.