From b296a27057e4de0838658a826567b6f191544870 Mon Sep 17 00:00:00 2001 From: Li Date: Mon, 14 Oct 2019 18:14:13 -0400 Subject: [PATCH] Report missing extracted toassembly files in wrapper. --- BamExtractor.cpp | 3 +++ run-trust4 | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/BamExtractor.cpp b/BamExtractor.cpp index d768a74..c3b65a5 100644 --- a/BamExtractor.cpp +++ b/BamExtractor.cpp @@ -392,6 +392,9 @@ void FinishWork( std::vector work, pthread_mutex_destroy( info.lockOutput ) ; pthread_mutex_destroy( info.lockFreeThreads ) ; pthread_cond_destroy( info.condFreeThreads ) ; + delete info.lockOutput ; + delete info.lockFreeThreads ; + delete info.condFreeThreads ; ReleaseCustomData( threadArgs, threadCnt ) ; delete[] threadArgs ; } diff --git a/run-trust4 b/run-trust4 index 0f08822..88b5b2d 100755 --- a/run-trust4 +++ b/run-trust4 @@ -178,11 +178,15 @@ if ( @bamFiles > 0 ) push @secondMateFiles, $prefix."_toassemble_2.fq" ; $mainArgs .= " -1 ".$prefix."_toassemble_1.fq -2 ".$prefix."_toassemble_2.fq" ; } - else + elsif ( -e $prefix."_toassemble.fq" ) { push @singleFiles, "${prefix}_toassemble.fq" ; $mainArgs .= " -u ${prefix}_toassemble.fq" ; } + else + { + die "Could not find files like ${prefix}_toassemble*.fq\n" ; + } } # Run the assembly