public class CRAMCRAIIndexer extends Object
Constructor | Description |
---|---|
CRAMCRAIIndexer(OutputStream os,
SAMFileHeader samHeader) |
Create a CRAMCRAIIndexer that writes to the given output stream.
|
Modifier and Type | Method | 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(InputStream is) |
Read an input stream containing a .crai index and return a CRAIIndex object.
|
static void |
writeIndex(SeekableStream cramStream,
OutputStream craiStream) |
Generate and write a CRAI index to an output stream from a CRAM input stream
|
public CRAMCRAIIndexer(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, OutputStream craiStream)
cramStream
- CRAM stream to index; must be coordinate sortedcraiStream
- stream for output indexpublic static CRAIIndex readIndex(InputStream is)
is
- Input stream to read