IndexCreator
public class DynamicIndexCreator extends TribbleIndexCreator
IndexFactory.IndexBalanceApproach
and
the characteristics of the file. Ultimately this is either a LinearIndex or an IntervalTreeIndex, with index
parameters based on whether seek time or file size is to be minimized.properties
Constructor | Description |
---|---|
DynamicIndexCreator(File inputFile,
IndexFactory.IndexBalanceApproach iba) |
|
DynamicIndexCreator(Path inputPath,
IndexFactory.IndexBalanceApproach iba) |
Modifier and Type | Method | Description |
---|---|---|
void |
addFeature(Feature f,
long filePosition) |
Add a feature to the index
|
void |
addProperty(String key,
String value) |
|
Index |
finalizeIndex(long finalFilePosition) |
Create the index, given the stream of features passed in to this point
|
protected static LinkedHashMap<Double,TribbleIndexCreator> |
scoreIndexes(double densityOfFeatures,
Map<IndexFactory.IndexType,TribbleIndexCreator> indexes,
int longestFeature,
IndexFactory.IndexBalanceApproach iba) |
score the available indexes for the specified density and feature lengths
The scoring method is trying to determine how many features would be returned for a sample one base query; or:
(features/seek).
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setIndexSequenceDictionary
public DynamicIndexCreator(Path inputPath, IndexFactory.IndexBalanceApproach iba)
public DynamicIndexCreator(File inputFile, IndexFactory.IndexBalanceApproach iba)
public Index finalizeIndex(long finalFilePosition)
IndexCreator
finalFilePosition
- the final file position, for indexes that have to close out with the final positionpublic void addFeature(Feature f, long filePosition)
IndexCreator
f
- the feature, of which start, end, and contig must be filled infilePosition
- the current file position, at the beginning of the specified featureprotected static LinkedHashMap<Double,TribbleIndexCreator> scoreIndexes(double densityOfFeatures, Map<IndexFactory.IndexType,TribbleIndexCreator> indexes, int longestFeature, IndexFactory.IndexBalanceApproach iba)
densityOfFeatures
- the density of features (features/base)indexes
- Map from IndexType -> IndexCreatorlongestFeature
- the longest feature we've foundiba
- the index balancing approachpublic void addProperty(String key, String value)
addProperty
in class TribbleIndexCreator