Package htsjdk.samtools

# Class BAMSBIIndexer

java.lang.Object
htsjdk.samtools.BAMSBIIndexer

public final class BAMSBIIndexer extends Object
Writes SBI files for BAM files, as understood by `SBIIndex`.

## Constructor Summary

Constructors
Constructor
Description
`BAMSBIIndexer()`

## Method Summary

Modifier and Type
Method
Description
`static void`
`createIndex(SeekableStream in, OutputStream out, long granularity)`
Perform indexing on the given BAM file, at the granularity level specified.
`static void`
`createIndex(Path bamFile, long granularity)`
Perform indexing on the given BAM file, at the granularity level specified.

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

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

## Constructor Details

### BAMSBIIndexer

public BAMSBIIndexer()

## Method Details

### createIndex

public static void createIndex(Path bamFile, long granularity) throws IOException
Perform indexing on the given BAM file, at the granularity level specified.

Parameters:
  `bamFile` - the path to the BAM file
  `granularity` - write the offset of every n-th alignment to the index
Throws:
  `IOException` - as per java IO contract

### createIndex

public static void createIndex(SeekableStream in, OutputStream out, long granularity) throws IOException
Perform indexing on the given BAM file, at the granularity level specified.

Parameters:
  `in` - a seekable stream for reading the BAM file from
  `out` - the stream to write the index to
  `granularity` - write the offset of every n-th alignment to the index
Throws:
  `IOException` - as per java IO contract