public class CRAMBAIIndexer
extends java.lang.Object
| Constructor and Description |
|---|
CRAMBAIIndexer(java.io.File output,
SAMFileHeader fileHeader)
Create a CRAM indexer that writes BAI to a file.
|
CRAMBAIIndexer(java.io.OutputStream output,
SAMFileHeader fileHeader)
Create a CRAM indexer that writes BAI to a stream.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
createIndex(SeekableStream stream,
java.io.File output,
Log log,
ValidationStringency validationStringency)
Generates a BAI index file from an input CRAM stream
|
void |
finish()
After all the slices have been processed, finish is called.
|
void |
processContainer(Container container,
ValidationStringency validationStringency)
Index a container, any of mapped, unmapped and multiple references are allowed.
|
void |
processSingleReferenceSlice(Slice slice)
Record index information for a given CRAM slice that contains either unmapped reads or
reads mapped to a single reference.
|
public CRAMBAIIndexer(java.io.File output,
SAMFileHeader fileHeader)
output - binary BAM Index (.bai) filefileHeader - header for the corresponding bam filepublic CRAMBAIIndexer(java.io.OutputStream output,
SAMFileHeader fileHeader)
output - Index will be written here. output will be closed when finish() method is called.fileHeader - header for the corresponding bam file.public void processContainer(Container container, ValidationStringency validationStringency)
container - container to be indexedpublic void processSingleReferenceSlice(Slice slice)
slice - The CRAM slice, single ref or unmapped only.SAMException - if slice refers to multiple reference sequences.public void finish()
public static void createIndex(SeekableStream stream, java.io.File output, Log log, ValidationStringency validationStringency) throws java.io.IOException
stream - CRAM stream to indexoutput - File for output index filelog - optional Log to output progressjava.io.IOException