Class IntervalAndSubIntervals<T extends Marker>

java.lang.Object
org.snpeff.interval.Interval
org.snpeff.interval.Marker
org.snpeff.interval.IntervalAndSubIntervals<T>
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Interval>, Iterable<T>, TxtSerializable
Direct Known Subclasses:
Gene, Transcript

public class IntervalAndSubIntervals<T extends Marker> extends Marker implements Iterable<T>
Interval that contains sub intervals.
Author:
pcingola
See Also:
  • Constructor Details

    • IntervalAndSubIntervals

      public IntervalAndSubIntervals()
    • IntervalAndSubIntervals

      public IntervalAndSubIntervals(Marker parent, int start, int end, boolean strandMinus, String id)
  • Method Details

    • add

      public void add(T t)
      Add a subinterval
    • addAll

      public void addAll(Iterable<T> ts)
      Add all intervals
    • addAll

      public void addAll(Markers markers)
      Add all markers
    • apply

      public IntervalAndSubIntervals<T> apply(Variant variant)
      Apply a variant.
      Overrides:
      apply in class Marker
      Returns:
      The marker result after applying variant
    • clone

      public IntervalAndSubIntervals<T> clone()
      Overrides:
      clone in class Marker
    • cloneShallow

      public IntervalAndSubIntervals<T> cloneShallow()
      Description copied from class: Marker
      Perform a shallow clone
      Overrides:
      cloneShallow in class Marker
    • containsId

      public boolean containsId(String id)
      Is 'id' in the subintervals?
    • get

      public T get(String id)
      Obtain a subinterval
    • invalidateSorted

      protected void invalidateSorted()
      Invalidate sorted collections
    • iterator

      public Iterator<T> iterator()
      Specified by:
      iterator in interface Iterable<T extends Marker>
    • markers

      public Markers markers()
      A list of all markers in this transcript
    • numChilds

      public int numChilds()
    • query

      public Markers query(Marker marker)
      Query all genomic regions that intersect 'marker'
      Overrides:
      query in class Marker
    • remove

      public void remove(T t)
      Remove a subinterval
    • reset

      public void reset()
      Remove all intervals
    • 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
      Returns:
    • setStrandMinus

      public void setStrandMinus(boolean strandMinus)
      Overrides:
      setStrandMinus in class Interval
    • shiftCoordinates

      public void shiftCoordinates(int shift)
      Overrides:
      shiftCoordinates in class Interval
    • sorted

      public List<T> sorted()
      Return a collection of sub intervals sorted by natural order
    • sortedStrand

      public List<T> sortedStrand()
      Return a collection of sub intervals sorted by start position (if strand is >= 0) or by reverse end position (if strand invalid input: '<' 0)
    • subIntervals

      public Collection<T> subIntervals()
      Return a collection of sub intervals