I've been given a task where I need to compare two strings of DNA for similarity given a location.

There are two files: One which contains the alignment locations and the string of DNAs and one that contains the location that I am comparing. So far, I believe I have an algorithm that theoretically works... The only problem is, I keep getting errors and I do not understand why.

I don't know how to copy and paste from the Ubuntu terminal so this is an image of the code.

I'm getting the error
IndexError: list index out of range

An example input is:
Example line for loc(ALU):
585 1963 103 4 0 chr1 16653 16925

Example line for loc1(Alignment):
1 chr7_random 9486 11031

I believe the problem is in Syntax but I'm much better at Java than Python :cry:

8 Years
Discussion Span
Last Post by SlvrDragon50

And by the way, you can copy from the Ubuntu terminal via Ctrl+Shift+C, and past into it with Ctrl+Shift+V. Now you can give us a full traceback, plus you should also provide the code segment which the error is in, and any other info we need to know pertaining to that code.


Can you provide the complete traceback? It should give more info

I managed to fix it! I didn't notice a blank line in between each set of data.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.