Class MarkerSeq

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<Interval>, TxtSerializable
    Direct Known Subclasses:
    Exon

    public class MarkerSeq
    extends Marker
    Marker with a DNA sequence
    Author:
    pcingola
    See Also:
    Serialized Form
    • Constructor Detail

      • MarkerSeq

        public MarkerSeq()
      • MarkerSeq

        public MarkerSeq​(Marker parent,
                         int start,
                         int end,
                         boolean strandMinus,
                         java.lang.String id)
      • MarkerSeq

        public MarkerSeq​(Marker parent,
                         int start,
                         int end,
                         java.lang.String seq)
    • Method Detail

      • 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 java.lang.String basesAt​(int index,
                                        int len)
        Base in this marker at position 'index' (relative to marker start)
      • basesAtPos

        public java.lang.String basesAtPos​(int pos,
                                           int len)
        Base at position 'pos' (genomic coordinates)
      • getSequence

        public java.lang.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 java.lang.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?
      • setSequence

        public void setSequence​(java.lang.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 java.lang.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