bigdatagenomics/adam — pull request #234 by arahuja (2014-04-29 23:18:33+00:00)
Title: Predicate to filter conversion

This PR is for issue #62

ADAMPredicate derives from UnboundRecordFilter and can be used to set ParquetInputFormat.setUnboundRecordFilter. It also has an apply method to filter an existing RDD. This will allow to use predicates on parquet files for predicate pushdown but also on an already loaded RDD (if we load from BAM/SAM file, or use the same filters after some processing (removing duplicates after mark_duplicates before proceeding to the other read-prep stages))

I added a few examples - HighQualityReadPredicate, UniqueMappedRead and GenotypeRecordPASSPredicate.

Also, in ADAMRecordConditions and ADAMGenotypeConditions are utility predicates which can be composed using AND and OR to create a new predicate. We can also specify non-equality predicates easily as well.