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

Add caching to DemuxFastqs #764

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Add caching to DemuxFastqs #764

wants to merge 1 commit into from

Conversation

nh13
Copy link
Member

@nh13 nh13 commented Jan 27, 2022

No description provided.

@@ -787,6 +793,11 @@ private class FastqDemultiplexer(val sampleInfos: Seq[SampleInfo],
private val sampleInfosNoUnmatched = sampleInfos.filterNot(_.isUnmatched)
private val unmatchedSample = sampleInfos.find(_.isUnmatched).getOrElse(throw new IllegalArgumentException("No unmatched sample provided."))

private val cache = if (this.cacheSize == 0) None else {
logger.info(f"Using cache of size: $cacheSize")
Some(new LeastRecentlyUsedCache[ArraySeq[Byte], (SampleInfo, Int)](maxEntries=cacheSize))
Copy link
Member Author

Choose a reason for hiding this comment

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

TODO: make thread safe with threadlocal

@codecov-commenter
Copy link

codecov-commenter commented Jan 27, 2022

Codecov Report

Merging #764 (e09c80d) into master (2941e4b) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #764   +/-   ##
=======================================
  Coverage   95.47%   95.47%           
=======================================
  Files         114      114           
  Lines        6733     6743   +10     
  Branches      429      424    -5     
=======================================
+ Hits         6428     6438   +10     
  Misses        305      305           
Flag Coverage Δ
unittests 95.47% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../scala/com/fulcrumgenomics/fastq/DemuxFastqs.scala 96.80% <100.00%> (+0.11%) ⬆️

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 2941e4b...e09c80d. 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