One extra complication is that if you joined with an annotation db but only
one of the alleles was in the db, you'd have to scan the genotypes to find
out which of the samples actually had the variant. I guess that is done
today with VCF files but it seems like we could make it simpler.

Re the predicate pushdown, I was wrong, I assume you can just push down a
predicate that tests whether a list of alleles has the one you want.  But
with ADAM files we can simplify each record while duplicating the variant
metadata, and not pay any extra cost in terms of storage, since it should
be compressed away.


On Wed, Feb 12, 2014 at 4:39 PM, Frank Austin Nothaft <
notifications@github.com> wrote:

> In
> adam-core/src/main/scala/edu/berkeley/cs/amplab/adam/converters/VariantContextConverter.scala:
>
> > -        }
> > -      }
> > -      case None => vc.unfiltered
> > -    }
> > -
> > -    Option(variant.getAlleleFrequency).foreach(r => tagMap += ("AF" -> r))
> > -    Option(variant.getRmsBaseQuality).foreach(r => tagMap += ("BQ" -> r))
> > -    Option(variant.getSiteRmsMappingQuality).foreach(r => tagMap += ("MQ" -> r))
> > -    Option(variant.getSiteMapQZeroCounts).foreach(r => tagMap += ("MQ0" -> r))
> > -    Option(variant.getTotalSiteMapCounts).foreach(r => tagMap += ("DP" -> r))
> > -    Option(variant.getNumberOfSamplesWithData).foreach(r => tagMap += ("NS" -> r))
> > -
> > -    vc.attributes(tagMap)
> > -
> > -    vc
> > +  private def convertAllele(allele: Allele): ADAMGenotypeAllele = {
>
> What is the join done on in the biallelic version—site and ref/non-ref? If
> so, couldn’t a multi-allelic site perform the join on site and allele
> instead?
> … <#144280aa56fadd22_>
> On Feb 12, 2014, at 1:28 PM, Michael Linderman <notifications@github.com>
> wrote: In
> adam-core/src/main/scala/edu/berkeley/cs/amplab/adam/converters/VariantContextConverter.scala:
> > - } > - } > - case None => vc.unfiltered > - } > - > -
> Option(variant.getAlleleFrequency).foreach(r => tagMap += ("AF" -> r)) > -
> Option(variant.getRmsBaseQuality).foreach(r => tagMap += ("BQ" -> r)) > -
> Option(variant.getSiteRmsMappingQuality).foreach(r => tagMap += ("MQ" ->
> r)) > - Option(variant.getSiteMapQZeroCounts).foreach(r => tagMap += ("MQ0"
> -> r)) > - Option(variant.getTotalSiteMapCounts).foreach(r => tagMap +=
> ("DP" -> r)) > - Option(variant.getNumberOfSamplesWithData).foreach(r =>
> tagMap += ("NS" -> r)) > - > - vc.attributes(tagMap) > - > - vc > + private
> def convertAllele(allele: Allele): ADAMGenotypeAllele = { There is actually
> a different motivation for bi-allelic, multi-allelic sites are hard to join
> against external annotations (the different alleles can have very different
> implications). A bi-allelic ADAMVariant is preferred so support those
> operations. We maintain data on the split, and can use phasing/phase-sets
> to maintain the phasing information implied by a try multi-allelic
> genotype. — Reply to this email directly or view it on GitHub.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/bigdatagenomics/adam/pull/97/files#r9687320>
> .
>