Closed clintval closed 5 years ago
Merging #1357 into master will increase coverage by
0.01%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #1357 +/- ##
==============================================
+ Coverage 67.848% 67.858% +0.01%
- Complexity 8283 8284 +1
==============================================
Files 563 563
Lines 33706 33707 +1
Branches 5657 5657
==============================================
+ Hits 22869 22873 +4
+ Misses 8659 8657 -2
+ Partials 2178 2177 -1
Impacted Files | Coverage Δ | Complexity Δ | |
---|---|---|---|
...antcontext/writer/VariantContextWriterBuilder.java | 82.803% <100%> (+0.11%) |
60 <0> (ø) |
:arrow_down: |
...samtools/util/AsyncBlockCompressedInputStream.java | 76% <0%> (+4%) |
13% <0%> (+1%) |
:arrow_up: |
Thanks @yfarjoun! I added a list of valid VCF extensions. Here is how the message renders:
Exception in thread "main" java.lang.IllegalArgumentException: Output format type is not set, or could not be inferred from the output path. If a path was used, does it have a valid VCF extension (.vcf, .vcf.gz, .bcf)?
I chose not to include the output filepath in the exception message because there can be many valid reasons why the output type is left unspecified and it may not be because of an output path.
I chose to suggest to the user that the extension of the file path may be the issue, since that is the most common case in my experience.
For example:
VariantContextBuilder
can have the output type set programmatically, overriding any file extension suffix (if supplied).outStream
and outPath
can be null
:
Description
I, and fellow developers, hit this exception when we've accidentally used an improper VCF extension in an output file path (our most common mistake is using
.gvcf
). I think the exception message needs to be improved so it is clear that Picard is dynamically changing output file type based on the extension of a file path in most cases.I think the exception bites new users and could be improved so the issue is easier to resolve.
What do you think? Happy to amend!
Current behavior:
Checklist