Skip to content

Commit

Permalink
Add back a method which was accidentally replaced (#1433)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
lbergelson authored Oct 30, 2019
1 parent a83f2b3 commit 03e9a32
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/main/java/htsjdk/tribble/index/IndexFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ public static <FEATURE_TYPE extends Feature, SOURCE_TYPE> Index createDynamicInd
return createDynamicIndex(inputPath, codec, IndexBalanceApproach.FOR_SEEK_TIME);
}


/**
* Create a index of the specified type with default binning parameters
*
Expand All @@ -356,6 +357,34 @@ public static <FEATURE_TYPE extends Feature, SOURCE_TYPE> 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 <FEATURE_TYPE extends Feature, SOURCE_TYPE> Index createIndex(final Path inputhPath,
final FeatureCodec<FEATURE_TYPE, SOURCE_TYPE> 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 <FEATURE_TYPE extends Feature, SOURCE_TYPE> Index createIndex(final File inputFile,
final FeatureCodec<FEATURE_TYPE, SOURCE_TYPE> 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
*
Expand Down

0 comments on commit 03e9a32

Please sign in to comment.