Class IntervalTreeIndex

java.lang.Object
htsjdk.tribble.index.AbstractIndex
htsjdk.tribble.index.interval.IntervalTreeIndex
All Implemented Interfaces:
Index, MutableIndex

public class IntervalTreeIndex extends AbstractIndex
Index based on an interval tree
See Also:
  • Field Details

    • INDEX_TYPE

      public static final int INDEX_TYPE
  • Constructor Details

    • IntervalTreeIndex

      public IntervalTreeIndex(InputStream inputStream) throws IOException
      Load from file.
      Parameters:
      inputStream - This method assumes that the input stream is already buffered as appropriate. Caller should close after this object is constructed.
      Throws:
      IOException
    • IntervalTreeIndex

      public IntervalTreeIndex(Path featureFile)
      Prepare to build an index.
      Parameters:
      featureFile - File which we are indexing
    • IntervalTreeIndex

      public IntervalTreeIndex(String featureFile)
      Prepare to build an index.
      Parameters:
      featureFile - File which we are indexing
  • Method Details

    • getChrIndexClass

      public Class getChrIndexClass()
      Description copied from class: AbstractIndex
      returns the class for the index type
      Specified by:
      getChrIndexClass in class AbstractIndex
      Returns:
      a Class, from which a new instance can be created
    • getType

      protected int getType()
      Description copied from class: AbstractIndex
      get the index type
      Specified by:
      getType in class AbstractIndex
      Returns:
      The index type
    • insert

      public void insert(String chr, Interval interval)
      Add a new interval to this index
      Parameters:
      chr - Chromosome
      interval -
    • setChrIndex

      protected void setChrIndex(List<IntervalTreeIndex.ChrIndex> indicies)
    • printTree

      public void printTree()