-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Path-enable IndexFactory. #1430
Conversation
5408746
to
cc22605
Compare
Codecov Report
@@ Coverage Diff @@
## master #1430 +/- ##
==============================================
- Coverage 68.359% 68.35% -0.009%
- Complexity 8486 8489 +3
==============================================
Files 583 583
Lines 34373 34389 +16
Branches 5730 5729 -1
==============================================
+ Hits 23497 23505 +8
- Misses 8655 8665 +10
+ Partials 2221 2219 -2
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cmnbroad Thank you for doing this. I see this includes Jonn's change. Should we wait for that to go in before merging this?
@@ -224,7 +229,20 @@ else if (indexFile.endsWith(FileExtensions.TABIX_INDEX)) { | |||
* @param codec the codec to use for decoding records | |||
*/ | |||
public static LinearIndex createLinearIndex(final File inputFile, final FeatureCodec codec) { | |||
return createLinearIndex(inputFile, codec, LinearIndexCreator.DEFAULT_BIN_WIDTH); | |||
return createLinearIndex( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use IOUtil.toPath(file) which does a null safe conversion to path and then just have the null check in the final one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah - done.
|
||
// We _MUST_ call getPathToDataFile here to preserve behavior of codecs that rely on config files | ||
// that point to other files to be indexed. This is CRITICALLY IMPORTANT to downstream tools. | ||
this.inputPath = Paths.get(codec.getPathToDataFile(inputPath.toUri().toString())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ugh... path -> uri -> string -> string -> path Not much to do about it though :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I considered changing getPathToDataFile
to return a Path
instead of a String, but decided that was too much scope creep.
@lbergelson I don't think the order in which we merge these matters, but we should probably wait for @jonn-smith 's redirect test before we merge either one. |
Sorry, I merged mine which caused a conflict :( |
@cmnbroad I merged the xsv fix. |
34e54bf
to
5f0c3b4
Compare
@lbergelson Rebased and conflicts resolved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
* 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.
Prerequisite for broadinstitute/gatk#6161.