public class CRAMCRAIIndexer
extends java.lang.Object
Constructor and Description |
---|
CRAMCRAIIndexer(java.io.OutputStream os,
SAMFileHeader samHeader)
Create a CRAMCRAIIndexer that writes to the given output stream.
|
Modifier and Type | Method and Description |
---|---|
void |
addEntry(CRAIEntry entry) |
void |
finish()
Finish creating the index by writing the accumulated entries out to the stream.
|
void |
processContainer(Container container)
Create index entries for a single container.
|
static CRAIIndex |
readIndex(java.io.InputStream is)
Read an input stream containing a .crai index and return a CRAIIndex object.
|
static void |
writeIndex(SeekableStream cramStream,
java.io.OutputStream craiStream)
Generate and write a CRAI index to an output stream from a CRAM input stream
|
public CRAMCRAIIndexer(java.io.OutputStream os, SAMFileHeader samHeader)
os
- output stream to which the index will be writtensamHeader
- SAMFileHeader - user to verify sort orderpublic void processContainer(Container container)
container
- the container to indexpublic void addEntry(CRAIEntry entry)
public void finish()
public static void writeIndex(SeekableStream cramStream, java.io.OutputStream craiStream)
cramStream
- CRAM stream to index; must be coordinate sortedcraiStream
- stream for output indexpublic static CRAIIndex readIndex(java.io.InputStream is)
is
- Input stream to read