added ReferenceMapping for Genotype, filterByOverlappingRegion for GenotypeRDDFunctions

+1


-Matt

On Sun, Nov 9, 2014 at 9:38 PM, Frank Austin Nothaft <
notifications@github.com> wrote:

> In
> adam-core/src/main/scala/org/bdgenomics/adam/rdd/variation/VariationRDDFunctions.scala:
>
> > @@ -101,4 +102,12 @@ class GenotypeRDDFunctions(rdd: RDD[Genotype]) extends Serializable with Logging
> >
> >      bySample
> >    }
> > +
> > +  def filterByOverlappingRegion(query: ReferenceRegion): RDD[Genotype] = {
> > +    def overlapsQuery(rec: Genotype): Boolean =
> > +      rec.getVariant.getContig.getContigName.toString == query.referenceName &&
>
>  If so, then you need to make it nullable. If not, then we don't need to
> worry about the null check here as you say.
>
> Since it isn't nullable now, no reason to do the check.
>
> Would you ever want to project a Genotype without the variant?
>
> Let's discuss this on the PR
> <https://github.com/bigdatagenomics/bdg-formats/pull/39/files> that makes
> the change. Conceivably, you *could*, but not sure if it makes sense to
> allow people to.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/bigdatagenomics/adam/pull/470/files#r20064839>.
>