Class VariantEffect

java.lang.Object
org.snpeff.snpEffect.VariantEffect
All Implemented Interfaces:
Cloneable, Comparable<VariantEffect>
Direct Known Subclasses:
VariantEffectStructural

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

    • MAX_CODON_SEQUENCE_LEN

      public static final int MAX_CODON_SEQUENCE_LEN
      See Also:
    • variant

      protected Variant variant
    • effectTypes

      protected List<EffectType> effectTypes
    • effectType

      protected EffectType effectType
    • effectImpacts

      protected List<VariantEffect.EffectImpact> effectImpacts
    • effectImpact

      protected VariantEffect.EffectImpact effectImpact
    • marker

      protected Marker marker
    • error

      protected String error
    • warning

      protected String warning
    • message

      protected String message
    • codonsRef

      protected String codonsRef
    • codonsAlt

      protected String codonsAlt
    • codonsAroundOld

      protected String codonsAroundOld
    • codonsAroundNew

      protected String codonsAroundNew
    • distance

      protected int distance
    • cDnaPos

      protected int cDnaPos
    • codonNum

      protected int codonNum
    • codonIndex

      protected int codonIndex
    • codonDegeneracy

      protected int codonDegeneracy
    • aaRef

      protected String aaRef
    • aaAlt

      protected String aaAlt
    • aasAroundOld

      protected String aasAroundOld
    • aasAroundNew

      protected String aasAroundNew
  • Constructor Details

  • Method Details

    • addEffect

      public void addEffect(EffectType effectType)
    • addEffectImpact

      public void addEffectImpact(VariantEffect.EffectImpact effectImpact)
    • addEffectType

      public void addEffectType(EffectType effectType)
    • addErrorMessage

      public void addErrorMessage(ErrorWarningType errmsg)
    • addErrorWarningInfo

      public void addErrorWarningInfo(ErrorWarningType errwarn)
      Add an error or warning
    • addInfoMessage

      public void addInfoMessage(ErrorWarningType infomsg)
    • addWarningMessge

      public void addWarningMessge(ErrorWarningType warnmsg)
    • clone

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

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

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

      public String getAaAlt()
    • getAaChange

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

      public 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 String getAaNetChange()
      Net AA change (InDels)
    • getAaRef

      public 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 String getCodonChange()
      Codon change string
    • getCodonChangeMax

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

      public int getCodonIndex()
    • getCodonNum

      public int getCodonNum()
    • getCodonsAlt

      public String getCodonsAlt()
    • getCodonsRef

      public String getCodonsRef()
    • getDistance

      public int getDistance()
    • setDistance

      public void setDistance(int distance)
    • getEffectImpact

      public VariantEffect.EffectImpact getEffectImpact()
      Return impact of this effect
    • setEffectImpact

      public void setEffectImpact(VariantEffect.EffectImpact effectImpact)
    • getEffectType

      public EffectType getEffectType()
      Highest effect type
    • setEffectType

      public void setEffectType(EffectType effectType)
    • getEffectTypes

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

      public String getEffectTypeString(boolean useSeqOntology)
    • getEffectTypeString

      public String getEffectTypeString(boolean useSeqOntology, boolean useFirstEffect)
    • getEffectTypeString

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

      public 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 String getGeneRegion()
    • getGenes

      public List<Gene> getGenes()
    • getGenotype

      public String getGenotype()
      Get genotype string
    • getHgvs

      public String getHgvs()
      Change in HGVS notation
    • getHgvsDna

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

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

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

      public Marker getMarker()
    • setMarker

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

      public Transcript getTranscript()
    • getVariant

      public Variant getVariant()
    • getWarning

      public String getWarning()
    • hasAdditionalAnnotations

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

      public boolean hasEffectImpact(VariantEffect.EffectImpact effectImpact)
    • 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()
    • set

      public void set(Marker marker, EffectType effectType, VariantEffect.EffectImpact effectImpact, String message)
    • setCodons

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

      public void setCodonsAround(String codonsLeft, String codonsRight)
      Set values for codons around change.
    • setEffect

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

      public String toStr()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toString

      public String toString(boolean useSeqOntology, boolean useHgvs)
    • toStringSimple

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