public final class IndexUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
checkIndexVersionAndModificationTime(java.nio.file.Path featureFile,
java.nio.file.Path indexFile,
htsjdk.tribble.index.Index index) |
static htsjdk.samtools.SAMSequenceDictionary |
createSequenceDictionaryFromFeatureIndex(java.nio.file.Path featureFile)
get the sequence dictionary contig list that is in the index or null if there is no index or no contigs
Note: the dictionary returned will not have the contig lengths filled in
SAMSequenceRecord.UNKNOWN_SEQUENCE_LENGTH is used. |
static boolean |
isSequenceDictionaryFromIndex(htsjdk.samtools.SAMSequenceDictionary sequenceDictionary)
Determine if
sequenceDictionary has the form of a dictionary created from an index file by
createSequenceDictionaryFromFeatureIndex(java.nio.file.Path) ). |
static htsjdk.tribble.index.Index |
loadIndex(java.nio.file.Path featureFile)
Loads and returns the index of the feature file or null if there is no index.
|
static htsjdk.tribble.index.Index |
loadTabixIndex(java.nio.file.Path featureFile)
Try to load the tabix index from disk, checking for out of date indexes and old versions
|
static htsjdk.tribble.index.Index |
loadTribbleIndex(java.nio.file.Path featureFile)
Load a Tribble .idx index from disk, checking for out of date indexes and old versions
|
public static htsjdk.tribble.index.Index loadTribbleIndex(java.nio.file.Path featureFile)
public static htsjdk.tribble.index.Index loadTabixIndex(java.nio.file.Path featureFile)
public static void checkIndexVersionAndModificationTime(java.nio.file.Path featureFile, java.nio.file.Path indexFile, htsjdk.tribble.index.Index index)
UserException
- the index is not the current version.
Prints a warning if the index is not up-to date (ie older than the feature file)public static htsjdk.samtools.SAMSequenceDictionary createSequenceDictionaryFromFeatureIndex(java.nio.file.Path featureFile)
SAMSequenceRecord.UNKNOWN_SEQUENCE_LENGTH
is used.
Note: this method is specifically designed for getting sequence dictionaries from indices on Feature files (tribble or tabix indices)public static boolean isSequenceDictionaryFromIndex(htsjdk.samtools.SAMSequenceDictionary sequenceDictionary)
sequenceDictionary
has the form of a dictionary created from an index file by
createSequenceDictionaryFromFeatureIndex(java.nio.file.Path)
).sequenceDictionary
- public static htsjdk.tribble.index.Index loadIndex(java.nio.file.Path featureFile)