diff --git a/05 - IPython Notebook.ipynb b/05 - IPython Notebook.ipynb index 1e0a3a1ef019165ed530b31b6d61ff4f73e2f458..7d8a8e98b1bedd068895ff3d1d8db9341a721066 100644 --- a/05 - IPython Notebook.ipynb +++ b/05 - IPython Notebook.ipynb @@ -203,7 +203,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "" + "" ] }, { @@ -225,7 +225,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "" + "" ] }, { @@ -260,7 +260,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "" + "" ] }, { @@ -437,7 +437,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "" + "" ] }, { @@ -829,10 +829,13 @@ "source": [ "Start a Notebook session.\n", " - $ ipython notebook\n", + "\n", "This opens a webbrowser and shows existing notebooks.\n", " - Create a new notebook by clicking the 'New notebook' button.\n", + "\n", "A new tab will open with a fresh notebook. Rename your notebook to something useful\n", " - Click on the current name (Untitled1) and edit this\n", + "\n", "Add the code shown below to some **_code_** cells\n", " - Add cells by pressen the '+' button or ALT+ENTER\n", " - Remember the keyboard shortcuts or the help function ('h')\n", @@ -845,7 +848,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "def translate(seq):\n", + "def complement(seq):\n", " complements = {'A': 'T', 'C': 'G', 'T': 'A', 'G': 'C'}\n", " c_seq = ''\n", " for n in seq:\n", @@ -1134,9 +1137,9 @@ ] }, { - "cell_type": "raw", - "metadata": {}, - "source": [ + "cell_type": "code", + "collapsed": false, + "input": [ "<table border=\"1\" style=\"width:200px\">\n", "<tr>\n", " <td>Jill</td>\n", @@ -1149,7 +1152,10 @@ " <td>94</td>\n", "</tr>\n", "</table>" - ] + ], + "language": "python", + "metadata": {}, + "outputs": [] }, { "cell_type": "markdown", @@ -1185,11 +1191,14 @@ ] }, { - "cell_type": "raw", - "metadata": {}, - "source": [ + "cell_type": "code", + "collapsed": false, + "input": [ "\\begin{equation*} \\left( \\sum_{k=1}^n a_k b_k \\right)^2 \\leq \\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) \\end{equation*}\n" - ] + ], + "language": "python", + "metadata": {}, + "outputs": [] }, { "cell_type": "markdown", @@ -1214,11 +1223,14 @@ ] }, { - "cell_type": "markdown", - "metadata": {}, - "source": [ + "cell_type": "code", + "collapsed": false, + "input": [ "" - ] + ], + "language": "python", + "metadata": {}, + "outputs": [] }, { "cell_type": "markdown", @@ -1270,13 +1282,13 @@ ], "metadata": {}, "output_type": "pyout", - "prompt_number": 34, + "prompt_number": 1, "text": [ - "<IPython.lib.display.YouTubeVideo at 0x331c850>" + "<IPython.lib.display.YouTubeVideo at 0x3224890>" ] } ], - "prompt_number": 34 + "prompt_number": 1 }, { "cell_type": "heading", @@ -1448,7 +1460,7 @@ "metadata": {}, "source": [ "\n", - "<a href=\"url\"><img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/7/75/DNA_palindrome.svg/1590px-DNA_palindrome.svg.png\" align=\"center\" width=\"500\" ></a>\n" + "<img src=\"https://git.lumc.nl/humgen/programming-course/raw/master/images/1590px-DNA_palindrome.svg.png\" align=\"center\" width=\"400\" >\n" ] }, { @@ -1464,9 +1476,17 @@ "metadata": {}, "source": [ " - Think of function which can test if a sequence is palindromic\n", - " - Use the functions 'translate' and 'reverse'\n", + " - Use the functions 'complement' and 'reverse'\n", " - Nicely formatted mardown cell(s) explaining the notebook\n", - " - Add links as references like the one above\n" + " - Add links as references like the one above\n", + "\n", + "**Bonus: Write a function which can test if there are short palindromic sequences in a longer piece of DNA**\n", + "\n", + "- Try to find the palindromic seqeuences of at least length 6 in the sequence : GGGAGACATGTCTAACCGTTGTAAAA\n", + "- Implement your current functions in a new function\n", + "- Begin to iterate over a sequence and find a palindrome of size 2\n", + "- Continue to work from there and expand your test\n", + "- Can a palindromic sequence have an odd length?\n" ] }, {