Package org.snpeff.interval
Class Variant
java.lang.Object
org.snpeff.interval.Interval
org.snpeff.interval.Marker
org.snpeff.interval.Variant
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<Interval>,TxtSerializable
- Direct Known Subclasses:
VariantBnd,VariantNonRef,VariantVcfEntry,VariantWithScore
A variant represents a change in a reference sequence
Notes: This class was previously known as Variant.
As of version 4.0, variants in the negative strand are NOT allowed any more (they just complicate the code and bring no real benefit).
We are also storing much less information fields like quality, score, coverage, etc. have been removed.
- Author:
- pcingola
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Stringstatic final doublestatic final intprotected booleanstatic final Variantprotected Stringprotected Variant.VariantTypeFields inherited from class org.snpeff.interval.Interval
chromosomeNameOri, end, id, parent, start, strandMinus -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Perform a shallow cloneintCompare by start and endVariant[]Decompose a variant into basic constituents At the moment this only makes sense for MIXED variants which are decomposed into two variants: MNP + InDelfactory(Chromosome chromo, int start, String ref, String altStr, String id, boolean expand) Create variants from ALT (which can be multiple values)getAlt()inthashCode()booleanisBnd()booleanisDel()booleanisDup()booleanbooleanbooleanisInDel()booleanisIns()booleanbooleanisInv()booleanisMixed()booleanisMnp()booleanisNonRef()protected booleanShow an error if parent does not include child?booleanisSnp()booleanbooleanIs this a huge structural variant?booleanbooleanIs this a change or is ALT actually the same as the referenceintCalculate the number of bases of change in lengthnetChange(boolean reverseStrand) Return the change (always compared to 'referenceStrand')Only the part of the change that overlaps with a marker Return the change (always in positive strand)Create a new variant realigning it towards the leftmost positionreverse()Reverse variant (e.g.voidsetGenotype(String genotype) voidsetImprecise(boolean imprecise) voidsetVariantType(Variant.VariantType variantType) toString()Show variant in ENSEMBL's VEP formatOld format, used for some test casesMethods inherited from class org.snpeff.interval.Marker
adjust, apply, applyDel, applyDup, applyIns, applyMixed, codonTable, compareToPos, distance, distanceBases, getParent, getType, idChain, idChain, idChain, includes, intersect, isAdjustIfParentDoesNotInclude, isDeferredAnalysis, minus, query, query, readTxt, serializeParse, serializeSave, shouldApply, union, variantEffect, variantEffectNonRefMethods inherited from class org.snpeff.interval.Interval
equals, findParent, getChromosome, getChromosomeName, getChromosomeNameOri, getChromosomeNum, getEnd, getGenome, getGenomeName, getId, getStart, getStrand, intersects, intersects, intersects, intersects, intersectSize, isCircular, isSameChromo, isStrandMinus, isStrandPlus, isValid, setChromosomeNameOri, setEnd, setId, setParent, setStart, setStrandMinus, shiftCoordinates, size, toStr, toStringAsciiArt, toStrPos
-
Field Details
-
HUGE_DELETION_SIZE_THRESHOLD
public static final int HUGE_DELETION_SIZE_THRESHOLD- See Also:
-
HUGE_DELETION_RATIO_THRESHOLD
public static final double HUGE_DELETION_RATIO_THRESHOLD- See Also:
-
NO_VARIANT
-
variantType
-
ref
-
alt
-
genotype
-
imprecise
protected boolean imprecise
-
-
Constructor Details
-
Variant
public Variant() -
Variant
This constructor is used when we only have interval data (e.g. when reading a BED file) -
Variant
-
Variant
-
-
Method Details
-
factory
public static List<Variant> factory(Chromosome chromo, int start, String ref, String altStr, String id, boolean expand) Create variants from ALT (which can be multiple values) -
clone
-
cloneShallow
Description copied from class:MarkerPerform a shallow clone- Overrides:
cloneShallowin classMarker
-
compareTo
Compare by start and end- Specified by:
compareToin interfaceComparable<Interval>- Overrides:
compareToin classMarker
-
decompose
Decompose a variant into basic constituents At the moment this only makes sense for MIXED variants which are decomposed into two variants: MNP + InDel -
getAlt
-
getGenotype
-
setGenotype
-
getReference
-
getVariantType
-
setVariantType
-
hashCode
public int hashCode() -
isBnd
public boolean isBnd() -
isDel
public boolean isDel() -
isDup
public boolean isDup() -
isElongation
public boolean isElongation() -
isImprecise
public boolean isImprecise() -
setImprecise
public void setImprecise(boolean imprecise) -
isInDel
public boolean isInDel() -
isIns
public boolean isIns() -
isInterval
public boolean isInterval() -
isInv
public boolean isInv() -
isMixed
public boolean isMixed() -
isMnp
public boolean isMnp() -
isNonRef
public boolean isNonRef() -
isShowWarningIfParentDoesNotInclude
protected boolean isShowWarningIfParentDoesNotInclude()Description copied from class:MarkerShow an error if parent does not include child?- Overrides:
isShowWarningIfParentDoesNotIncludein classMarker
-
isSnp
public boolean isSnp() -
isStructural
public boolean isStructural() -
isStructuralHuge
public boolean isStructuralHuge()Is this a huge structural variant? -
isTruncation
public boolean isTruncation() -
isVariant
public boolean isVariant()Is this a change or is ALT actually the same as the reference -
lengthChange
public int lengthChange()Calculate the number of bases of change in length -
netChange
Return the change (always compared to 'referenceStrand') -
netChange
Only the part of the change that overlaps with a marker Return the change (always in positive strand) -
realignLeft
Create a new variant realigning it towards the leftmost position -
reverse
Reverse variant (e.g. back to reference in cancer samples) -
toString
-
toStringEnsembl
Show variant in ENSEMBL's VEP format -
toStringOld
Old format, used for some test cases
-