Skip to content

Commit

Permalink
allow empty input
Browse files Browse the repository at this point in the history
  • Loading branch information
kachulis committed Feb 10, 2023
1 parent d1a4f94 commit 7608bd2
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ public void onTraversalStart(){
if (unmappedSamIterator.hasNext()){
currentUnmappedRead = unmappedSamIterator.next();
} else {
throw new UserException("unmapped sam iterator is empty.");
if (alignedSamIterator.hasNext()) {
throw new UserException("unmapped sam iterator is empty and aligned sam iterator is not.");
} else {
logger.warn("Input data contains no reads. Output will also contain no reads.");
}
}

writer = createSAMWriter(new GATKPath(outSamFile.getAbsolutePath()), false);
Expand Down

0 comments on commit 7608bd2

Please sign in to comment.