Skip to content

Commit

Permalink
make sure column iterator is j
Browse files Browse the repository at this point in the history
  • Loading branch information
BenLangmead committed Jul 24, 2015
1 parent 1e20b36 commit f2fcfe3
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions 3.02_GlobalAlignment.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 1,
"metadata": {
"collapsed": false
},
Expand All @@ -18,7 +18,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 2,
"metadata": {
"collapsed": false
},
Expand All @@ -29,7 +29,7 @@
"0"
]
},
"execution_count": 9,
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -41,7 +41,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 3,
"metadata": {
"collapsed": false
},
Expand All @@ -52,7 +52,7 @@
"2"
]
},
"execution_count": 10,
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -63,7 +63,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 4,
"metadata": {
"collapsed": false
},
Expand All @@ -74,7 +74,7 @@
"4"
]
},
"execution_count": 11,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -126,8 +126,8 @@
" D[i][0] = D[i-1][0] + score[alphabet.index(x[i-1])][-1]\n",
"\n",
" # Initialize first row\n",
" for i in range(1,len(y)+1):\n",
" D[0][i] = D[0][i-1] + score[-1][alphabet.index(y[i-1])]\n",
" for j in range(1,len(y)+1):\n",
" D[0][j] = D[0][j-1] + score[-1][alphabet.index(y[j-1])]\n",
" \n",
" # Fill rest of the matrix\n",
" for i in range(1, len(x)+1):\n",
Expand Down

0 comments on commit f2fcfe3

Please sign in to comment.