1 Replies - 3980 Views - Last Post: 17 May 2012 - 06:22 AM Rate Topic: -----

#1 growthndevlpmnt  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 14-May 12

Tried to fix Out of range error, now getting wrong outputs.

Posted 16 May 2012 - 07:18 PM

This code is quite long (300 lines). I have attached as code.txt.

I have attempted to write a program that assesses the alignment score of two sequences using an input that provides:
A sequence of letters indicating sequence A
2. A sequence of letters indicating sequence B
3. An indication of whether local (1) or global (0) alignment is sought.
4. A gap penalty for introducing gaps into A or B.
5. The symbol alphabets to be used (e.g. ATGC for DNA strands and 20 single-letter abbreviations for the proteins, but there could be other symbols)
6. Lines showing the score between an element in A and one in B.

But my tracebacks aligments that are displayed at the end are off. i have used i-2,j-2 for traceback because i-1, j-1 gave me out of range errors. Now as it iterates, where it should place a gap at the beginning, it places the last letter of the sequence. Can someone explain what is going on?

Attached File(s)



Is This A Good Question/Topic? 0
  • +

Replies To: Tried to fix Out of range error, now getting wrong outputs.

#2 atraub  Icon User is offline

  • Pythoneer
  • member icon

Reputation: 759
  • View blog
  • Posts: 2,010
  • Joined: 23-December 08

Re: Tried to fix Out of range error, now getting wrong outputs.

Posted 17 May 2012 - 06:22 AM

ok, I'm looking at this today 5/18

This post has been edited by atraub: 18 May 2012 - 11:37 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1