From 9b2ee98263974b69e47c37a55b02acfc6a3919b4 Mon Sep 17 00:00:00 2001 From: eead-csic-compbio Date: Tue, 28 Aug 2018 15:22:24 +0200 Subject: [PATCH] bug fixed: get_homologues-pl -X now removes previous DIAMOND results of one vs others when new genomes are added --- CHANGES.txt | 1 + get_homologues.pl | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index d9138f3..41c4e23 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -264,3 +264,4 @@ 06062018: fixed POCP computation; now it is [100(C1 + C2)/(T1 + T2)] 06062018: fixed POCS computation; now it is [100(C1 + C2)/(T1 + T2)] and T1/T2 are #nr seqs 23072018: updated Grid Engine instructions in manuals +28082018: bug fixed: get_homologues-pl -X now removes previous DIAMOND results of one vs others when new genomes are added (thanks alexweisberg) diff --git a/get_homologues.pl b/get_homologues.pl index 0d22f66..29caf71 100755 --- a/get_homologues.pl +++ b/get_homologues.pl @@ -1441,10 +1441,18 @@ if(!-s $blast_file){ push(@tmp_blast_output_files,$blastout); } next; } - elsif($COMPRESSBLAST && -s $blastout.'.gz' && $current_files eq $previous_files) + elsif($COMPRESSBLAST && -s $blastout.'.gz') { - if(!-s $blast_file){ push(@tmp_blast_output_files,$blastout); } - next; + if($current_files eq $previous_files) # check previous runs + { + if(!-s $blast_file){ push(@tmp_blast_output_files,$blastout); } + next; + } + else + { + print "# delete previous output $blastout.gz\n"; + unlink($blastout.'.gz'); + } } $command = format_DIAMONDblastp_command("$newDIR/$new_infile",