X-Git-Url: https://git.donarmstrong.com/?p=function2gene.git;a=blobdiff_plain;f=bin%2Fcombine_results;h=49c1ca6da1b32aea859b0daa132d1648888c0ed5;hp=3760b3e0a03ab2e2223624d390f78878356a47ba;hb=HEAD;hpb=9f0f6eec847fd0588d95463ee2eb54f6567b46f1 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);