Skip to content

Commit

Permalink
overlap query reflects new formats
Browse files Browse the repository at this point in the history
  • Loading branch information
erictu committed Jun 3, 2016
1 parent 525fda8 commit 20f51d9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ case class GenotypeRDD(rdd: RDD[Genotype],

def filterByOverlappingRegion(query: ReferenceRegion): RDD[Genotype] = {
def overlapsQuery(rec: Genotype): Boolean =
rec.getVariant.getContigName == query.referenceName &&
rec.getVariant.getStart < query.end &&
rec.getVariant.getEnd > query.start
rec.getContigName == query.referenceName &&
rec.getStart < query.end &&
rec.getEnd > query.start
rdd.filter(overlapsQuery)
}

Expand Down

0 comments on commit 20f51d9

Please sign in to comment.