GATK Engine: do not merge FilePointers that span multiple contigs
This affects both the non-experimental and experimental engine paths, and so may break tests, but this is a necessary change.
This commit is contained in:
parent
e82946e5c9
commit
e740977994
|
|
@ -73,8 +73,15 @@ public class IntervalSharder implements Iterator<FilePointer> {
|
||||||
*/
|
*/
|
||||||
public FilePointer next() {
|
public FilePointer next() {
|
||||||
FilePointer current = wrappedIterator.next();
|
FilePointer current = wrappedIterator.next();
|
||||||
while(wrappedIterator.hasNext() && current.isRegionUnmapped == wrappedIterator.peek().isRegionUnmapped && current.minus(wrappedIterator.peek()) == 0)
|
|
||||||
|
while ( wrappedIterator.hasNext() &&
|
||||||
|
current.isRegionUnmapped == wrappedIterator.peek().isRegionUnmapped &&
|
||||||
|
(current.getContigIndex() == wrappedIterator.peek().getContigIndex() || current.isRegionUnmapped) &&
|
||||||
|
current.minus(wrappedIterator.peek()) == 0 ) {
|
||||||
|
|
||||||
current = current.combine(parser,wrappedIterator.next());
|
current = current.combine(parser,wrappedIterator.next());
|
||||||
|
}
|
||||||
|
|
||||||
return current;
|
return current;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,8 +42,10 @@ public class LocusShardBalancer extends ShardBalancer {
|
||||||
|
|
||||||
public Shard next() {
|
public Shard next() {
|
||||||
FilePointer current = filePointers.next();
|
FilePointer current = filePointers.next();
|
||||||
while(filePointers.hasNext() && current.minus(filePointers.peek()) == 0)
|
|
||||||
current = current.combine(parser,filePointers.next());
|
// FilePointers have already been combined as necessary at the IntervalSharder level. No
|
||||||
|
// need to do so again here.
|
||||||
|
|
||||||
return new LocusShard(parser,readsDataSource,current.getLocations(),current.fileSpans);
|
return new LocusShard(parser,readsDataSource,current.getLocations(),current.fileSpans);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue