Class VariantEffect

  • All Implemented Interfaces:
    java.lang.Cloneable, java.lang.Comparable<VariantEffect>
    Direct Known Subclasses:
    VariantEffectStructural

    public class VariantEffect
    extends java.lang.Object
    implements java.lang.Cloneable, java.lang.Comparable<VariantEffect>
    Effect of a variant.
    Author:
    pcingola
    • Field Detail

      • variant

        protected Variant variant
      • effectTypes

        protected java.util.List<EffectType> effectTypes
      • marker

        protected Marker marker
      • error

        protected java.lang.String error
      • warning

        protected java.lang.String warning
      • message

        protected java.lang.String message
      • codonsRef

        protected java.lang.String codonsRef
      • codonsAlt

        protected java.lang.String codonsAlt
      • codonsAroundOld

        protected java.lang.String codonsAroundOld
      • codonsAroundNew

        protected java.lang.String codonsAroundNew
      • distance

        protected int distance
      • cDnaPos

        protected int cDnaPos
      • codonNum

        protected int codonNum
      • codonIndex

        protected int codonIndex
      • codonDegeneracy

        protected int codonDegeneracy
      • aaRef

        protected java.lang.String aaRef
      • aaAlt

        protected java.lang.String aaAlt
      • aasAroundOld

        protected java.lang.String aasAroundOld
      • aasAroundNew

        protected java.lang.String aasAroundNew
    • Constructor Detail

      • VariantEffect

        public VariantEffect​(Variant variant)
    • Method Detail

      • addEffect

        public void addEffect​(EffectType effectType)
      • addEffectType

        public void addEffectType​(EffectType effectType)
      • clone

        public VariantEffect clone()
        Overrides:
        clone in class java.lang.Object
      • compareTo

        public int compareTo​(VariantEffect varEffOther)
        Specified by:
        compareTo in interface java.lang.Comparable<VariantEffect>
      • effect

        public java.lang.String effect​(boolean shortFormat,
                                       boolean showAaChange,
                                       boolean showBioType,
                                       boolean useSeqOntology,
                                       boolean useFirstEffect)
        Show a string with overall effect
      • getAaAlt

        public java.lang.String getAaAlt()
      • getAaChange

        public java.lang.String getAaChange()
        Amino acid change string (HGVS style)
      • getAaChangeOld

        public java.lang.String getAaChangeOld()
        Amino acid change string (old style)
      • getAaLength

        public int getAaLength()
        Amino acid length (negative if there is none)
        Returns:
        Amino acid length (CDS length / 3 ) or '-1' if there is no CDS length
      • getAaNetChange

        public java.lang.String getAaNetChange()
        Net AA change (InDels)
      • getAaRef

        public java.lang.String getAaRef()
      • getBiotype

        public BioType getBiotype()
        Get biotype
      • getcDnaPos

        public int getcDnaPos()
      • getCdsLength

        public int getCdsLength()
        CDS length (negative if there is none)
      • getCodonChange

        public java.lang.String getCodonChange()
        Codon change string
      • getCodonChangeMax

        public java.lang.String getCodonChangeMax()
        Codon change string (if it's not too long)
      • getCodonIndex

        public int getCodonIndex()
      • getCodonNum

        public int getCodonNum()
      • getCodonsAlt

        public java.lang.String getCodonsAlt()
      • getCodonsRef

        public java.lang.String getCodonsRef()
      • getDistance

        public int getDistance()
      • getEffectType

        public EffectType getEffectType()
        Highest effect type
      • getEffectTypes

        public java.util.List<EffectType> getEffectTypes()
        Highest effect type
      • getEffectTypeString

        public java.lang.String getEffectTypeString​(boolean useSeqOntology)
      • getEffectTypeString

        public java.lang.String getEffectTypeString​(boolean useSeqOntology,
                                                    boolean useFirstEffect)
      • getEffectTypeString

        public java.lang.String getEffectTypeString​(boolean useSeqOntology,
                                                    boolean useFirstEffect,
                                                    EffFormatVersion formatVersion)
        Get Effect Type as a string
      • getError

        public java.lang.String getError()
      • getExon

        public Exon getExon()
        Get exon (if any)
      • getFunctionalClass

        public VariantEffect.FunctionalClass getFunctionalClass()
        Return functional class of this effect (i.e. NONSENSE, MISSENSE, SILENT or NONE)
      • getGene

        public Gene getGene()
      • getGeneRegion

        public java.lang.String getGeneRegion()
      • getGenes

        public java.util.List<Gene> getGenes()
      • getGenotype

        public java.lang.String getGenotype()
        Get genotype string
      • getHgvs

        public java.lang.String getHgvs()
        Change in HGVS notation
      • getHgvsDna

        public java.lang.String getHgvsDna()
        Change in HGVS (Dna) notation
      • getHgvsProt

        public java.lang.String getHgvsProt()
        Change in HGVS (Protein) notation
      • getIntron

        public Intron getIntron()
        Get intron (if any)
      • getMarker

        public Marker getMarker()
      • getTranscript

        public Transcript getTranscript()
      • getVariant

        public Variant getVariant()
      • getWarning

        public java.lang.String getWarning()
      • hasAdditionalAnnotations

        public boolean hasAdditionalAnnotations()
        Do we have an associated marker with additional annotations?
      • hasEffectType

        public boolean hasEffectType​(EffectType effectType)
      • hasError

        public boolean hasError()
      • hasWarning

        public boolean hasWarning()
      • isCustom

        public boolean isCustom()
      • isExon

        public boolean isExon()
      • isIntergenic

        public boolean isIntergenic()
      • isIntron

        public boolean isIntron()
      • isMotif

        public boolean isMotif()
      • isMultipleGenes

        public boolean isMultipleGenes()
      • isNextProt

        public boolean isNextProt()
      • isRegulation

        public boolean isRegulation()
      • isSpliceSite

        public boolean isSpliceSite()
      • isSpliceSiteCore

        public boolean isSpliceSiteCore()
      • isSpliceSiteRegion

        public boolean isSpliceSiteRegion()
      • isUtr3

        public boolean isUtr3()
      • isUtr5

        public boolean isUtr5()
      • setCodons

        public void setCodons​(java.lang.String codonsOld,
                              java.lang.String codonsNew,
                              int codonNum,
                              int codonIndex)
        Set codon change. Calculate effect type based on codon changes (for SNPs & MNPs)
      • setCodonsAround

        public void setCodonsAround​(java.lang.String codonsLeft,
                                    java.lang.String codonsRight)
        Set values for codons around change.
      • setDistance

        public void setDistance​(int distance)
      • setEffect

        public void setEffect​(EffectType effectType)
        Set effect using default impact
      • setEffectType

        public void setEffectType​(EffectType effectType)
      • setMarker

        public void setMarker​(Marker marker)
        Set marker. Add some warnings if the marker relates to incomplete transcripts
      • toStr

        public java.lang.String toStr()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toString

        public java.lang.String toString​(boolean useSeqOntology,
                                         boolean useHgvs)
      • toStringSimple

        public java.lang.String toStringSimple​(boolean shortFormat)
        Get the simplest string describing the effect (this is mostly used for testcases)