Package org.snpeff.snpEffect
Class VariantEffect
- java.lang.Object
-
- org.snpeff.snpEffect.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVariantEffect.Codingstatic classVariantEffect.EffectImpactstatic classVariantEffect.FunctionalClassThis class is only getFused for SNPs
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringaaAltprotected java.lang.StringaaRefprotected java.lang.StringaasAroundNewprotected java.lang.StringaasAroundOldprotected intcDnaPosprotected intcodonDegeneracyprotected intcodonIndexprotected intcodonNumprotected java.lang.StringcodonsAltprotected java.lang.StringcodonsAroundNewprotected java.lang.StringcodonsAroundOldprotected java.lang.StringcodonsRefprotected intdistanceprotected VariantEffect.EffectImpacteffectImpactprotected java.util.List<VariantEffect.EffectImpact>effectImpactsprotected EffectTypeeffectTypeprotected java.util.List<EffectType>effectTypesprotected java.lang.Stringerrorprotected Markermarkerstatic intMAX_CODON_SEQUENCE_LENprotected java.lang.Stringmessageprotected Variantvariantprotected java.lang.Stringwarning
-
Constructor Summary
Constructors Constructor Description VariantEffect(Variant variant)VariantEffect(Variant variant, Marker marker, EffectType effectType, VariantEffect.EffectImpact effectImpact, java.lang.String codonsOld, java.lang.String codonsNew, int codonNum, int codonIndex, int cDnaPos)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEffect(EffectType effectType)voidaddEffectImpact(VariantEffect.EffectImpact effectImpact)voidaddEffectType(EffectType effectType)voidaddErrorMessage(ErrorWarningType errmsg)voidaddErrorWarningInfo(ErrorWarningType errwarn)Add an error or warningvoidaddInfoMessage(ErrorWarningType infomsg)voidaddWarningMessge(ErrorWarningType warnmsg)VariantEffectclone()intcompareTo(VariantEffect varEffOther)java.lang.Stringeffect(boolean shortFormat, boolean showAaChange, boolean showBioType, boolean useSeqOntology, boolean useFirstEffect)Show a string with overall effectjava.lang.StringgetAaAlt()java.lang.StringgetAaChange()Amino acid change string (HGVS style)java.lang.StringgetAaChangeOld()Amino acid change string (old style)intgetAaLength()Amino acid length (negative if there is none)java.lang.StringgetAaNetChange()Net AA change (InDels)java.lang.StringgetAaRef()BioTypegetBiotype()Get biotypeintgetcDnaPos()intgetCdsLength()CDS length (negative if there is none)java.lang.StringgetCodonChange()Codon change stringjava.lang.StringgetCodonChangeMax()Codon change string (if it's not too long)intgetCodonIndex()intgetCodonNum()java.lang.StringgetCodonsAlt()java.lang.StringgetCodonsRef()intgetDistance()VariantEffect.EffectImpactgetEffectImpact()Return impact of this effectEffectTypegetEffectType()Highest effect typejava.util.List<EffectType>getEffectTypes()Highest effect typejava.lang.StringgetEffectTypeString(boolean useSeqOntology)java.lang.StringgetEffectTypeString(boolean useSeqOntology, boolean useFirstEffect)java.lang.StringgetEffectTypeString(boolean useSeqOntology, boolean useFirstEffect, EffFormatVersion formatVersion)Get Effect Type as a stringjava.lang.StringgetError()ExongetExon()Get exon (if any)VariantEffect.FunctionalClassgetFunctionalClass()Return functional class of this effect (i.e.GenegetGene()java.lang.StringgetGeneRegion()java.util.List<Gene>getGenes()java.lang.StringgetGenotype()Get genotype stringjava.lang.StringgetHgvs()Change in HGVS notationjava.lang.StringgetHgvsDna()Change in HGVS (Dna) notationjava.lang.StringgetHgvsProt()Change in HGVS (Protein) notationIntrongetIntron()Get intron (if any)MarkergetMarker()TranscriptgetTranscript()VariantgetVariant()java.lang.StringgetWarning()booleanhasAdditionalAnnotations()Do we have an associated marker with additional annotations?booleanhasEffectImpact(VariantEffect.EffectImpact effectImpact)booleanhasEffectType(EffectType effectType)booleanhasError()booleanhasWarning()booleanisCustom()booleanisExon()booleanisIntergenic()booleanisIntron()booleanisMotif()booleanisMultipleGenes()booleanisNextProt()booleanisRegulation()booleanisSpliceSite()booleanisSpliceSiteCore()booleanisSpliceSiteRegion()booleanisUtr3()booleanisUtr5()voidset(Marker marker, EffectType effectType, VariantEffect.EffectImpact effectImpact, java.lang.String message)voidsetCodons(java.lang.String codonsOld, java.lang.String codonsNew, int codonNum, int codonIndex)Set codon change.voidsetCodonsAround(java.lang.String codonsLeft, java.lang.String codonsRight)Set values for codons around change.voidsetDistance(int distance)voidsetEffect(EffectType effectType)Set effect using default impactvoidsetEffectImpact(VariantEffect.EffectImpact effectImpact)voidsetEffectType(EffectType effectType)voidsetMarker(Marker marker)Set marker.java.lang.StringtoStr()java.lang.StringtoString()java.lang.StringtoString(boolean useSeqOntology, boolean useHgvs)java.lang.StringtoStringSimple(boolean shortFormat)Get the simplest string describing the effect (this is mostly used for testcases)
-
-
-
Field Detail
-
MAX_CODON_SEQUENCE_LEN
public static final int MAX_CODON_SEQUENCE_LEN
- See Also:
- Constant Field Values
-
variant
protected Variant variant
-
effectTypes
protected java.util.List<EffectType> effectTypes
-
effectType
protected EffectType effectType
-
effectImpacts
protected java.util.List<VariantEffect.EffectImpact> effectImpacts
-
effectImpact
protected VariantEffect.EffectImpact effectImpact
-
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)
-
VariantEffect
public VariantEffect(Variant variant, Marker marker, EffectType effectType, VariantEffect.EffectImpact effectImpact, java.lang.String codonsOld, java.lang.String codonsNew, int codonNum, int codonIndex, int cDnaPos)
-
-
Method Detail
-
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:
clonein classjava.lang.Object
-
compareTo
public int compareTo(VariantEffect varEffOther)
- Specified by:
compareToin interfacejava.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()
-
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 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()
-
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 java.lang.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, java.lang.String message)
-
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.
-
setEffect
public void setEffect(EffectType effectType)
Set effect using default impact
-
toStr
public java.lang.String toStr()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.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)
-
-