String name,
File inputFile,
RMDStorageType storageType) {
// Feature source and sequence dictionary to use as the ultimate reference
AbstractFeatureReader featureSource = null;
SAMSequenceDictionary sequenceDictionary = null;
// Detect whether or not this source should be indexed.
boolean canBeIndexed = (storageType == RMDStorageType.FILE);
if(canBeIndexed) {
try {
Index index = loadIndex(inputFile, createCodec(descriptor, name, inputFile));
try { logger.info(String.format(" Index for %s has size in bytes %d", inputFile, Sizeof.getObjectGraphSize(index))); }
catch (ReviewedGATKException e) { }
sequenceDictionary = IndexDictionaryUtils.getSequenceDictionaryFromProperties(index);
// if we don't have a dictionary in the Tribble file, and we've set a dictionary for this builder, set it in the file if they match
if (sequenceDictionary.size() == 0 && dict != null) {
validateAndUpdateIndexSequenceDictionary(inputFile, index, dict);
if ( ! disableAutoIndexCreation ) {
File indexFile = Tribble.indexFile(inputFile);
try { // re-write the index