Fixed JIRA GSA-520 for Guillermo: when intervals with zero coverage were present, DiagnoseTargets was trying to merge them with the next interval (even if non-overlapping) which would cause problems later on when it checked to make sure that intervals were strictly overlapping.
This commit is contained in:
parent
ed3d9b050f
commit
b1677fc719
|
|
@ -246,6 +246,14 @@ public class DiagnoseTargets extends LocusWalker<Long, Long> {
|
||||||
*/
|
*/
|
||||||
private void addNewOverlappingIntervals(GenomeLoc refLocus) {
|
private void addNewOverlappingIntervals(GenomeLoc refLocus) {
|
||||||
GenomeLoc interval = intervalListIterator.peek();
|
GenomeLoc interval = intervalListIterator.peek();
|
||||||
|
|
||||||
|
// skip any intervals with no coverage that we have passed
|
||||||
|
while (interval != null && interval.isBefore(refLocus)) {
|
||||||
|
intervalListIterator.next(); // discard the interval (we've already added it to the map)
|
||||||
|
interval = intervalListIterator.peek();
|
||||||
|
}
|
||||||
|
|
||||||
|
// add any intervals that overlap this one
|
||||||
while (interval != null && !interval.isPast(refLocus)) {
|
while (interval != null && !interval.isPast(refLocus)) {
|
||||||
intervalMap.put(interval, createIntervalStatistic(interval));
|
intervalMap.put(interval, createIntervalStatistic(interval));
|
||||||
intervalListIterator.next(); // discard the interval (we've already added it to the map)
|
intervalListIterator.next(); // discard the interval (we've already added it to the map)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue