IndexError in __getitem__

29 views
Skip to first unread message

ruithe...@gmail.com

unread,
Mar 11, 2020, 9:11:14 AM3/11/20
to Sequence Demarcation Tool SDT users
Hello, i am getting the index error while trying to run an analysis.
Traceback (most recent call last):
  File "SDT_Linux64.py", line 158, in <module>
    dic_id_score[str(l1[i]) + "_" + str(l2[i])]=Get_Similarity(name_out,alg)
  File "SDT_Linux64.py", line 83, in Get_Similarity
    if recs[0].seq[i]!="-" and recs[1].seq[i]!="-":
  File "/home/user1/sdt/SDT_Linux64/Bio/Seq.py", line 211, in __getitem__
    return self._data[index]
IndexError: string index out of range

any idea what could generate this or how to solve? i even tried to give pre-aligned sequences, but the error persists. Somehow index is becoming higher than the length.

Brejnev Muhire

unread,
Mar 11, 2020, 11:48:12 AM3/11/20
to Sequence Demarcation Tool SDT users
Hi, It seems the problem is in reading the sequences.
You could do two things:
1. Run the program using the give test.fas file and see if it works
2. If it works the problem could be the formatting to the sequence file.
3. Let me know how it goes, if need be you can send me the file causing the error for me to debug the code. my email: mubr...@gmail.com
Reply all
Reply to author
Forward
0 new messages