Package htsjdk.tribble.index.linear

# Class LinearIndexCreator

java.lang.Object
htsjdk.tribble.index.TribbleIndexCreator
htsjdk.tribble.index.linear.LinearIndexCreator

All Implemented Interfaces:
  `IndexCreator`

public class LinearIndexCreator extends TribbleIndexCreator
For creating a LinearIndex from a stream of features.

## Field Summary

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

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

`properties`

## Constructor Summary

Constructors
Constructor
Description
`LinearIndexCreator(File inputFile)`
`LinearIndexCreator(File inputFile, int binSize)`
`LinearIndexCreator(Path inputPath)`
`LinearIndexCreator(Path inputPath, int binSize)`

## Method Summary

Modifier and Type
Method
Description
`void`
`addFeature(Feature feature, long filePosition)`
add a feature to the index
`int`
`defaultBinSize()`
the current default bin size
`Index`
`finalizeIndex(long finalFilePosition)`
finalize the index; producing an index object
`int`
`getBinSize()`

### 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_BIN_WIDTH

public static final int DEFAULT_BIN_WIDTH

See Also:
  - Constant Field Values

## Constructor Details

### LinearIndexCreator

public LinearIndexCreator(Path inputPath, int binSize)

### LinearIndexCreator

public LinearIndexCreator(File inputFile, int binSize)

### LinearIndexCreator

public LinearIndexCreator(File inputFile)

### LinearIndexCreator

public LinearIndexCreator(Path inputPath)

## Method Details

### addFeature

public void addFeature(Feature feature, long filePosition)
add a feature to the index

Parameters:
  `feature` - the feature, from which we use the contig, start, and stop
  `filePosition` - the position of the file at the BEGINNING of the current feature

### finalizeIndex

public Index finalizeIndex(long finalFilePosition)
finalize the index; producing an index object

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

### defaultBinSize

public int defaultBinSize()
the current default bin size

Returns:

### getBinSize

public int getBinSize()