public class LinearIndex extends AbstractIndex
| Modifier and Type | Class and Description |
|---|---|
static class |
LinearIndex.ChrIndex
Blocks are organized as a simple flat list:
Block 0
Block 1
Block 2
There's a constant bin width, so that each block corresponds to a specific interval
over the genome based on its index, as in:
Block 0: (0 - binWidth]
Block 1: (binWidth - 2 * binWidth]
Block 2: (2 * binWidth - 3 * binWidth]
Note that covered regions are open on the left ( and closed on the right ].
|
AbstractIndex.BlockStats, AbstractIndex.IndexType| Modifier and Type | Field and 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 and Description |
|---|
LinearIndex(java.io.InputStream inputStream)
Load from file.
|
LinearIndex(java.util.List<LinearIndex.ChrIndex> indices,
java.io.File featureFile)
Initialize using the specified
indices |
LinearIndex(java.util.List<LinearIndex.ChrIndex> indices,
java.nio.file.Path featureFile)
Initialize using the specified
indices |
LinearIndex(java.nio.file.Path featurePath)
Initialize with default parameters
|
LinearIndex(java.lang.String featureFile)
Initialize with default parameters
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Class |
getChrIndexClass()
returns the class for the index type
|
java.util.List<java.lang.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(java.io.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, writeBasedOnFeaturePathclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwrite, writeBasedOnFeatureFilepublic static final double MAX_FEATURES_PER_BIN
public static final int INDEX_TYPE
public static boolean enableAdaptiveIndexing
public LinearIndex(java.util.List<LinearIndex.ChrIndex> indices, java.nio.file.Path featureFile)
indicesindices - featureFile - public LinearIndex(java.util.List<LinearIndex.ChrIndex> indices, java.io.File featureFile)
indicesindices - featureFile - public LinearIndex(java.lang.String featureFile)
featureFile - File for which this is an indexpublic LinearIndex(java.nio.file.Path featurePath)
featurePath - Path for which this is an indexpublic LinearIndex(java.io.InputStream inputStream)
throws java.io.IOException
inputStream - This method assumes that the input stream is already buffered as appropriate.java.io.IOExceptionpublic boolean isCurrentVersion()
AbstractIndexisCurrentVersion in interface IndexisCurrentVersion in class AbstractIndexprotected int getType()
AbstractIndexgetType in class AbstractIndexpublic java.util.List<java.lang.String> getSequenceNames()
getSequenceNames in interface IndexgetSequenceNames in class AbstractIndexpublic java.lang.Class getChrIndexClass()
AbstractIndexgetChrIndexClass in class AbstractIndexpublic Index optimize(double threshold)
threshold - threshold to use for optimizing each constituent chrIndexpublic Index optimize()
public void writeTable(java.io.PrintStream out)
out - Stream to which to write out table toprotected final void setTS(long ts)