from dnachisel import *
sequence = random_dna_sequence(50000)
constraint = UniquifyAllKmers(10, include_reverse_complement=False)
problem = DnaOptimizationProblem(sequence, constraints=[constraint])
print(problem.constraints_text_summary())
produces the following error
File "/dnachisel/lib/python3.8/site-packages/dnachisel/builtin_specifications/UniquifyAllKmers.py", line 53, in get_kmer_extractor_cached
@lru_cache(maxsize=L)
UnboundLocalError: local variable 'L' referenced before assignment
This only happens when using UniquifyAllKmers with include_reverse_complement=False.
Coverage remained the same at 89.084% when pulling 47322b2239000dff9691ec6d609b2204cee0b71d on sukolsak:fix-uniquify-all-k-mers into 726b2b0254a8dbd9f51a78998cbb4e43cb096057 on Edinburgh-Genome-Foundry:master.
The following code
produces the following error
This only happens when using
UniquifyAllKmers
withinclude_reverse_complement=False
.