-
Notifications
You must be signed in to change notification settings - Fork 26
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
ValueError: end_index must be non-negative #13
Comments
No problem.. I think its when the search string is longer than the subject sequence. |
Hi @theo-allnutt-bioinformatics, This was indeed caused by an internal bug. It has now been fixed in commit 05f33c4 and will be included in the next release. Thanks for reporting this! Regardless, I'm happy that you could quickly find a workaround :) |
@taleinat Amazing module - thanks - unfortunately I still get the problem above in 0.7.2. Should it have been fixed therein? Thanks again |
Hi @jtlz2, The fix mentioned above is indeed included since version 0.6.2. You may be encountering a similar bug. It would be great if you could open a new issue with example code that reproduces the error you're seeing! |
Also, could you please mention what platform you're running on and what version of Python you're using, including whether it is a 64-bit build? Similar errors are occurring on the conda-forge Windows builds, but I haven't been able to reproduce these on my own machines. |
Any idea what might be causing this error? Thanks.
T.
Traceback (most recent call last):
File "/home/allnutt.t/scripts/primer_clip_fastq.py", line 111, in
m=find_near_matches(primer,seq1,max_l_dist=mm)
File "/home/allnutt.t/.conda/envs/py2/lib/python2.7/site-packages/fuzzysearch/init.py", line 51, in find_near_matches
return search_func(subsequence, sequence, search_params)
File "/home/allnutt.t/.conda/envs/py2/lib/python2.7/site-packages/fuzzysearch/init.py", line 87, in
find_near_matches_levenshtein(subsequence, sequence, search_params.max_l_dist)
File "/home/allnutt.t/.conda/envs/py2/lib/python2.7/site-packages/fuzzysearch/levenshtein.py", line 33, in find_near_matches_levenshtein
max_l_dist)
File "/home/allnutt.t/.conda/envs/py2/lib/python2.7/site-packages/fuzzysearch/levenshtein_ngram.py", line 176, in find_near_matches_levenshtein_ngrams
for index in search_exact(subsequence[ngram_start:ngram_end], sequence, start_index, end_index):
File "/home/allnutt.t/.conda/envs/py2/lib/python2.7/site-packages/fuzzysearch/common.py", line 159, in search_exact
start_index, end_index if end_index is not None else -1)
ValueError: end_index must be non-negative
The text was updated successfully, but these errors were encountered: