Class VariantCallingAnnotations

  • All Implemented Interfaces:
    Externalizable, Serializable, Comparable<org.apache.avro.specific.SpecificRecord>, org.apache.avro.generic.GenericContainer, org.apache.avro.generic.GenericRecord, org.apache.avro.generic.IndexedRecord, org.apache.avro.specific.SpecificRecord

    public class VariantCallingAnnotations
    extends org.apache.avro.specific.SpecificRecordBase
    implements org.apache.avro.specific.SpecificRecord
    This record represents all stats that, inside a VCF, are stored outside of the sample but are computed based on the samples. For instance, MAPQ0 is an aggregate stat computed from all samples and stored inside the INFO line.
    See Also:
    Serialized Form
    • Field Detail

      • SCHEMA$

        public static final org.apache.avro.Schema SCHEMA$
    • Constructor Detail

      • VariantCallingAnnotations

        public VariantCallingAnnotations()
        Default constructor. Note that this does not initialize fields to their default values from the schema. If that is desired then one should use newBuilder().
      • VariantCallingAnnotations

        public VariantCallingAnnotations​(Boolean filtersApplied,
                                         Boolean filtersPassed,
                                         List<String> filtersFailed,
                                         Boolean downsampled,
                                         Float baseQRankSum,
                                         Float fisherStrandBiasPValue,
                                         Float rmsMapQ,
                                         Integer mapq0Reads,
                                         Float mqRankSum,
                                         Float readPositionRankSum,
                                         List<Float> genotypePriors,
                                         List<Float> genotypePosteriors,
                                         Float vqslod,
                                         String culprit,
                                         Map<String,​String> attributes)
        All-args constructor.
        Parameters:
        filtersApplied - True if filters were applied for this genotype call. FORMAT field "FT" any value other than the missing value.
        filtersPassed - True if all filters for this genotype call passed. FORMAT field "FT" value PASS.
        filtersFailed - Zero or more filters that failed for this genotype call from FORMAT field "FT".
        downsampled - True if the reads covering this site were randomly downsampled to reduce coverage.
        baseQRankSum - The Wilcoxon rank-sum test statistic of the base quality scores. The base quality scores are separated by whether or not the base supports the reference or the alternate allele.
        fisherStrandBiasPValue - The Fisher's exact test score for the strand bias of the reference and alternate alleles. Stored as a phred scaled probability. Thus, if: a = The number of positive strand reads covering the reference allele b = The number of positive strand reads covering the alternate allele c = The number of negative strand reads covering the reference allele d = The number of negative strand reads covering the alternate allele This value takes the score: -10 log((a + b)! * (c + d)! * (a + c)! * (b + d)! / (a! b! c! d! n!) Where n = a + b + c + d.
        rmsMapQ - The root mean square of the mapping qualities of reads covering this site.
        mapq0Reads - The number of reads at this site with mapping quality equal to 0.
        mqRankSum - The Wilcoxon rank-sum test statistic of the mapping quality scores. The mapping quality scores are separated by whether or not the read supported the reference or the alternate allele.
        readPositionRankSum - The Wilcoxon rank-sum test statistic of the position of the base in the read at this site. The positions are separated by whether or not the base supports the reference or the alternate allele.
        genotypePriors - The log scale prior probabilities of the various genotype states at this site. The number of elements in this array should be equal to the ploidy at this site, plus 1.
        genotypePosteriors - The log scaled posterior probabilities of the various genotype states at this site, in this sample. The number of elements in this array should be equal to the ploidy at this site, plus 1.
        vqslod - The log-odds ratio of being a true vs. false variant under a trained statistical model. This model can be a multivariate Gaussian mixture, support vector machine, etc.
        culprit - If known, the feature that contributed the most to this variant being classified as a false variant.
        attributes - Additional feature info that doesn't fit into the standard fields above. They are all encoded as (string, string) key-value pairs.
    • Method Detail

      • getClassSchema

        public static org.apache.avro.Schema getClassSchema()
      • getEncoder

        public static org.apache.avro.message.BinaryMessageEncoder<VariantCallingAnnotations> getEncoder()
        Return the BinaryMessageEncoder instance used by this class.
        Returns:
        the message encoder used by this class
      • getDecoder

        public static org.apache.avro.message.BinaryMessageDecoder<VariantCallingAnnotations> getDecoder()
        Return the BinaryMessageDecoder instance used by this class.
        Returns:
        the message decoder used by this class
      • createDecoder

        public static org.apache.avro.message.BinaryMessageDecoder<VariantCallingAnnotations> createDecoder​(org.apache.avro.message.SchemaStore resolver)
        Create a new BinaryMessageDecoder instance for this class that uses the specified SchemaStore.
        Parameters:
        resolver - a SchemaStore used to find schemas by fingerprint
        Returns:
        a BinaryMessageDecoder instance for this class backed by the given SchemaStore
      • toByteBuffer

        public ByteBuffer toByteBuffer()
                                throws IOException
        Serializes this VariantCallingAnnotations to a ByteBuffer.
        Returns:
        a buffer holding the serialized data for this instance
        Throws:
        IOException - if this instance could not be serialized
      • fromByteBuffer

        public static VariantCallingAnnotations fromByteBuffer​(ByteBuffer b)
                                                        throws IOException
        Deserializes a VariantCallingAnnotations from a ByteBuffer.
        Parameters:
        b - a byte buffer holding serialized data for an instance of this class
        Returns:
        a VariantCallingAnnotations instance decoded from the given buffer
        Throws:
        IOException - if the given bytes could not be deserialized into an instance of this class
      • getSpecificData

        public org.apache.avro.specific.SpecificData getSpecificData()
        Overrides:
        getSpecificData in class org.apache.avro.specific.SpecificRecordBase
      • getSchema

        public org.apache.avro.Schema getSchema()
        Specified by:
        getSchema in interface org.apache.avro.generic.GenericContainer
        Specified by:
        getSchema in class org.apache.avro.specific.SpecificRecordBase
      • get

        public Object get​(int field$)
        Specified by:
        get in interface org.apache.avro.generic.IndexedRecord
        Specified by:
        get in class org.apache.avro.specific.SpecificRecordBase
      • put

        public void put​(int field$,
                        Object value$)
        Specified by:
        put in interface org.apache.avro.generic.IndexedRecord
        Specified by:
        put in class org.apache.avro.specific.SpecificRecordBase
      • getFiltersApplied

        public Boolean getFiltersApplied()
        Gets the value of the 'filtersApplied' field.
        Returns:
        True if filters were applied for this genotype call. FORMAT field "FT" any value other than the missing value.
      • setFiltersApplied

        public void setFiltersApplied​(Boolean value)
        Sets the value of the 'filtersApplied' field. True if filters were applied for this genotype call. FORMAT field "FT" any value other than the missing value.
        Parameters:
        value - the value to set.
      • getFiltersPassed

        public Boolean getFiltersPassed()
        Gets the value of the 'filtersPassed' field.
        Returns:
        True if all filters for this genotype call passed. FORMAT field "FT" value PASS.
      • setFiltersPassed

        public void setFiltersPassed​(Boolean value)
        Sets the value of the 'filtersPassed' field. True if all filters for this genotype call passed. FORMAT field "FT" value PASS.
        Parameters:
        value - the value to set.
      • getFiltersFailed

        public List<String> getFiltersFailed()
        Gets the value of the 'filtersFailed' field.
        Returns:
        Zero or more filters that failed for this genotype call from FORMAT field "FT".
      • setFiltersFailed

        public void setFiltersFailed​(List<String> value)
        Sets the value of the 'filtersFailed' field. Zero or more filters that failed for this genotype call from FORMAT field "FT".
        Parameters:
        value - the value to set.
      • getDownsampled

        public Boolean getDownsampled()
        Gets the value of the 'downsampled' field.
        Returns:
        True if the reads covering this site were randomly downsampled to reduce coverage.
      • setDownsampled

        public void setDownsampled​(Boolean value)
        Sets the value of the 'downsampled' field. True if the reads covering this site were randomly downsampled to reduce coverage.
        Parameters:
        value - the value to set.
      • getBaseQRankSum

        public Float getBaseQRankSum()
        Gets the value of the 'baseQRankSum' field.
        Returns:
        The Wilcoxon rank-sum test statistic of the base quality scores. The base quality scores are separated by whether or not the base supports the reference or the alternate allele.
      • setBaseQRankSum

        public void setBaseQRankSum​(Float value)
        Sets the value of the 'baseQRankSum' field. The Wilcoxon rank-sum test statistic of the base quality scores. The base quality scores are separated by whether or not the base supports the reference or the alternate allele.
        Parameters:
        value - the value to set.
      • getFisherStrandBiasPValue

        public Float getFisherStrandBiasPValue()
        Gets the value of the 'fisherStrandBiasPValue' field.
        Returns:
        The Fisher's exact test score for the strand bias of the reference and alternate alleles. Stored as a phred scaled probability. Thus, if: a = The number of positive strand reads covering the reference allele b = The number of positive strand reads covering the alternate allele c = The number of negative strand reads covering the reference allele d = The number of negative strand reads covering the alternate allele This value takes the score: -10 log((a + b)! * (c + d)! * (a + c)! * (b + d)! / (a! b! c! d! n!) Where n = a + b + c + d.
      • setFisherStrandBiasPValue

        public void setFisherStrandBiasPValue​(Float value)
        Sets the value of the 'fisherStrandBiasPValue' field. The Fisher's exact test score for the strand bias of the reference and alternate alleles. Stored as a phred scaled probability. Thus, if: a = The number of positive strand reads covering the reference allele b = The number of positive strand reads covering the alternate allele c = The number of negative strand reads covering the reference allele d = The number of negative strand reads covering the alternate allele This value takes the score: -10 log((a + b)! * (c + d)! * (a + c)! * (b + d)! / (a! b! c! d! n!) Where n = a + b + c + d.
        Parameters:
        value - the value to set.
      • getRmsMapQ

        public Float getRmsMapQ()
        Gets the value of the 'rmsMapQ' field.
        Returns:
        The root mean square of the mapping qualities of reads covering this site.
      • setRmsMapQ

        public void setRmsMapQ​(Float value)
        Sets the value of the 'rmsMapQ' field. The root mean square of the mapping qualities of reads covering this site.
        Parameters:
        value - the value to set.
      • getMapq0Reads

        public Integer getMapq0Reads()
        Gets the value of the 'mapq0Reads' field.
        Returns:
        The number of reads at this site with mapping quality equal to 0.
      • setMapq0Reads

        public void setMapq0Reads​(Integer value)
        Sets the value of the 'mapq0Reads' field. The number of reads at this site with mapping quality equal to 0.
        Parameters:
        value - the value to set.
      • getMqRankSum

        public Float getMqRankSum()
        Gets the value of the 'mqRankSum' field.
        Returns:
        The Wilcoxon rank-sum test statistic of the mapping quality scores. The mapping quality scores are separated by whether or not the read supported the reference or the alternate allele.
      • setMqRankSum

        public void setMqRankSum​(Float value)
        Sets the value of the 'mqRankSum' field. The Wilcoxon rank-sum test statistic of the mapping quality scores. The mapping quality scores are separated by whether or not the read supported the reference or the alternate allele.
        Parameters:
        value - the value to set.
      • getReadPositionRankSum

        public Float getReadPositionRankSum()
        Gets the value of the 'readPositionRankSum' field.
        Returns:
        The Wilcoxon rank-sum test statistic of the position of the base in the read at this site. The positions are separated by whether or not the base supports the reference or the alternate allele.
      • setReadPositionRankSum

        public void setReadPositionRankSum​(Float value)
        Sets the value of the 'readPositionRankSum' field. The Wilcoxon rank-sum test statistic of the position of the base in the read at this site. The positions are separated by whether or not the base supports the reference or the alternate allele.
        Parameters:
        value - the value to set.
      • getGenotypePriors

        public List<Float> getGenotypePriors()
        Gets the value of the 'genotypePriors' field.
        Returns:
        The log scale prior probabilities of the various genotype states at this site. The number of elements in this array should be equal to the ploidy at this site, plus 1.
      • setGenotypePriors

        public void setGenotypePriors​(List<Float> value)
        Sets the value of the 'genotypePriors' field. The log scale prior probabilities of the various genotype states at this site. The number of elements in this array should be equal to the ploidy at this site, plus 1.
        Parameters:
        value - the value to set.
      • getGenotypePosteriors

        public List<Float> getGenotypePosteriors()
        Gets the value of the 'genotypePosteriors' field.
        Returns:
        The log scaled posterior probabilities of the various genotype states at this site, in this sample. The number of elements in this array should be equal to the ploidy at this site, plus 1.
      • setGenotypePosteriors

        public void setGenotypePosteriors​(List<Float> value)
        Sets the value of the 'genotypePosteriors' field. The log scaled posterior probabilities of the various genotype states at this site, in this sample. The number of elements in this array should be equal to the ploidy at this site, plus 1.
        Parameters:
        value - the value to set.
      • getVqslod

        public Float getVqslod()
        Gets the value of the 'vqslod' field.
        Returns:
        The log-odds ratio of being a true vs. false variant under a trained statistical model. This model can be a multivariate Gaussian mixture, support vector machine, etc.
      • setVqslod

        public void setVqslod​(Float value)
        Sets the value of the 'vqslod' field. The log-odds ratio of being a true vs. false variant under a trained statistical model. This model can be a multivariate Gaussian mixture, support vector machine, etc.
        Parameters:
        value - the value to set.
      • getCulprit

        public String getCulprit()
        Gets the value of the 'culprit' field.
        Returns:
        If known, the feature that contributed the most to this variant being classified as a false variant.
      • setCulprit

        public void setCulprit​(String value)
        Sets the value of the 'culprit' field. If known, the feature that contributed the most to this variant being classified as a false variant.
        Parameters:
        value - the value to set.
      • getAttributes

        public Map<String,​String> getAttributes()
        Gets the value of the 'attributes' field.
        Returns:
        Additional feature info that doesn't fit into the standard fields above. They are all encoded as (string, string) key-value pairs.
      • setAttributes

        public void setAttributes​(Map<String,​String> value)
        Sets the value of the 'attributes' field. Additional feature info that doesn't fit into the standard fields above. They are all encoded as (string, string) key-value pairs.
        Parameters:
        value - the value to set.
      • newBuilder

        public static VariantCallingAnnotations.Builder newBuilder()
        Creates a new VariantCallingAnnotations RecordBuilder.
        Returns:
        A new VariantCallingAnnotations RecordBuilder
      • newBuilder

        public static VariantCallingAnnotations.Builder newBuilder​(VariantCallingAnnotations other)
        Creates a new VariantCallingAnnotations RecordBuilder by copying an existing VariantCallingAnnotations instance.
        Parameters:
        other - The existing instance to copy.
        Returns:
        A new VariantCallingAnnotations RecordBuilder
      • hasCustomCoders

        protected boolean hasCustomCoders()
        Overrides:
        hasCustomCoders in class org.apache.avro.specific.SpecificRecordBase
      • customEncode

        public void customEncode​(org.apache.avro.io.Encoder out)
                          throws IOException
        Overrides:
        customEncode in class org.apache.avro.specific.SpecificRecordBase
        Throws:
        IOException
      • customDecode

        public void customDecode​(org.apache.avro.io.ResolvingDecoder in)
                          throws IOException
        Overrides:
        customDecode in class org.apache.avro.specific.SpecificRecordBase
        Throws:
        IOException