-
Notifications
You must be signed in to change notification settings - Fork 594
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
fix tabix index generation #7858
Conversation
crude, but effective |
Codecov Report
@@ Coverage Diff @@
## master #7858 +/- ##
===============================================
- Coverage 86.948% 86.936% -0.013%
- Complexity 36927 36945 +18
===============================================
Files 2219 2221 +2
Lines 173673 173803 +130
Branches 18755 18775 +20
===============================================
+ Hits 151006 151097 +91
- Misses 16055 16077 +22
- Partials 6612 6629 +17
|
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.
Nice work here. I think the index dump tool could be quite useful / educational for some users, but it will need at least an integration test.
Also, a regression test for the bug fix would be ideal.
@droazen any comments on engine class changes or the tool?
@@ -47,11 +50,15 @@ public FeatureOutputStream( final GATKPath file, | |||
Utils.nonNull(dict); | |||
this.encoder = encoder; | |||
if (IOUtil.hasBlockCompressedExtension(file.toPath())) { | |||
outputStream = new PositionalOutputStream( | |||
new BlockCompressedOutputStream(file.toString(), compressionLevel)); | |||
final BlockCompressedOutputStream bcos = |
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.
For posterity, can you add a comment explaining the necessity for BlockCompressedOutputStream
instead of PositionalOutputStream
?
final char meta = (char)readInt(is); | ||
final int skip = readInt(is); | ||
final int namesLen = readInt(is); | ||
System.out.println("#tigs\tformat\tseqCol\tbegCol\tendCol\tmetaChr\tskip"); |
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.
Preferable to have an output file argument instead of using stdout
|
||
@Override | ||
protected Object doWork() { | ||
try ( final InputStream is = new GZIPInputStream(new FileInputStream(tabixIndexFile)) ) { |
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.
Add a check that file has extension FileExtensions.TABIX_INDEX
import java.util.List; | ||
import java.util.zip.GZIPInputStream; | ||
|
||
@CommandLineProgramProperties( |
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.
Add a docstring with explanation and usage, and annotate as a Barclay @DocumentedFeature
@Argument( doc = "Tabix index file.", | ||
fullName = "tabix-index", | ||
shortName = StandardArgumentDefinitions.INPUT_SHORT_NAME) | ||
String tabixIndexFile; |
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.
String tabixIndexFile; | |
GATKPath tabixIndexFile; |
@tedsharpe Any chance this might resolve the issue reported in #7838, or is that likely unrelated? |
@droazen I believe it's unrelated. |
I believe the review comments are all addressed, and that this is ready to go. (Assuming checks all pass.) |
No description provided.