From 451eaa56e3e2fbe34db4d995188110f45938224d Mon Sep 17 00:00:00 2001 From: Lee Katz - Aspen Date: Wed, 2 Sep 2015 11:31:44 -0400 Subject: [PATCH] some filename fixes and better logmsg --- scripts/shuffleSplitReads.pl | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/shuffleSplitReads.pl b/scripts/shuffleSplitReads.pl index 80f4741..f9ff173 100755 --- a/scripts/shuffleSplitReads.pl +++ b/scripts/shuffleSplitReads.pl @@ -84,11 +84,14 @@ sub shuffleWorker{ while(defined(my $tmp=$Q->dequeue)){ my($basename,$reads)=@$tmp; - logmsg "Looking for $basename"; - my $outfile="$outdir/$basename.fastq.gz"; - next if(-e $outfile); - - system("run_assembly_shuffleReads.pl $$reads{1} $$reads{2} | gzip -c > $outfile.tmp"); + my $outfile="$outdir/".basename($basename).".fastq.gz"; + logmsg "Looking for $basename*"; + if(-e $outfile){ + logmsg "Found $outfile; will not reshuffle"; + next; + } + my $command="run_assembly_shuffleReads.pl $$reads{1} $$reads{2} | gzip -c > $outfile.tmp"; + system($command); die "ERROR with run_assembly_shuffleReads.pl" if $?; system("mv -v $outfile.tmp $outfile"); }