Package htsjdk.tribble.index.interval

# Class IntervalIndexCreator

java.lang.Object
htsjdk.tribble.index.TribbleIndexCreator
htsjdk.tribble.index.interval.IntervalIndexCreator

All Implemented Interfaces:
  `IndexCreator`

public class IntervalIndexCreator extends TribbleIndexCreator
Creates interval indexes from a stream of features

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`DEFAULT_FEATURE_COUNT`

### Fields inherited from class htsjdk.tribble.index.TribbleIndexCreator

`properties`

## Constructor Summary

Constructors
Constructor
Description
`IntervalIndexCreator(File inputFile)`
`IntervalIndexCreator(File inputFile, int featuresPerInterval)`
`IntervalIndexCreator(Path inputPath)`
`IntervalIndexCreator(Path inputPath, int featuresPerInterval)`

## Method Summary

Modifier and Type
Method
Description
`void`
`addFeature(Feature feature, long filePosition)`
Add a feature to the index
`Index`
`finalizeIndex(long finalFilePosition)`
finalize the index; create a tree index given the feature list passed in so far
`int`
`getFeaturesPerInterval()`

### Methods inherited from class htsjdk.tribble.index.TribbleIndexCreator

`addProperty, setIndexSequenceDictionary`

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

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### DEFAULT_FEATURE_COUNT

public static final int DEFAULT_FEATURE_COUNT

See Also:
  - Constant Field Values

## Constructor Details

### IntervalIndexCreator

public IntervalIndexCreator(Path inputPath, int featuresPerInterval)

### IntervalIndexCreator

public IntervalIndexCreator(File inputFile, int featuresPerInterval)

### IntervalIndexCreator

public IntervalIndexCreator(File inputFile)

### IntervalIndexCreator

public IntervalIndexCreator(Path inputPath)

## Method Details

### addFeature

public void addFeature(Feature feature, long filePosition)
Description copied from interface: `IndexCreator`
Add a feature to the index

Parameters:
  `feature` - the feature, of which start, end, and contig must be filled in
  `filePosition` - the current file position, at the beginning of the specified feature

### finalizeIndex

public Index finalizeIndex(long finalFilePosition)
finalize the index; create a tree index given the feature list passed in so far

Parameters:
  `finalFilePosition` - the final file position, for indexes that have to close out with the final position
Returns:
  a Tree Index

### getFeaturesPerInterval

public int getFeaturesPerInterval()