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