1 package org.broadinstitute.hellbender.tools.walkers.annotator;
2 
3 import htsjdk.variant.variantcontext.Allele;
4 import htsjdk.variant.variantcontext.Genotype;
5 import htsjdk.variant.variantcontext.GenotypeBuilder;
6 import htsjdk.variant.variantcontext.VariantContext;
7 import htsjdk.variant.vcf.VCFFormatHeaderLine;
8 import org.broadinstitute.hellbender.engine.ReferenceContext;
9 import org.broadinstitute.hellbender.utils.genotyper.AlleleLikelihoods;
10 import org.broadinstitute.hellbender.utils.read.GATKRead;
11 
12 import java.util.List;
13 
14 /**
15  * Represents an annotation that is computed for a single genotype.
16  */
17 public abstract class GenotypeAnnotation extends VariantAnnotation{
18 
19     /**
20      * Computes the annotation for the given genotype and the likelihoods per read.
21      * Expected to modified the passed genotype builder.
22      *
23      * @param ref Reference context, may be null
24      * @param vc Variant to be annotated. Not null.
25      * @param likelihoods matrix of likelihoods indexed by allele and read
26      * @param g the genotype to annotate. May be null.
27      * @param gb the builder to modify and annotations to. Not null.
28      */
annotate(final ReferenceContext ref, final VariantContext vc, final Genotype g, final GenotypeBuilder gb, final AlleleLikelihoods<GATKRead, Allele> likelihoods)29     public abstract void annotate(final ReferenceContext ref,
30                                   final VariantContext vc,
31                                   final Genotype g,
32                                   final GenotypeBuilder gb,
33                                   final AlleleLikelihoods<GATKRead, Allele> likelihoods);
34 
35     /**
36      * Return the descriptions used for the VCF FORMAT meta field.
37      * Subclasses must ensure that this list is not null and does not contain null.
38      */
getDescriptions()39     public abstract List<VCFFormatHeaderLine> getDescriptions();
40 }