From 03e9a326ec1922fa70da4f5573c0516066c034f2 Mon Sep 17 00:00:00 2001 From: Louis Bergelson Date: Wed, 30 Oct 2019 16:57:10 -0400 Subject: [PATCH] Add back a method which was accidentally replaced (#1433) * While adding Path variants of File methods in #1430 we accidentally replaced a method instead of adding a new one. * Add that method back in and 1 additional overload which we missed. --- .../htsjdk/tribble/index/IndexFactory.java | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/main/java/htsjdk/tribble/index/IndexFactory.java b/src/main/java/htsjdk/tribble/index/IndexFactory.java index 99ce636691..e48acc0a25 100644 --- a/src/main/java/htsjdk/tribble/index/IndexFactory.java +++ b/src/main/java/htsjdk/tribble/index/IndexFactory.java @@ -343,6 +343,7 @@ public static Index createDynamicInd return createDynamicIndex(inputPath, codec, IndexBalanceApproach.FOR_SEEK_TIME); } + /** * Create a index of the specified type with default binning parameters * @@ -356,6 +357,34 @@ public static Index createIndex(fina return createIndex(IOUtil.toPath(inputFile), codec, type, null); } + /** + * Create a index of the specified type with default binning parameters + * + * @param inputhPath the input file to load features from + * @param codec the codec to use for decoding records + * @param type the type of index to create + */ + public static Index createIndex(final Path inputhPath, + final FeatureCodec codec, + final IndexType type) { + return createIndex(inputhPath, codec, type, null); + } + + /** + * Create an index of the specified type with default binning parameters + * + * @param inputFile the input File to load features from + * @param codec the codec to use for decoding records + * @param type the type of index to create + * @param sequenceDictionary May be null, but if present may reduce memory footprint for tabix index creation + */ + public static Index createIndex(final File inputFile, + final FeatureCodec codec, + final IndexType type, + final SAMSequenceDictionary sequenceDictionary) { + return createIndex(IOUtil.toPath(inputFile), codec, type, sequenceDictionary); + } + /** * Create an index of the specified type with default binning parameters *