Repository navigation
Add option for for enabling or disabling writing BAI and SBI files. - #69
Conversation
|
|
||
| import htsjdk.samtools.BAMIndex; | ||
|
|
||
| /** An option for for enabling or disabling writing BAI files. Enabled by default. */ |
There was a problem hiding this comment.
I would rather that writing index files were not enabled by default; per element of least surprise. Specifying options to disable features feels backwards.
There was a problem hiding this comment.
I've gone back and forth myself on this one. A counter argument is that tools should produce indexes by default, without the user having to remember to ask for them.
There was a problem hiding this comment.
I'm in favor of enabled by default but I don't care strongly. We'll just set it by default in gatk.
There was a problem hiding this comment.
Thinking about this more, I'm tempted to be consistent with htsjdk and only produce indexes when requested (i.e. off by default). See new commit in this PR. GATK can enable by default.
…iteOption from booleans.
499e470 to
0244cd3
Compare
heuermh
left a comment
There was a problem hiding this comment.
Thank you, I think it reads better this way. Minor change requested in unit tests.
| // default (both disabled) | ||
| String outputPath = createTempPath(bamExtension); | ||
| htsjdkReadsRddStorage.write(htsjdkReadsRdd, outputPath); | ||
| Assert.assertFalse(Files.exists(Paths.get(URI.create(outputPath + BAMIndex.BAMIndexSuffix)))); |
There was a problem hiding this comment.
use BAMIndex.getIndexExtension() here
| String outputPath = createTempPath(bamExtension); | ||
| htsjdkReadsRddStorage.write(htsjdkReadsRdd, outputPath); | ||
| Assert.assertFalse(Files.exists(Paths.get(URI.create(outputPath + BAMIndex.BAMIndexSuffix)))); | ||
| Assert.assertFalse(Files.exists(Paths.get(URI.create(outputPath + SBIIndex.FILE_EXTENSION)))); |
There was a problem hiding this comment.
use SBIIndex.getIndexExtension() here
|
Thanks @heuermh |
No description provided.