From: Don Armstrong Date: Thu, 13 Dec 2007 02:31:46 +0000 (+0000) Subject: start working towards supporting keyword weights X-Git-Url: https://git.donarmstrong.com/?p=function2gene.git;a=commitdiff_plain;h=27d14c1110035a9e8425c100f587792517d1f19b;hp=364cd5a25c2bb985b587a6b0b5d2e23de18d9c10 start working towards supporting keyword weights git-svn-id: file:///srv/svn/function2gene/trunk@24 a0738b58-4706-0410-8799-fb830574a030 --- diff --git a/bin/combine_results b/bin/combine_results index 21b1c92..e49de8f 100755 --- a/bin/combine_results +++ b/bin/combine_results @@ -69,9 +69,10 @@ use IO::File; my %options = (debug => 0, help => 0, man => 0, + keywords => [], ); -GetOptions(\%options,'keyword|k=s','debug|d+','help|h|?','man|m'); +GetOptions(\%options,'keywords|k=s@','debug|d+','help|h|?','man|m'); pod2usage() if $options{help}; @@ -116,8 +117,6 @@ for my $file_name (@ARGV) { print join(',',map {qq("$_")} @csv_fields),qq(\n); for my $gene (keys %genes) { $genes{$gene}{rzscore} = scalar grep {$_ !~ /\[/} keys %{$genes{$gene}{terms}}; - next if $genes{$gene}{rzscore} == 1 and exists $genes{$gene}{terms}{antigen}; - $genes{$gene}{rzscore} -= 1 if exists $genes{$gene}{terms}{antigen}; print STDOUT join (',', map {s/"//g; qq("$_")} map {