Skip to content

Commit

Permalink
check for is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
ahaessly committed Mar 19, 2021
1 parent e389981 commit a4f8290
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void traverse() {
throw new UserException.BadInput("Reference length is too long");
}
List<SAMSequenceRecord> contigs = refSource.getSequenceDictionary().getSequences();
final ListIterator<Integer> shiftOffsetsIt = (shiftOffsets != null && shiftOffsets.size() == contigs.size()) ?
final ListIterator<Integer> shiftOffsetsIt = (shiftOffsets != null && !shiftOffsets.isEmpty() && shiftOffsets.size() == contigs.size()) ?
shiftOffsets.listIterator() : null;
refSource.getSequenceDictionary().getSequences().forEach(seq -> shiftContig(seq, shiftOffsetsIt));
}
Expand Down

0 comments on commit a4f8290

Please sign in to comment.