Throw a UserException in the BQSR when there is no data instead of creating an empty csv file
This commit is contained in:
parent
585a45b7a3
commit
86871bd1e3
|
|
@ -526,6 +526,9 @@ public class CountCovariatesWalker extends LocusWalker<CountCovariatesWalker.Cou
|
||||||
*/
|
*/
|
||||||
public void onTraversalDone( CountedData sum ) {
|
public void onTraversalDone( CountedData sum ) {
|
||||||
logger.info( "Writing raw recalibration data..." );
|
logger.info( "Writing raw recalibration data..." );
|
||||||
|
if( sum.countedBases == 0L ) {
|
||||||
|
throw new UserException.BadInput("Could not find any usable data in the input BAM file(s).");
|
||||||
|
}
|
||||||
outputToCSV( sum, RECAL_FILE );
|
outputToCSV( sum, RECAL_FILE );
|
||||||
logger.info( "...done!" );
|
logger.info( "...done!" );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue