Skip to content
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 bugs in BCF I/O #168

Merged
merged 11 commits into from
Jun 25, 2019
Merged

Fix bugs in BCF I/O #168

merged 11 commits into from
Jun 25, 2019

Conversation

alumi
Copy link
Member

@alumi alumi commented Jun 21, 2019

Summary

This PR fixes miscellaneous bugs in BCF reader/writer

  1. Header string is missing a \newline at its end
  2. Duplicated idxs of FILTER/INFO/FORMAT are not allowed
  3. Some integer values are reserved: 0x80–0x87, 0x8000–0x8007, 0x80000000–0x80000007
  4. Incorrect values are written for MISSING float 0x7F800001
  5. Encoding/decoding is broken for some types and values
  6. END info is not referred to when encoding reference length

Tests

  • lein check 🆗
  • lein test :all 🆗
  • lein cloverage 🆗
  • lein eastwood 🆗

@alumi alumi requested a review from a team June 21, 2019 04:38
@ghost ghost requested review from athos and yito88 and removed request for a team June 21, 2019 04:38
@codecov
Copy link

codecov bot commented Jun 21, 2019

Codecov Report

Merging #168 into master will increase coverage by 0.33%.
The diff coverage is 93.02%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #168      +/-   ##
==========================================
+ Coverage   86.53%   86.87%   +0.33%     
==========================================
  Files          73       73              
  Lines        5624     5663      +39     
  Branches      491      481      -10     
==========================================
+ Hits         4867     4920      +53     
+ Misses        266      262       -4     
+ Partials      491      481      -10
Impacted Files Coverage Δ
src/cljam/io/vcf/util.clj 95.31% <100%> (+2.45%) ⬆️
src/cljam/io/bcf/reader.clj 96% <100%> (+3.47%) ⬆️
src/cljam/io/bcf/writer.clj 89.85% <90.83%> (+3.14%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9e70654...5f030a7. Read the comment docs.

@alumi alumi added the bug label Jun 25, 2019
Copy link
Member

@athos athos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing those issues! Just added a couple of minor comments.

src/cljam/io/bcf/writer.clj Show resolved Hide resolved
src/cljam/io/bcf/writer.clj Outdated Show resolved Hide resolved
src/cljam/io/bcf/writer.clj Outdated Show resolved Hide resolved
Copy link
Contributor

@yito88 yito88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@alumi
Copy link
Member Author

alumi commented Jun 25, 2019

@athos Thank you for the comments! I've fixed them in c8172d7...5f030a7

@athos
Copy link
Member

athos commented Jun 25, 2019

LGTM 👍I'll merge it.

@athos athos merged commit ceaa991 into master Jun 25, 2019
@athos athos deleted the fix/bcf-io branch June 25, 2019 10:21
@alumi
Copy link
Member Author

alumi commented Jun 25, 2019

Thank you for reviewing! @athos @yito88 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants