Skip to content

Commit

Permalink
Ensure that query range used is limited to contig start/stop.
Browse files Browse the repository at this point in the history
  • Loading branch information
tfenne committed Oct 18, 2023
1 parent 204a5ee commit dcaa891
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,8 @@ case class AggregatedBreakpointPileup(id: String,
source = src,
contig = contig,
breakends = pileups,
queryMin = minPos - flank,
queryMax = maxPos + flank,
queryMin = Math.max(1, minPos - flank),
queryMax = Math.min(maxPos + flank, src.dict(contig).length),
minTotal = minTotal,
minFrequency = minFrequency,
)
Expand Down Expand Up @@ -461,7 +461,6 @@ case class AggregatedBreakpointPileup(id: String,
private def overlapsTarget(contig: String, start: Int, end: Int, targets: OverlapDetector[BEDFeature]): Boolean = {
targets.overlapsAny(new Interval(contig, start, end))
}

}


Expand Down

0 comments on commit dcaa891

Please sign in to comment.