Eliminate a few stray loci that weren't being filtered out.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2875 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
fff15944fe
commit
491b30e8de
|
|
@ -157,29 +157,11 @@ public abstract class LocusView extends LocusIterator implements View {
|
|||
nextLocus = loci.next();
|
||||
|
||||
// If nothing in the shard was found, indicate that by setting nextAlignmentContext to null.
|
||||
if( nextLocus != null && (isBeforeShard(nextLocus.getLocation()) || isAfterShard(nextLocus.getLocation())) )
|
||||
if( nextLocus != null && !isContainedInShard(nextLocus.getLocation()) )
|
||||
nextLocus = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this location before the given shard.
|
||||
* @param location Location to check.
|
||||
* @return True if the given location is before the start of the shard. False otherwise.
|
||||
*/
|
||||
private boolean isBeforeShard(GenomeLoc location) {
|
||||
return location.isBefore(shard.getGenomeLocs().get(0));
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this location after the given shard.
|
||||
* @param location Location to check.
|
||||
* @return True if the given location is after the end of the shard. False otherwise.
|
||||
*/
|
||||
private boolean isAfterShard(GenomeLoc location) {
|
||||
return location.isPast(shard.getGenomeLocs().get(shard.getGenomeLocs().size()-1));
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this location contained in the given shard.
|
||||
* @param location Location to check.
|
||||
|
|
|
|||
Loading…
Reference in New Issue