samtools / htsjdk

A Java API for high-throughput sequencing data (HTS) formats.
http://samtools.github.io/htsjdk/
283 stars 242 forks source link

Added name of offending record to error message in SamPairUtil #1358

Closed yfarjoun closed 5 years ago

yfarjoun commented 5 years ago

This PR was inspired by https://github.com/broadinstitute/picard/issues/201 where the error doesn't allow the user to investigate the offending record. By adding the record name to the exception message, the user can investigate more easily and fix the input.

yfarjoun commented 5 years ago

Apologies about the CRLF->LF change. please use "hide whitespaces" to view the actual code change.

codecov-io commented 5 years ago

Codecov Report

Merging #1358 into master will increase coverage by 0.174%. The diff coverage is 57.488%.

@@               Coverage Diff               @@
##              master     #1358       +/-   ##
===============================================
+ Coverage     67.849%   68.024%   +0.174%     
- Complexity      8283      8363       +80     
===============================================
  Files            563       563               
  Lines          33707     33994      +287     
  Branches        5657      5720       +63     
===============================================
+ Hits           22870     23124      +254     
- Misses          8659      8687       +28     
- Partials        2178      2183        +5
Impacted Files Coverage Δ Complexity Δ
src/main/java/htsjdk/samtools/SamPairUtil.java 57.488% <57.488%> (ø) 20 <20> (ø) :arrow_down:
...n/java/htsjdk/samtools/cram/structure/SliceIO.java 84.524% <0%> (+1.19%) 15% <0%> (+1%) :arrow_up:
...antcontext/writer/VariantContextWriterBuilder.java 85.597% <0%> (+2.794%) 110% <0%> (+50%) :arrow_up:
...java/htsjdk/samtools/cram/structure/Container.java 91.781% <0%> (+3.737%) 31% <0%> (+4%) :arrow_up:
...samtools/util/AsyncBlockCompressedInputStream.java 76% <0%> (+4%) 13% <0%> (+1%) :arrow_up:
...ain/java/htsjdk/samtools/cram/structure/Slice.java 72.174% <0%> (+4.581%) 67% <0%> (+24%) :arrow_up:
...va/htsjdk/samtools/cram/structure/ContainerIO.java 68.056% <0%> (+4.722%) 10% <0%> (ø) :arrow_down: