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 performance by caching k-mer abundance query results #276

Closed
wants to merge 2 commits into from

Conversation

standage
Copy link
Collaborator

Related to #208, this pull request uses the lru_cache decorator to cache results from every invocation of kmer_is_interesting function. With a sufficiently large cache, a k-mer (especially repetitive k-mers) in multiple nearby reads should require only a single invocation of the command. Subsequent invocations with the same arguments will pull from the lru_cache instead of re-executing the command.

Preliminary results aren't too promising. The cost of caching results doesn't seem to compensate for the savings gained by avoiding repeat calls.

@standage standage changed the title Feature/lru cache Improve performance by caching k-mer abundance query results Jun 30, 2018
@codecov
Copy link

codecov bot commented Jun 30, 2018

Codecov Report

Merging #276 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #276      +/-   ##
==========================================
+ Coverage   97.54%   97.55%   +<.01%     
==========================================
  Files          47       47              
  Lines        2937     2941       +4     
  Branches      511      511              
==========================================
+ Hits         2865     2869       +4     
  Misses         45       45              
  Partials       27       27
Impacted Files Coverage Δ
kevlar/novel.py 100% <100%> (ø) ⬆️

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 09abff0...5710ab3. Read the comment docs.

@standage
Copy link
Collaborator Author

:sadtrombone:

@standage standage closed this Oct 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant