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

improve BAM.quality performance #33

Closed
wants to merge 1 commit into from

Conversation

jonathanBieler
Copy link

This removes the reinterpret and type assert from BAM.quality and instead returns a vector with the raw qualities from record.data, which improves performance a bit, specially when it comes to memory allocations:

Computing the average quality on 5M reads

Master:  17.907719 seconds (20.33 M allocations: 2.483 GiB, 3.22% gc time)
This PR: 16.474836 seconds (5.33  M allocations: 1.109 GiB, 1.03% gc time)

I've tested the change on bams produced by different aligners (bwa, bowtie & hisat2) and the retrieved qualities were identical. Fix #32

@codecov
Copy link

codecov bot commented Jul 26, 2019

Codecov Report

Merging #33 into master will increase coverage by 0.45%.
The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #33      +/-   ##
==========================================
+ Coverage   56.82%   57.28%   +0.45%     
==========================================
  Files          27       27              
  Lines        1883     1868      -15     
==========================================
  Hits         1070     1070              
+ Misses        813      798      -15
Impacted Files Coverage Δ
src/bam/record.jl 36.45% <33.33%> (+1.74%) ⬆️

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 cb5427a...a35981a. Read the comment docs.

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

Successfully merging this pull request may close these issues.

2 participants