Bug fix. Stopping condition of recurrence stopped too soon in some cases where an interval *contained* zero reads but *overlapped* with some reads.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2874 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
36129e01e4
commit
fff15944fe
|
|
@ -94,17 +94,25 @@ public class IndexDelimitedLocusShardStrategy implements ShardStrategy {
|
||||||
|
|
||||||
List<Bin> bins = findBinsAtLeastAsDeepAs(blockDrivenDataSource.getOverlappingBins(location),binsDeeperThan);
|
List<Bin> bins = findBinsAtLeastAsDeepAs(blockDrivenDataSource.getOverlappingBins(location),binsDeeperThan);
|
||||||
|
|
||||||
|
// Recursive stopping condition -- algorithm is at the zero point and no bins have been found.
|
||||||
|
if(binsDeeperThan == 0 && bins.size() == 0) {
|
||||||
|
filePointers.add(new FilePointer(location));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// No bins found; step up a level and search again.
|
||||||
if(bins.size() == 0) {
|
if(bins.size() == 0) {
|
||||||
if(filePointer != null && filePointer.locations.size() > 0) {
|
if(filePointer != null && filePointer.locations.size() > 0) {
|
||||||
filePointers.add(filePointer);
|
filePointers.add(filePointer);
|
||||||
filePointer = null;
|
filePointer = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
filePointers.add(new FilePointer(location));
|
filePointers.addAll(batchLociIntoBins(Collections.singletonList(location),binsDeeperThan-1));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Collections.sort(bins);
|
|
||||||
|
|
||||||
|
// Bins found; try to match bins with locations.
|
||||||
|
Collections.sort(bins);
|
||||||
Iterator<Bin> binIterator = bins.iterator();
|
Iterator<Bin> binIterator = bins.iterator();
|
||||||
|
|
||||||
while(locationStop >= locationStart) {
|
while(locationStop >= locationStart) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue