public final class BAMIndexMerger extends IndexMerger<AbstractBAMFileIndex>
BAMIndexer with fillInUninitializedValues
set to false.
A partitioned BAM is a directory containing the following files:
BAMIndexMerger.out, partLengths| Constructor and Description |
|---|
BAMIndexMerger(java.io.OutputStream out,
long headerLength) |
| Modifier and Type | Method and Description |
|---|---|
void |
finish(long dataFileLength)
Finish merging the indexes, and close the output stream.
|
static BinningIndexContent.BinList |
mergeBins(java.util.List<BinningIndexContent.BinList> binLists,
long[] offsets)
Merge bins for (headerless) BAM file parts.
|
static LinearIndex |
mergeLinearIndexes(int referenceSequence,
java.util.List<LinearIndex> linearIndexes,
long[] offsets)
Merge linear indexes for (headerless) BAM file parts.
|
static AbstractBAMFileIndex |
openIndex(SeekableStream stream,
SAMSequenceDictionary dictionary) |
void |
processIndex(AbstractBAMFileIndex index,
long partLength)
Process the next index and add to the merged index.
|
public BAMIndexMerger(java.io.OutputStream out,
long headerLength)
public void processIndex(AbstractBAMFileIndex index, long partLength)
IndexMergerprocessIndex in class IndexMerger<AbstractBAMFileIndex>index - the index to mergepartLength - the length of the part file corresponding to the index, in bytes.public void finish(long dataFileLength)
IndexMergerfinish in class IndexMerger<AbstractBAMFileIndex>dataFileLength - the length of the total data file, in bytes.public static AbstractBAMFileIndex openIndex(SeekableStream stream, SAMSequenceDictionary dictionary)
public static BinningIndexContent.BinList mergeBins(java.util.List<BinningIndexContent.BinList> binLists, long[] offsets)
binLists - the bins to mergeoffsets - bin i will be shifted by offset ipublic static LinearIndex mergeLinearIndexes(int referenceSequence, java.util.List<LinearIndex> linearIndexes, long[] offsets)
referenceSequence - the reference sequence number for the linear indexes being mergedlinearIndexes - the linear indexes to mergeoffsets - linear index i will be shifted by offset i