Repository navigation
Add option for for enabling or disabling writing BAI and SBI files. - #5485
Conversation
| protected int numReducers = 0; | ||
|
|
||
| @Argument(doc = "For tools that write output BAM, write an BAI file. Defaults to true.", | ||
| fullName = WRITE_SBI_LONG_NAME, |
There was a problem hiding this comment.
typo
| fullName = WRITE_SBI_LONG_NAME, | |
| fullName = WRITE_BAI_LONG_NAME, |
lbergelson
left a comment
There was a problem hiding this comment.
@tomwhite Minor comments 👍 otherwise
| optional = true) | ||
| protected int numReducers = 0; | ||
|
|
||
| @Argument(doc = "For tools that write output BAM, write an BAI file. Defaults to true.", |
There was a problem hiding this comment.
This should use the same argument name / configuration as this:
gatk/src/main/java/org/broadinstitute/hellbender/engine/GATKTool.java
Lines 75 to 78 in 1f6a172
There was a problem hiding this comment.
Thanks for pointing this out! Fixed.
| protected int numReducers = 0; | ||
|
|
||
| @Argument(doc = "For tools that write output BAM, write an BAI file. Defaults to true.", | ||
| fullName = WRITE_SBI_LONG_NAME, |
There was a problem hiding this comment.
woops, copy/paste error here
| public static final String NUM_REDUCERS_LONG_NAME = "num-reducers"; | ||
| public static final String SHARDED_OUTPUT_LONG_NAME = "sharded-output"; | ||
| public static final String OUTPUT_SHARD_DIR_LONG_NAME = "output-shard-tmp-dir"; | ||
| public static final String WRITE_BAI_LONG_NAME = "write-bai"; |
There was a problem hiding this comment.
We have a constant for this already, see comment below.
| public static final String SHARDED_OUTPUT_LONG_NAME = "sharded-output"; | ||
| public static final String OUTPUT_SHARD_DIR_LONG_NAME = "output-shard-tmp-dir"; | ||
| public static final String WRITE_BAI_LONG_NAME = "write-bai"; | ||
| public static final String WRITE_SBI_LONG_NAME = "write-sbi"; |
There was a problem hiding this comment.
maybe rename to create-output-bam-splitting-index for consistency
2732e10 to
7bf816b
Compare
jamesemery
left a comment
There was a problem hiding this comment.
These changes look good, one gripe with the tests and you seem to have the following compiler errors, but once those are resolved then i think we can merge:
k.java:111: error: cannot find symbol
BaiWriteOption baiWriteOption = BaiWriteOption.fromBoolean(writeBai);
^
symbol: class BaiWriteOption
location: class ReadsSparkSink
/home/travis/build/broadinstitute/gatk/src/main/java/org/broadinstitute/hellbender/engine/spark/datasources/ReadsSparkSink.java:111: error: cannot find symbol
BaiWriteOption baiWriteOption = BaiWriteOption.fromBoolean(writeBai);
^
symbol: variable BaiWriteOption
location: class ReadsSparkSink
/home/travis/build/broadinstitute/gatk/src/main/java/org/broadinstitute/hellbender/engine/spark/datasources/ReadsSparkSink.java:112: error: cannot find symbol
SbiWriteOption sbiWriteOption = SbiWriteOption.fromBoolean(writeSbi);
^
symbol: class SbiWriteOption
location: class ReadsSparkSink
/home/travis/build/broadinstitute/gatk/src/main/java/org/broadinstitute/hellbender/engine/spark/datasources/ReadsSparkSink.java:112: error: cannot find symbol
SbiWriteOption sbiWriteOption = SbiWriteOption.fromBoolean(writeSbi);
| // Reinstate once https://github.com/disq-bio/disq/issues/45 is done | ||
| //Assert.assertTrue(Files.exists(IOUtils.getPath(outputPath + SBIIndex.FILE_EXTENSION))); | ||
| if (IOUtils.isBamFileName(outputPath) && writeSbi) { | ||
| Assert.assertTrue(Files.exists(IOUtils.getPath(outputPath + BAMIndex.BAMIndexSuffix))); |
There was a problem hiding this comment.
Should be SBIIndex.FILE_EXTENSION. You should also permute the tests in the data provider above to include a case of true, false and false, true for extension arguments so we can be sure to test that they can be requested independently.
There was a problem hiding this comment.
Good catch. I've fixed this now.
|
Thanks @jamesemery. The compile errors will be fixed once Disq 0.2.0 is released. |
f860f52 to
8d3171b
Compare
Codecov Report
@@ Coverage Diff @@
## master #5485 +/- ##
===============================================
- Coverage 87.045% 87.044% -<.001%
- Complexity 31536 31538 +2
===============================================
Files 1930 1930
Lines 145421 145440 +19
Branches 16089 16090 +1
===============================================
+ Hits 126581 126597 +16
- Misses 12982 12983 +1
- Partials 5858 5860 +2
|
8d3171b to
1749e9d
Compare
|
@lbergelson @jamesemery this is passing now and all comments have been addressed. Can you unblock so it can be merged please? |
Relies on disq-bio/disq#69, which has not yet been merged or released.