From 491b30e8dee065ab80273858fdfdb09240215a08 Mon Sep 17 00:00:00 2001 From: hanna Date: Tue, 23 Feb 2010 18:00:52 +0000 Subject: [PATCH] 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 --- .../gatk/datasources/providers/LocusView.java | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/java/src/org/broadinstitute/sting/gatk/datasources/providers/LocusView.java b/java/src/org/broadinstitute/sting/gatk/datasources/providers/LocusView.java index 71c6d595b..4e5e2cc1b 100755 --- a/java/src/org/broadinstitute/sting/gatk/datasources/providers/LocusView.java +++ b/java/src/org/broadinstitute/sting/gatk/datasources/providers/LocusView.java @@ -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.