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 class
VariantEffect.Coding
static class
VariantEffect.EffectImpact
static class
VariantEffect.ErrorWarningType
Errors for change effectstatic class
VariantEffect.FunctionalClass
This class is only getFused for SNPs
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
aaAlt
protected java.lang.String
aaRef
protected java.lang.String
aasAroundNew
protected java.lang.String
aasAroundOld
protected int
cDnaPos
protected int
codonDegeneracy
protected int
codonIndex
protected int
codonNum
protected java.lang.String
codonsAlt
protected java.lang.String
codonsAroundNew
protected java.lang.String
codonsAroundOld
protected java.lang.String
codonsRef
protected int
distance
protected VariantEffect.EffectImpact
effectImpact
protected java.util.List<VariantEffect.EffectImpact>
effectImpacts
protected EffectType
effectType
protected java.util.List<EffectType>
effectTypes
protected java.lang.String
error
protected Marker
marker
static int
MAX_CODON_SEQUENCE_LEN
protected java.lang.String
message
protected Variant
variant
protected java.lang.String
warning
-
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 void
addEffect(EffectType effectType)
void
addEffectImpact(VariantEffect.EffectImpact effectImpact)
void
addEffectType(EffectType effectType)
void
addErrorMessage(VariantEffect.ErrorWarningType errmsg)
void
addErrorWarningInfo(VariantEffect.ErrorWarningType errwarn)
Add an error or warningvoid
addInfoMessage(VariantEffect.ErrorWarningType infomsg)
void
addWarningMessge(VariantEffect.ErrorWarningType warnmsg)
VariantEffect
clone()
int
compareTo(VariantEffect varEffOther)
java.lang.String
effect(boolean shortFormat, boolean showAaChange, boolean showBioType, boolean useSeqOntology, boolean useFirstEffect)
Show a string with overall effectjava.lang.String
getAaAlt()
java.lang.String
getAaChange()
Amino acid change string (HGVS style)java.lang.String
getAaChangeOld()
Amino acid change string (old style)int
getAaLength()
Amino acid length (negative if there is none)java.lang.String
getAaNetChange()
Net AA change (InDels)java.lang.String
getAaRef()
BioType
getBiotype()
Get biotypeint
getcDnaPos()
int
getCdsLength()
CDS length (negative if there is none)java.lang.String
getCodonChange()
Codon change stringjava.lang.String
getCodonChangeMax()
Codon change string (if it's not too long)int
getCodonIndex()
int
getCodonNum()
java.lang.String
getCodonsAlt()
java.lang.String
getCodonsRef()
int
getDistance()
VariantEffect.EffectImpact
getEffectImpact()
Return impact of this effectEffectType
getEffectType()
Highest effect typejava.util.List<EffectType>
getEffectTypes()
Highest effect typejava.lang.String
getEffectTypeString(boolean useSeqOntology)
java.lang.String
getEffectTypeString(boolean useSeqOntology, boolean useFirstEffect)
java.lang.String
getEffectTypeString(boolean useSeqOntology, boolean useFirstEffect, EffFormatVersion formatVersion)
Get Effect Type as a stringjava.lang.String
getError()
Exon
getExon()
Get exon (if any)VariantEffect.FunctionalClass
getFunctionalClass()
Return functional class of this effect (i.e.Gene
getGene()
java.lang.String
getGeneRegion()
java.util.List<Gene>
getGenes()
java.lang.String
getGenotype()
Get genotype stringjava.lang.String
getHgvs()
Change in HGVS notationjava.lang.String
getHgvsDna()
Change in HGVS (Dna) notationjava.lang.String
getHgvsProt()
Change in HGVS (Protein) notationIntron
getIntron()
Get intron (if any)Marker
getMarker()
Transcript
getTranscript()
Variant
getVariant()
java.lang.String
getWarning()
boolean
hasAdditionalAnnotations()
Do we have an associated marker with additional annotations?boolean
hasEffectImpact(VariantEffect.EffectImpact effectImpact)
boolean
hasEffectType(EffectType effectType)
boolean
hasError()
boolean
hasWarning()
boolean
isCustom()
boolean
isExon()
boolean
isIntergenic()
boolean
isIntron()
boolean
isMotif()
boolean
isMultipleGenes()
boolean
isNextProt()
boolean
isRegulation()
boolean
isSpliceSite()
boolean
isSpliceSiteCore()
boolean
isSpliceSiteRegion()
boolean
isUtr3()
boolean
isUtr5()
void
set(Marker marker, EffectType effectType, VariantEffect.EffectImpact effectImpact, java.lang.String message)
void
setCodons(java.lang.String codonsOld, java.lang.String codonsNew, int codonNum, int codonIndex)
Set codon change.void
setCodonsAround(java.lang.String codonsLeft, java.lang.String codonsRight)
Set values for codons around change.void
setDistance(int distance)
void
setEffect(EffectType effectType)
Set effect using default impactvoid
setEffectImpact(VariantEffect.EffectImpact effectImpact)
void
setEffectType(EffectType effectType)
void
setMarker(Marker marker)
Set marker.java.lang.String
toStr()
java.lang.String
toString()
java.lang.String
toString(boolean useSeqOntology, boolean useHgvs)
java.lang.String
toStringSimple(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(VariantEffect.ErrorWarningType errmsg)
-
addErrorWarningInfo
public void addErrorWarningInfo(VariantEffect.ErrorWarningType errwarn)
Add an error or warning
-
addInfoMessage
public void addInfoMessage(VariantEffect.ErrorWarningType infomsg)
-
addWarningMessge
public void addWarningMessge(VariantEffect.ErrorWarningType warnmsg)
-
clone
public VariantEffect clone()
- Overrides:
clone
in classjava.lang.Object
-
compareTo
public int compareTo(VariantEffect varEffOther)
- Specified by:
compareTo
in 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()
-
getEffectImpact
public VariantEffect.EffectImpact getEffectImpact()
Return impact of this effect
-
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?
-
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.
-
setDistance
public void setDistance(int distance)
-
setEffect
public void setEffect(EffectType effectType)
Set effect using default impact
-
setEffectImpact
public void setEffectImpact(VariantEffect.EffectImpact effectImpact)
-
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 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)
-
-