Package org.snpeff.interval

# Class MarkerSeq

java.lang.Object
org.snpeff.interval.Interval
org.snpeff.interval.Marker
org.snpeff.interval.MarkerSeq

All Implemented Interfaces:
  `Serializable`, `Cloneable`, `Comparable<Interval>`, `TxtSerializable`

Direct Known Subclasses:
  `Exon`

public class MarkerSeq extends Marker
Marker with a DNA sequence

Author:
  pcingola
See Also:
  - Serialized Form

## Field Summary

### Fields inherited from class org.snpeff.interval.Marker

`type`

### Fields inherited from class org.snpeff.interval.Interval

`chromosomeNameOri, end, id, parent, start, strandMinus`

## Constructor Summary

Constructors
Constructor
Description
`MarkerSeq()`
`MarkerSeq(Marker parent, int start, int end, boolean strandMinus, String id)`
`MarkerSeq(Marker parent, int start, int end, String seq)`

## Method Summary

Modifier and Type
Method
Description
`MarkerSeq`
`apply(Variant variant)`
Apply variant
`protected void`
`applyDel(Variant variant, MarkerSeq markerSeq)`
Apply a change type deletion (update sequence)
`protected void`
`applyDup(Variant variant, MarkerSeq markerSeq)`
Apply a change type duplication (update sequence)
`protected void`
`applyIns(Variant variant, MarkerSeq markerSeq)`
Apply a change type insertion (update sequence)
`protected void`
`applyMnp(Variant variant, MarkerSeq markerSeq)`
Apply a change type MNP (update sequence)
`protected void`
`applySnp(Variant variant, MarkerSeq markerSeq)`
Apply a change type SNP (update sequence)
`String`
`basesAt(int index, int len)`
Base in this marker at position 'index' (relative to marker start)
`String`
`basesAtPos(int pos, int len)`
Base at position 'pos' (genomic coordinates)
`MarkerSeq`
`cloneShallow()`
Perform a shallow clone
`String`
`getSequence()`
Get sequence WARNING: Sequence is always according to coding strand.
`String`
`getSequence(Marker marker)`
Get sequence intersecting 'marker' WARNING: Sequence is always according to coding strand.
`boolean`
`hasSequence()`
Do we have a sequence for this exon?
`void`
`serializeParse(MarkerSerializer markerSerializer)`
Parse a line from a serialized file
`String`
`serializeSave(MarkerSerializer markerSerializer)`
Create a string to serialize to a file
`void`
`setSequence(String sequence)`
Set sequence WARNING: Sequence is always according to coding strand.
`String`
`toString()`
`Marker`
`union(Marker m)`
Union of two markers

### Methods inherited from class org.snpeff.interval.Marker

`adjust, applyDel, applyDup, applyIns, applyMixed, clone, codonTable, compareTo, compareToPos, distance, distanceBases, getParent, getType, idChain, idChain, idChain, includes, intersect, isAdjustIfParentDoesNotInclude, isDeferredAnalysis, isShowWarningIfParentDoesNotInclude, minus, query, query, readTxt, shouldApply, variantEffect, variantEffectNonRef`

### Methods 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`

### Methods inherited from class java.lang.Object

`equals, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Constructor Details

### MarkerSeq

public MarkerSeq()

### MarkerSeq

public MarkerSeq(Marker parent, int start, int end, boolean strandMinus, String id)

### MarkerSeq

public MarkerSeq(Marker parent, int start, int end, String seq)

## Method Details

### apply

public MarkerSeq apply(Variant variant)
Apply variant

Overrides:
  `apply` in class `Marker`
Returns:
  The marker result after applying variant

### applyDel

protected void applyDel(Variant variant, MarkerSeq markerSeq)
Apply a change type deletion (update sequence)

### applyDup

protected void applyDup(Variant variant, MarkerSeq markerSeq)
Apply a change type duplication (update sequence)

### applyIns

protected void applyIns(Variant variant, MarkerSeq markerSeq)
Apply a change type insertion (update sequence)

### applyMnp

protected void applyMnp(Variant variant, MarkerSeq markerSeq)
Apply a change type MNP (update sequence)

### applySnp

protected void applySnp(Variant variant, MarkerSeq markerSeq)
Apply a change type SNP (update sequence)

### basesAt

public String basesAt(int index, int len)
Base in this marker at position 'index' (relative to marker start)

### basesAtPos

public String basesAtPos(int pos, int len)
Base at position 'pos' (genomic coordinates)

### cloneShallow

public MarkerSeq cloneShallow()
Description copied from class: `Marker`
Perform a shallow clone

Overrides:
  `cloneShallow` in class `Marker`

### getSequence

public String getSequence()
Get sequence WARNING: Sequence is always according to coding strand. E.g. if the strand is negative, the sequence returned by this method is the reverse-WC that you see in the reference genome

### getSequence

public String getSequence(Marker marker)
Get sequence intersecting 'marker' WARNING: Sequence is always according to coding strand. E.g. if the strand is negative, the sequence returned by this method is the reverse-WC that you see in the reference genome

### hasSequence

public boolean hasSequence()
Do we have a sequence for this exon?

### serializeParse

public void serializeParse(MarkerSerializer markerSerializer)
Parse a line from a serialized file

Specified by:
  `serializeParse` in interface `TxtSerializable`
Overrides:
  `serializeParse` in class `Marker`

### serializeSave

public String serializeSave(MarkerSerializer markerSerializer)
Create a string to serialize to a file

Specified by:
  `serializeSave` in interface `TxtSerializable`
Overrides:
  `serializeSave` in class `Marker`

### setSequence

public void setSequence(String sequence)
Set sequence WARNING: Sequence is always according to coding strand. So use you should use setSequence( GprSeq.reverseWc( seq ) ) if the marker is in negative strand.

### toString

public String toString()

Overrides:
  `toString` in class `Marker`

### union

public Marker union(Marker m)
Union of two markers

Overrides:
  `union` in class `Marker`
Returns:
  A new marker which is the union of the two