public final class RandomAccessFastaIndex extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
RandomAccessFastaIndex.IndexBuilder |
class |
RandomAccessFastaIndex.IndexRecord |
static class |
RandomAccessFastaIndex.MultipleMatchingRecordsException |
static class |
RandomAccessFastaIndex.NoSuchRecordException |
static class |
RandomAccessFastaIndex.StreamIndexBuilder |
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_INDEX_STEP
Default index step = the most common HDD cluster size
|
static int |
FILE_POSITION_OFFSET
Bit-shift that should be applied to encoded file position to get "file position" field.
|
static String |
INDEX_SUFFIX |
static int |
MAGIC
Magic integer written before serialized index
|
static long |
SKIP_MASK
Bit mask for encoded file position.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
static long |
extractFilePosition(long p)
Extracts file position part from value returned by
RandomAccessFastaIndex.IndexRecord.queryPosition(long) |
static int |
extractSkipLetters(long p)
Extracts number of letters to skip from value returned by
RandomAccessFastaIndex.IndexRecord.queryPosition(long) |
int |
getIndexStep() |
RandomAccessFastaIndex.IndexRecord |
getRecordById(String id) |
RandomAccessFastaIndex.IndexRecord |
getRecordByIdCheck(String id) |
RandomAccessFastaIndex.IndexRecord |
getRecordByIndex(int i) |
int |
hashCode() |
static RandomAccessFastaIndex |
index(Path file)
Index fasta file with automatic step selection or load previously created index
|
static RandomAccessFastaIndex |
index(Path file,
boolean save)
Index fasta file with automatic step selection or load previously created index
|
static RandomAccessFastaIndex |
index(Path file,
boolean save,
LongProcessReporter reporter)
Index fasta file with automatic step selection or load previously created index
|
static RandomAccessFastaIndex |
index(Path file,
int indexStep,
boolean save)
Index fasta file or loads previously created index
|
static RandomAccessFastaIndex |
index(Path file,
int indexStep,
boolean save,
LongProcessReporter reporter)
Index fasta file or loads previously created index
|
static RandomAccessFastaIndex |
read(InputStream stream) |
int |
size() |
void |
write(OutputStream stream) |
public static final String INDEX_SUFFIX
public static int MAGIC
public static final int DEFAULT_INDEX_STEP
public static final long SKIP_MASK
public static final int FILE_POSITION_OFFSET
public int getIndexStep()
public int size()
public RandomAccessFastaIndex.IndexRecord getRecordByIndex(int i)
public RandomAccessFastaIndex.IndexRecord getRecordById(String id)
public RandomAccessFastaIndex.IndexRecord getRecordByIdCheck(String id)
public void write(OutputStream stream)
public static RandomAccessFastaIndex read(InputStream stream)
public static long extractFilePosition(long p)
RandomAccessFastaIndex.IndexRecord.queryPosition(long)p - value returned by RandomAccessFastaIndex.IndexRecord.queryPosition(long)public static int extractSkipLetters(long p)
RandomAccessFastaIndex.IndexRecord.queryPosition(long)p - value returned by RandomAccessFastaIndex.IndexRecord.queryPosition(long)public static RandomAccessFastaIndex index(Path file)
file - file to indexpublic static RandomAccessFastaIndex index(Path file, boolean save)
file - file to indexsave - whether to save index to {input_file_name}.mifdx filepublic static RandomAccessFastaIndex index(Path file, boolean save, LongProcessReporter reporter)
file - file to indexsave - whether to save index to {input_file_name}.mifdx filereporter - indexing reporterpublic static RandomAccessFastaIndex index(Path file, int indexStep, boolean save)
file - file to indexindexStep - index stepsave - whether to save index to {input_file_name}.mifdx filepublic static RandomAccessFastaIndex index(Path file, int indexStep, boolean save, LongProcessReporter reporter)
file - file to indexindexStep - index stepsave - whether to save index to {input_file_name}.mifdx filereporter - reporterCopyright © 2018. All rights reserved.