pritykinlab / guidescan-cli

A gRNA database generation tool.
http://www.guidescan.com
13 stars 5 forks source link

The script to generate kmers does not work on python3. Possible infinite loop in find_kmers #1

Closed mahmudhera closed 2 years ago

mahmudhera commented 2 years ago

The error message is as follows:

Traceback (most recent call last): File "kmer_generator.py", line 127, in if len(record) < args.min_chr_length: TypeError: '<' not supported between instances of 'int' and 'str'.

There is also a possible infinite loop in find_kmers function. This happens when the index is less than 20. For example, when index=19, forward=True and end=True, the position is negative, and the loop hits continue, and loops forever.

schmidt73 commented 2 years ago

Thanks for the bug report. I'll work on this presently.

schmidt73 commented 2 years ago

Both issues have been fixed. The former was caused because I forgot to enforce the type of the arguments to int. The latter was fixed by ensuring that index is incremented on every iteration of the loop.