Skip to content

Commit

Permalink
fixed bug in get_homologues.pl -X which produced zero clusters when n…
Browse files Browse the repository at this point in the history
…ew sequences files were added to previous results
  • Loading branch information
eead-csic-compbio committed Jun 9, 2017
1 parent bb3103b commit 5d27c19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,4 @@
16052017: added message to make_nr_pangenome_matrix.pl to warn users that BLAST files must be removed with different refs
17052017: added option -r to annotate_cluster.pl so that external sequences can be used to drive cluster alignment
30052017: updated lib/ForkManager.pm to v1.19 (http://search.cpan.org/perldoc?Parallel%3A%3AForkManager)
09062017: fixed bug in get_homologues.pl -X which produced zero clusters when new sequences files were added to previous results
8 changes: 4 additions & 4 deletions get_homologues.pl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env perl

# 2016 Bruno Contreras-Moreira (1) and Pablo Vinuesa (2):
# 2017 Bruno Contreras-Moreira (1) and Pablo Vinuesa (2):
# 1: http://www.eead.csic.es/compbio (Estacion Experimental Aula Dei/CSIC/Fundacion ARAID, Spain)
# 2: http://www.ccg.unam.mx/~vinuesa (Center for Genomic Sciences, UNAM, Mexico)

Expand Down Expand Up @@ -1295,14 +1295,14 @@

# now concat the other accessions
$blastDBfile = $newDIR ."/". $new_infile .".others";
if(!-s $blastDBfile.".dmnd")
if(!-s $blastDBfile.".dmnd" || $current_files ne $previous_files)
{
open(ALLOTHERS,">",$blastDBfile) || die "# EXIT: cannot create $blastDBfile\n";
foreach my $other_infile (@newfiles)
{
next if($other_infile eq $new_infile);
$infile = (split(/\.$FASTAEXTENSION/,$other_infile))[0];
next if($include_file && !$included_input_files{$infile});
next if($include_file && !$included_input_files{$infile});

open(OTHER,"$newDIR/$other_infile") ||
die "# EXIT: cannot read $newDIR/$other_infile\n";
Expand Down Expand Up @@ -1408,7 +1408,7 @@
$clusteroutfile = $newDIR ."/_". $new_infile ."_others.queue";
push(@to_be_deleted,$clusteroutfile);

if(-s $blastout) # check previous runs
if(-s $blastout && $current_files eq $previous_files) # check previous runs
{
if(!-s $blast_file){ push(@tmp_blast_output_files,$blastout); }
next;
Expand Down

0 comments on commit 5d27c19

Please sign in to comment.