broadinstitute / adapt

A package for designing activity-informed nucleic acid diagnostics for viruses.
MIT License
27 stars 1 forks source link

Add argument to allow not memoizing computations during design #33

Closed haydenm closed 3 years ago

haydenm commented 3 years ago

This allows experiments to test the runtime improvements of memoization.

haydenm commented 3 years ago

Looks mostly good, though I am a bit confused on when you memoize/when you don't. Also surprised about cases where memoization makes it take longer-are these when the genome is small/not repetitive? I do expect the memory usage would be reduced.

I think, by far, the biggest reason for this argument is just so I can benchmark the performance improvement provided by memoization. 😃 Yes, it would likely help memory. I'm not thinking of obvious cases in practice where it would help runtime, but one might be if you have a virus with just a few potential amplicons that hardly overlap or don't at all (e.g., because of where possible primer sites fall); some of the computations to memoize data are slow (like L661-678 of guide_search.py) so it might be faster to not do it.