Class 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:
  • 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