public class MultiAllelicResultFilter extends Object implements ResultFilter
For 2 alt alleles, there are 3 values in the AC_Het field, the third being the count for T-A: 1 6536051 . C T,A 11129.51 PASS AC_Adj=5,3;AC_Het=5,3,0;AC_Hom=0,0; Alt-allele combinations in AC_Het field occur in the following order: C-T, C-A, T-A.
For 3 alt alleles, there are 6 values (3+2+1): 15 66641732 rs2063690 G C,A,T 35371281.87 PASS AC_Adj=13570,3,2;AC_Het=11380,1,2,2,0,0;AC_Hom=1094,0,0; Alt-allele combinations in AC_Het field occur in the following order: G-C, G-A, G-T, C-A, C-T, A-T.
For 4 alt alleles, there are 10 values (4+3+2+1): 21 45650009 rs3831401 T G,C,TG,A 8366813.26 PASS AC_Adj=2528,3415,1,0;AC_Het=934,1240,0,0,725,1,0,0,0,0;AC_Hom=434,725,0,0; Alt-allele combinations in AC_Het field occur in the following order: T-G, T-C, T-TG, T-A, G-C, G-TG, G-A, C-TG, C-A, TG-A.
TODO: Smart matching of non-obvious ref and alt alleles. Right now, we only 'string match' the exact values of ref and alt alleles. However, depending on which other genotypes you call for a certain genomic position, the same variant may be denoted in a different way. For example: "1 231094050 GA G" is the same variant as the GAA/GA in "1 231094050 GAA GA,G", but to allow notation of the the AA deletion (in GAA/G), the ref was written as GAA instead of GA.
This can be tricky. Consider this variant: 1 6529182 . TTCCTCC TTCC
And after some puzzling, you will find that it is seen in ExAC: 1 6529182 . TTCCTCCTCC TTCCTCC,TTCC,T,TTCCTCCTCCTCC,TTCCTCCTCCTCCTCC,TTCCTCCTCCTCCTCCTCCTCC
But here denoted as "TTCCTCCTCC/TTCCTCC". In both cases, a TCC was deleted, but in ExAC this variant is trailed with another TCC. Finding and parsing these variants to correctly match them against databases such as 1000 Genomes and ExAC would be very valuable.
| Constructor and Description |
|---|
MultiAllelicResultFilter(List<Attribute> alleleSpecificAttributes,
boolean mergeMultilineResourceResults,
VcfAttributes vcfAttributes) |
MultiAllelicResultFilter(List<Attribute> alleleSpecificAttributes,
VcfAttributes vcfAttributes) |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.base.Optional<Entity> |
filterResults(Iterable<Entity> resourceEntities,
Entity sourceEntity,
boolean updateMode) |
Collection<Attribute> |
getRequiredAttributes() |
Iterable<Entity> |
merge(Iterable<Entity> resourceEntities)
Combine ALT information per reference allele (in VCF there is only 1 reference by letting ALT vary, but that
might not always be the case)
|
public MultiAllelicResultFilter(List<Attribute> alleleSpecificAttributes, boolean mergeMultilineResourceResults, VcfAttributes vcfAttributes)
public MultiAllelicResultFilter(List<Attribute> alleleSpecificAttributes, VcfAttributes vcfAttributes)
public Collection<Attribute> getRequiredAttributes()
getRequiredAttributes in interface EntityProcessorCollection of atomic Attribute that must be present in the annotated
Entity.public com.google.common.base.Optional<Entity> filterResults(Iterable<Entity> resourceEntities, Entity sourceEntity, boolean updateMode)
filterResults in interface ResultFilterpublic Iterable<Entity> merge(Iterable<Entity> resourceEntities)
So we want to support this hypothetical example: 3 300 G A 0.2|23.1 3 300 G T -2.4|0.123 3 300 G X -0.002|2.3 3 300 G C 0.5|14.5 3 300 GC A 0.2|23.1 3 300 GC T -2.4|0.123 3 300 C GX -0.002|2.3 3 300 C GC 0.5|14.5
So we want to support this hypothetical example: 3 300 G A 0.2|23.1 3 300 G T -2.4|0.123 3 300 G X -0.002|2.3 3 300 G C 0.5|14.5 3 300 GC A 0.2|23.1 3 300 GC T -2.4|0.123 3 300 C GX -0.002|2.3 3 300 C GC 0.5|14.5
and it should become:
3 300 G A,T,X,C 0.2|23.1,-2.4|0.123,-0.002|2.3,0.5|14.5 3 300 GC A,T 0.2|23.1,-2.4|0.123 3 300 C GX,GC -0.002|2.3,0.5|14.5
3 300 G A,T,X,C 0.2|23.1,-2.4|0.123,-0.002|2.3,0.5|14.5 3 300 GC A,T 0.2|23.1,-2.4|0.123 3 300 C GX,GC -0.002|2.3,0.5|14.5
so that the multi-allelic filter can then find back the appropriate values as if it were a multi-allelic VCF line
Copyright © 2017. All rights reserved.