public class CRAIIndex extends Object
Modifier and Type | Class | Description |
---|---|---|
static class |
CRAIIndex.CRAIIndexException |
Modifier and Type | Field | Description |
---|---|---|
static String |
CRAI_INDEX_SUFFIX |
Constructor | Description |
---|---|
CRAIIndex() |
Modifier and Type | Method | Description |
---|---|---|
void |
addEntry(CRAIEntry entry) |
Add a single entry to the CRAI index.
|
static List<CRAIEntry> |
find(List<CRAIEntry> list,
int seqId,
int start,
int span) |
|
static int |
findLastAlignedEntry(List<CRAIEntry> list) |
Find index of the last aligned entry in the list.
|
List<CRAIEntry> |
getCRAIEntries() |
|
static CRAIEntry |
getLeftmost(List<CRAIEntry> list) |
|
static SeekableStream |
openCraiFileAsBaiStream(File cramIndexFile,
SAMSequenceDictionary dictionary) |
|
static SeekableStream |
openCraiFileAsBaiStream(InputStream indexStream,
SAMSequenceDictionary dictionary) |
|
void |
processContainer(Container c) |
Create index entries for a single container.
|
void |
writeIndex(OutputStream os) |
Write out the index to an output stream;
|
public static final String CRAI_INDEX_SUFFIX
public void addEntry(CRAIEntry entry)
entry
- entry to be addedpublic void writeIndex(OutputStream os)
os
- Stream to write index topublic void processContainer(Container c)
c
- the container to indexpublic static SeekableStream openCraiFileAsBaiStream(File cramIndexFile, SAMSequenceDictionary dictionary) throws IOException
IOException
public static SeekableStream openCraiFileAsBaiStream(InputStream indexStream, SAMSequenceDictionary dictionary) throws IOException, CRAIIndex.CRAIIndexException
public static int findLastAlignedEntry(List<CRAIEntry> list)
list
- a list of CRAI entries