Index
, MutableIndex
public class LinearIndex extends AbstractIndex
Modifier and Type | Class | Description |
---|---|---|
static class |
LinearIndex.ChrIndex |
Blocks are organized as a simple flat list:
|
AbstractIndex.BlockStats, AbstractIndex.IndexType
Modifier and Type | Field | Description |
---|---|---|
static boolean |
enableAdaptiveIndexing |
|
static int |
INDEX_TYPE |
|
static double |
MAX_FEATURES_PER_BIN |
chrIndices, flags, indexedFileMD5, indexedFileSize, indexedFileTS, indexedPath, logger, MAGIC_NUMBER, version, VERSION
Constructor | Description |
---|---|
LinearIndex(InputStream inputStream) |
Load from file.
|
LinearIndex(String featureFile) |
Initialize with default parameters
|
LinearIndex(Path featurePath) |
Initialize with default parameters
|
LinearIndex(List<LinearIndex.ChrIndex> indices,
File featureFile) |
Initialize using the specified
indices |
LinearIndex(List<LinearIndex.ChrIndex> indices,
Path featureFile) |
Initialize using the specified
indices |
Modifier and Type | Method | Description |
---|---|---|
Class |
getChrIndexClass() |
returns the class for the index type
|
List<String> |
getSequenceNames() |
|
protected int |
getType() |
get the index type
|
boolean |
isCurrentVersion() |
check the current version against the version we read in
|
Index |
optimize() |
|
Index |
optimize(double threshold) |
Adapative optimization of the linear index
|
protected void |
setTS(long ts) |
|
void |
writeTable(PrintStream out) |
Code to convert linear index to a text table for analysis
|
addProperties, addProperty, containsChromosome, equalsIgnoreProperties, finalizeIndex, getBlocks, getBlocks, getBlockStats, getFlags, getIndexedFile, getIndexedFileMD5, getIndexedFileSize, getIndexedFileTS, getIndexedPath, getProperties, getVersion, hasFileSize, hasMD5, hasTimestamp, printIndexInfo, read, setMD5, statsSummary, validateIndexHeader, write, write, writeBasedOnFeaturePath
write, writeBasedOnFeatureFile
public static final double MAX_FEATURES_PER_BIN
public static final int INDEX_TYPE
public static boolean enableAdaptiveIndexing
public LinearIndex(List<LinearIndex.ChrIndex> indices, Path featureFile)
indices
indices
- featureFile
- public LinearIndex(List<LinearIndex.ChrIndex> indices, File featureFile)
indices
indices
- featureFile
- public LinearIndex(String featureFile)
featureFile
- File for which this is an indexpublic LinearIndex(Path featurePath)
featurePath
- Path for which this is an indexpublic LinearIndex(InputStream inputStream) throws IOException
inputStream
- This method assumes that the input stream is already buffered as appropriate.IOException
public boolean isCurrentVersion()
AbstractIndex
isCurrentVersion
in interface Index
isCurrentVersion
in class AbstractIndex
protected int getType()
AbstractIndex
getType
in class AbstractIndex
public List<String> getSequenceNames()
getSequenceNames
in interface Index
getSequenceNames
in class AbstractIndex
public Class getChrIndexClass()
AbstractIndex
getChrIndexClass
in class AbstractIndex
public Index optimize(double threshold)
threshold
- threshold to use for optimizing each constituent chrIndex
public Index optimize()
public void writeTable(PrintStream out)
out
- Stream to which to write out table toprotected final void setTS(long ts)