Package org.snpeff.interval
Class Marker
java.lang.Object
org.snpeff.interval.Interval
org.snpeff.interval.Marker
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<Interval>,TxtSerializable
- Direct Known Subclasses:
Cds,Chromosome,Custom,Downstream,GenericMarker,Genome,Intergenic,IntergenicConserved,IntervalAndSubIntervals,Intron,IntronConserved,MarkerParentId,MarkerSeq,MicroRnaBindingSite,Motif,NextProt,ProteinInteractionLocus,RareAminoAcid,Regulation,SpliceSite,Upstream,Utr,Variant,VcfEntry
An interval intended as a mark
- Author:
- pcingola
- See Also:
-
Field Summary
FieldsFields inherited from class org.snpeff.interval.Interval
chromosomeNameOri, end, id, parent, start, strandMinus -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAdjust [start,end] to include childApply a variant to a marker.protected MarkerApply a Variant to a marker.protected MarkerApply a Variant to a marker.protected MarkerApply a Variant to a marker.protected MarkerapplyMixed(Variant variant) Apply a mixed variant Note: MIXED variant is interpreted as "MNP + InDel"clone()Perform a shallow cloneGet a suitable codon tableintCompare by start and endintcompareToPos(Interval i2) Compare genomic coordinatesintHow far apart are these intervals?intdistanceBases(List<? extends Marker> markers, boolean fromEnd) Distance from the beginning/end of a list of intervals, until this SNP It count the number of bases in 'markers'getType()idChain()idChain(String separatorBetween, String separatorWithin, boolean useGeneId, VariantEffect varEff) A list of all IDs and parent IDs until chromosomebooleanIs 'interval' completely included in 'this'?Intersect of two markersprotected booleanisAdjustIfParentDoesNotInclude(Marker parent) Adjust parent if it does not include child?booleanDeferred analysis markers must be analyzed after 'standard' ones because their impact depends on other results For instance, a NextProt marker's impact would be different if the variant is synonymous or non-synonymousprotected booleanShow an error if parent does not include child?Return the difference between two markersQuery all genomic regions that intersect 'marker' (this makes sense in Gene, Transcript, Exon, etc.)query(IntervalForest intervalForest) Return a collection of intervals that intersect this markervoidParse a line (form a file) Format: "chromosome \t start \t end \t id \n"voidserializeParse(MarkerSerializer markerSerializer) Parse a line from a serialized fileserializeSave(MarkerSerializer markerSerializer) Create a string to serialize to a filebooleanshouldApply(Variant variant) True if the variant should be applied to the markertoString()Union of two markersbooleanvariantEffect(Variant variant, VariantEffects variantEffects) Calculate the effect of this variantbooleanvariantEffectNonRef(Variant variant, VariantEffects variantEffects) Calculate the effect of this variantMethods inherited from class org.snpeff.interval.Interval
equals, findParent, getChromosome, getChromosomeName, getChromosomeNameOri, getChromosomeNum, getEnd, getGenome, getGenomeName, getId, getStart, getStrand, hashCode, intersects, intersects, intersects, intersects, intersectSize, isCircular, isSameChromo, isStrandMinus, isStrandPlus, isValid, setChromosomeNameOri, setEnd, setId, setParent, setStart, setStrandMinus, shiftCoordinates, size, toStr, toStringAsciiArt, toStrPos
-
Field Details
-
type
-
-
Constructor Details
-
Marker
protected Marker() -
Marker
-
Marker
-
-
Method Details
-
adjust
Adjust [start,end] to include child -
apply
Apply a variant to a marker.Calculate a the result of a marker, such that newMarker = marker.apply( variant ) variant = Diff( newMarker , marker ) // Differences in sequence
Note: This method may return: - The same marker (this) when genetic coordinates remain unchanged - 'null' if the whole marker is removed by the variant (e.g. a deletion spanning the whole marker)
For these reasons, the method should never be invoked directly. This is why the method is 'private' and 'final'
- Returns:
- The marker result after applying variant
-
applyDel
Apply a Variant to a marker. Variant is a deletion -
applyDup
Apply a Variant to a marker. Variant is a duplication -
applyIns
Apply a Variant to a marker. Variant is an insertion -
applyMixed
Apply a mixed variant Note: MIXED variant is interpreted as "MNP + InDel" -
clone
-
cloneShallow
Perform a shallow clone -
codonTable
Get a suitable codon table -
compareTo
Compare by start and end- Specified by:
compareToin interfaceComparable<Interval>- Overrides:
compareToin classInterval
-
compareToPos
Compare genomic coordinates -
distance
How far apart are these intervals?- Returns:
- Distance or -1 if they are not comparable (i.e. different chromosomes)
-
distanceBases
Distance from the beginning/end of a list of intervals, until this SNP It count the number of bases in 'markers' -
getParent
-
getType
-
idChain
-
idChain
-
idChain
public String idChain(String separatorBetween, String separatorWithin, boolean useGeneId, VariantEffect varEff) A list of all IDs and parent IDs until chromosome -
includes
Is 'interval' completely included in 'this'?- Returns:
- return true if 'this' includes 'interval'
-
intersect
Intersect of two markers- Returns:
- A new marker which is the intersect of the two
-
isAdjustIfParentDoesNotInclude
Adjust parent if it does not include child? -
isDeferredAnalysis
public boolean isDeferredAnalysis()Deferred analysis markers must be analyzed after 'standard' ones because their impact depends on other results For instance, a NextProt marker's impact would be different if the variant is synonymous or non-synonymous -
isShowWarningIfParentDoesNotInclude
protected boolean isShowWarningIfParentDoesNotInclude()Show an error if parent does not include child? -
minus
Return the difference between two markers- Parameters:
interval-- Returns:
- A set of 'markers'. Note that the result can have zero, one or two markers
-
query
Return a collection of intervals that intersect this marker -
query
Query all genomic regions that intersect 'marker' (this makes sense in Gene, Transcript, Exon, etc.) -
readTxt
Parse a line (form a file) Format: "chromosome \t start \t end \t id \n" -
serializeParse
Parse a line from a serialized file- Specified by:
serializeParsein interfaceTxtSerializable
-
serializeSave
Create a string to serialize to a file- Specified by:
serializeSavein interfaceTxtSerializable
-
shouldApply
True if the variant should be applied to the marker -
toString
-
union
Union of two markers- Returns:
- A new marker which is the union of the two
-
variantEffect
Calculate the effect of this variant -
variantEffectNonRef
Calculate the effect of this variant- Parameters:
variantEndPoint- : Before analyzing results, we have to change markers using variantrRef to create a new reference 'on the fly'
-