public class CRAMIndexer
extends java.lang.Object
| Constructor and Description |
|---|
CRAMIndexer(java.io.File output,
SAMFileHeader fileHeader)
Create a CRAM indexer that writes BAI to a file.
|
CRAMIndexer(java.io.OutputStream output,
SAMFileHeader fileHeader)
Create a CRAM indexer that writes BAI to a stream.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
createAndWriteIndex(java.io.File input,
java.io.File output,
boolean textOutput)
Generates a BAM index file, either textual or binary, from an input BAI file.
|
static void |
createIndex(SeekableStream stream,
java.io.File output,
Log log)
Generates a BAI index file from an input CRAM stream
|
void |
finish()
After all the slices have been processed, finish is called.
|
void |
processAlignment(Slice slice)
Record any index information for a given CRAM slice.
|
public CRAMIndexer(java.io.File output,
SAMFileHeader fileHeader)
output - binary BAM Index (.bai) filefileHeader - header for the corresponding bam filepublic CRAMIndexer(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 processAlignment(Slice slice)
slice - The CRAM slicepublic void finish()
public static void createAndWriteIndex(java.io.File input,
java.io.File output,
boolean textOutput)
output - BAM Index (.bai) file (or bai.txt file when text)textOutput - Whether to create text output or binarypublic static void createIndex(SeekableStream stream, java.io.File output, Log log) throws java.io.IOException
stream - CRAM stream to indexoutput - File for output index filelog - optional Log to output progressjava.io.IOException