Skip to content

Commit

Permalink
Fix error in file name to be checked
Browse files Browse the repository at this point in the history
  • Loading branch information
simroux committed Oct 1, 2019
1 parent 801056e commit eadcee5
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions wrapper_phage_contigs_sorter_iPlant.pl
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ =head1 DESCRIPTION
$out = `$cmd_blast_unclustered`;

say "\t$out";
if (-e $out_blast_unclustered){
if (-e $out_blast_new_unclustered){
$out = `cat $out_blast_new_unclustered >> $out_blast_unclustered`;
say "\t$out";
}
Expand Down Expand Up @@ -712,18 +712,22 @@ sub check_for_decontamination {
$count{"total"}+=$c_seq;
$store_len{$c_c}=$c_seq;
}
open my $fa_2,"cat $out_file_1 $out_file_2 $out_file_3 |";
while(<$fa_2>){
chomp($_);
if ($_=~/^>(\S+)-cat_\d/){$count{"viral"}+=$store_len{$1};}
if (-e $out_file_1 || -e $out_file_2 || -e $out_file_3){
open my $fa_2,"cat $out_file_1 $out_file_2 $out_file_3 |";
while(<$fa_2>){
chomp($_);
if ($_=~/^>(\S+)-cat_\d/){$count{"viral"}+=$store_len{$1};}
}
close $fa_2;
}
close $fa_2;
open my $fa_3,"cat $out_file_p1 $out_file_p2 $out_file_p3 |";
while(<$fa_3>){
chomp($_);
if ($_=~/^>\S+-gene_\d+_gene_\d+-(\d+)-(\d+)-cat_\d/){$count{"viral"}+=($2-$1+1);}
if (-e $out_file_p1 || -e $out_file_p2 || -e $out_file_p3){
open my $fa_3,"cat $out_file_p1 $out_file_p2 $out_file_p3 |";
while(<$fa_3>){
chomp($_);
if ($_=~/^>\S+-gene_\d+_gene_\d+-(\d+)-(\d+)-cat_\d/){$count{"viral"}+=($2-$1+1);}
}
close $fa_3;
}
close $fa_3;

if ($count{"total"}==0){}
else{
Expand Down

0 comments on commit eadcee5

Please sign in to comment.