Skip to content

Commit

Permalink
removed empty lines for easier copy paste
Browse files Browse the repository at this point in the history
  • Loading branch information
BenLangmead committed Aug 23, 2015
1 parent 2349243 commit 3c5d54f
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions 1.05_AnalyzingReadsByPosition.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -141,22 +141,18 @@
"source": [
"def findGCByPos(reads):\n",
" ''' Find the GC ratio at each position in the read '''\n",
"\n",
" # Keep track of the number of G/C bases and the total number of bases at each position\n",
" gc = [0] * 100\n",
" totals = [0] * 100\n",
"\n",
" for read in reads:\n",
" for i in range(len(read)):\n",
" if read[i] == 'C' or read[i] == 'G':\n",
" gc[i] += 1\n",
" totals[i] += 1\n",
" \n",
" # Divide G/C counts by total counts to get the average at each position\n",
" for i in range(len(gc)):\n",
" if totals[i] > 0:\n",
" gc[i] /= float(totals[i])\n",
"\n",
" return gc\n",
"\n",
"gc = findGCByPos(seqs)\n",
Expand Down

0 comments on commit 3c5d54f

Please sign in to comment.