Hello!

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.
[img]http://i27.photobucket.com/albums/c155/SlvrDragon50/Screenshot-1.png[/img]

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

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

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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.