X-Git-Url: https://git.donarmstrong.com/?p=function2gene.git;a=blobdiff_plain;f=bin%2Fcombine_results;h=49c1ca6da1b32aea859b0daa132d1648888c0ed5;hp=3760b3e0a03ab2e2223624d390f78878356a47ba;hb=766ad5225a78970eef161db44b8ea86f3e37bbc9;hpb=757a79394267bc9c18f0eebeb7016cf2e07f0c8d;ds=sidebyside diff --git a/bin/combine_results b/bin/combine_results index 3760b3e..49c1ca6 100755 --- a/bin/combine_results +++ b/bin/combine_results @@ -276,9 +276,9 @@ for my $keyword (keys %keyword_keyword) { $auto_weight{$keyword} = $results_by_this_keyword/$results_combined; } -my $max_weight = max(values %auto_weight); +my $avg_weight = sum(values %auto_weight) / scalar keys %auto_weight; for my $keyword (keys %auto_weight) { - $auto_weight{$keyword} = $auto_weight{$keyword}/$max_weight; + $auto_weight{$keyword} = $auto_weight{$keyword}/$avg_weight; } print {$results_fh} join(',',map {qq("$_")} @csv_fields),qq(\n);