From d9088d1c37ada9d748ac5ee8cefc2e773621566e Mon Sep 17 00:00:00 2001 From: derek Date: Mon, 6 Dec 2010 16:30:13 -0500 Subject: [PATCH] Fixed : improper exit code from FilterTool --- src/toolkit/bamtools_filter.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/toolkit/bamtools_filter.cpp b/src/toolkit/bamtools_filter.cpp index b57cf05..2b8b45e 100644 --- a/src/toolkit/bamtools_filter.cpp +++ b/src/toolkit/bamtools_filter.cpp @@ -736,7 +736,7 @@ bool FilterTool::FilterToolPrivate::Run(void) { // initialize defined properties & user-specified filters // quit if failed - if ( !SetupFilters() ) return 1; + if ( !SetupFilters() ) return false; // open reader without index BamMultiReader reader; @@ -779,7 +779,7 @@ bool FilterTool::FilterToolPrivate::Run(void) { // if error if ( !openedOK ) { cerr << "ERROR: Could not open input BAM file(s)... Aborting." << endl; - return 1; + return false; } // if index data available, we can use SetRegion @@ -789,7 +789,7 @@ bool FilterTool::FilterToolPrivate::Run(void) { if ( !reader.SetRegion(region.LeftRefID, region.LeftPosition, region.RightRefID, region.RightPosition) ) { cerr << "ERROR: Region requested, but could not set BamReader region to REGION: " << m_settings->Region << " Aborting." << endl; reader.Close(); - return 1; + return false; } // everything checks out, just iterate through specified region, filtering alignments @@ -817,14 +817,14 @@ bool FilterTool::FilterToolPrivate::Run(void) { cerr << "ERROR: Could not parse REGION - " << m_settings->Region << endl; cerr << "Be sure REGION is in valid format (see README) and that coordinates are valid for selected references" << endl; reader.Close(); - return 1; + return false; } } // clean up & exit reader.Close(); writer.Close(); - return 0; + return true; } bool FilterTool::FilterToolPrivate::SetupFilters(void) { -- 2.39.5