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 parser of optional fields in SAM/BAM. #92

Merged
merged 1 commit into from
Jul 31, 2017
Merged

Conversation

alumi
Copy link
Member

@alumi alumi commented Jul 31, 2017

Fixed returned type of following two elements in optional fields in SAM/BAM.

type description module type (before) type (after)
A Printable character bam byte char
H Byte array in the Hex format sam nil byte-array

@alumi alumi added the bug label Jul 31, 2017
@alumi alumi requested a review from totakke July 31, 2017 05:39
@codecov
Copy link

codecov bot commented Jul 31, 2017

Codecov Report

Merging #92 into master will increase coverage by 0.29%.
The diff coverage is 75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #92      +/-   ##
==========================================
+ Coverage   82.93%   83.22%   +0.29%     
==========================================
  Files          60       60              
  Lines        4161     4162       +1     
  Branches      452      452              
==========================================
+ Hits         3451     3464      +13     
+ Misses        258      246      -12     
  Partials      452      452
Impacted Files Coverage Δ
src/cljam/io/sam/util.clj 89.62% <100%> (+2.54%) ⬆️
src/cljam/io/bam/decoder.clj 70.21% <66.66%> (+4.25%) ⬆️

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 12c5cf0...964f8e2. Read the comment docs.

Copy link
Member

@totakke totakke 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 the fix. I have a question about reinvention. Please check it.

@@ -77,6 +77,19 @@
(map parse-header-line)
into-header)))

(defn- ^"[B" as-byte-array [^String s]
Copy link
Member

Choose a reason for hiding this comment

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

proton has hex->bytes function, which seems to be equivalent of this function. Is any reason to reinvent it?

Copy link
Member Author

Choose a reason for hiding this comment

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

I hadn't noticed that fn. Thank you for pointing that!

@totakke totakke merged commit f2293a4 into master Jul 31, 2017
@totakke totakke deleted the fix/sam-options branch July 31, 2017 07:33
@totakke
Copy link
Member

totakke commented Jul 31, 2017

Thank you :)

@alumi
Copy link
Member Author

alumi commented Jul 31, 2017

Thank you for the reviewing!

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.

2 participants