From: elserj Date: Wed, 2 Dec 2015 22:46:19 +0000 (+0000) Subject: Found bug in loop over file 2 hash. Was counting some twice because of it. X-Git-Url: http://gitweb.planteome.org/?a=commitdiff_plain;h=255694635c9d87cc751e717db6e5d14803a14deb;p=old-jaiswallab-svn%2F.git Found bug in loop over file 2 hash. Was counting some twice because of it. svn path=/; revision=639 --- diff --git a/interactome_scripts/SNP_venn_stats.pl b/interactome_scripts/SNP_venn_stats.pl index ade720e..086576a 100755 --- a/interactome_scripts/SNP_venn_stats.pl +++ b/interactome_scripts/SNP_venn_stats.pl @@ -100,12 +100,9 @@ foreach my $key (keys %file1hash) { foreach my $key (keys %file2hash) { #check if in file3 - if(defined($file3hash{$key})) { + if(defined($file3hash{$key}) && !defined($file1hash{$key})) { $count_file_23++; } - if(defined($file1hash{$key})) { - $count_file_21++; - } }