Skip to content

Commit

Permalink
Fix CRAM reference region updating.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmnbroad committed Apr 9, 2024
1 parent 222d10b commit d769bce
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,10 @@ public void fetchReferenceBases(final int referenceIndex) {

// Re-resolve the reference bases if we don't have a current region or if the region we have
// doesn't span the *entire* contig requested.
final int newSequenceLength = sequenceDictionary.getSequence(referenceIndex).getSequenceLength();
if ((referenceIndex != this.referenceIndex) ||
regionStart != 0 ||
(regionLength < referenceBases.length)) {
(regionLength != newSequenceLength)) {
setCurrentSequence(referenceIndex);
referenceBases = referenceSource.getReferenceBases(sequenceRecord, true);
if (referenceBases == null) {
Expand Down

0 comments on commit d769bce

Please sign in to comment.