Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Programming course
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
courses
Programming course
Commits
7c1c41be
Commit
7c1c41be
authored
10 years ago
by
Michiel van Galen
Browse files
Options
Downloads
Patches
Plain Diff
Changed location of the figures
parent
68649d37
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
05 - IPython Notebook.ipynb
+43
-23
43 additions, 23 deletions
05 - IPython Notebook.ipynb
with
43 additions
and
23 deletions
05 - IPython Notebook.ipynb
+
43
−
23
View file @
7c1c41be
...
@@ -203,7 +203,7 @@
...
@@ -203,7 +203,7 @@
"cell_type": "markdown",
"cell_type": "markdown",
"metadata": {},
"metadata": {},
"source": [
"source": [
""
""
]
]
},
},
{
{
...
@@ -225,7 +225,7 @@
...
@@ -225,7 +225,7 @@
"cell_type": "markdown",
"cell_type": "markdown",
"metadata": {},
"metadata": {},
"source": [
"source": [
""
""
]
]
},
},
{
{
...
@@ -260,7 +260,7 @@
...
@@ -260,7 +260,7 @@
"cell_type": "markdown",
"cell_type": "markdown",
"metadata": {},
"metadata": {},
"source": [
"source": [
""
""
]
]
},
},
{
{
...
@@ -437,7 +437,7 @@
...
@@ -437,7 +437,7 @@
"cell_type": "markdown",
"cell_type": "markdown",
"metadata": {},
"metadata": {},
"source": [
"source": [
""
""
]
]
},
},
{
{
...
@@ -829,10 +829,13 @@
...
@@ -829,10 +829,13 @@
"source": [
"source": [
"Start a Notebook session.\n",
"Start a Notebook session.\n",
" - $ ipython notebook\n",
" - $ ipython notebook\n",
"\n",
"This opens a webbrowser and shows existing notebooks.\n",
"This opens a webbrowser and shows existing notebooks.\n",
" - Create a new notebook by clicking the 'New notebook' button.\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",
"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",
" - Click on the current name (Untitled1) and edit this\n",
"\n",
"Add the code shown below to some **_code_** cells\n",
"Add the code shown below to some **_code_** cells\n",
" - Add cells by pressen the '+' button or ALT+ENTER\n",
" - Add cells by pressen the '+' button or ALT+ENTER\n",
" - Remember the keyboard shortcuts or the help function ('h')\n",
" - Remember the keyboard shortcuts or the help function ('h')\n",
...
@@ -845,7 +848,7 @@
...
@@ -845,7 +848,7 @@
"cell_type": "code",
"cell_type": "code",
"collapsed": false,
"collapsed": false,
"input": [
"input": [
"def
translate
(seq):\n",
"def
complement
(seq):\n",
" complements = {'A': 'T', 'C': 'G', 'T': 'A', 'G': 'C'}\n",
" complements = {'A': 'T', 'C': 'G', 'T': 'A', 'G': 'C'}\n",
" c_seq = ''\n",
" c_seq = ''\n",
" for n in seq:\n",
" for n in seq:\n",
...
@@ -1134,9 +1137,9 @@
...
@@ -1134,9 +1137,9 @@
]
]
},
},
{
{
"cell_type": "
raw
",
"cell_type": "
code
",
"
metadata": {}
,
"
collapsed": false
,
"
source
": [
"
input
": [
"<table border=\"1\" style=\"width:200px\">\n",
"<table border=\"1\" style=\"width:200px\">\n",
"<tr>\n",
"<tr>\n",
" <td>Jill</td>\n",
" <td>Jill</td>\n",
...
@@ -1149,7 +1152,10 @@
...
@@ -1149,7 +1152,10 @@
" <td>94</td>\n",
" <td>94</td>\n",
"</tr>\n",
"</tr>\n",
"</table>"
"</table>"
]
],
"language": "python",
"metadata": {},
"outputs": []
},
},
{
{
"cell_type": "markdown",
"cell_type": "markdown",
...
@@ -1185,11 +1191,14 @@
...
@@ -1185,11 +1191,14 @@
]
]
},
},
{
{
"cell_type": "
raw
",
"cell_type": "
code
",
"
metadata": {}
,
"
collapsed": false
,
"
source
": [
"
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"
"\\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",
"cell_type": "markdown",
...
@@ -1214,11 +1223,14 @@
...
@@ -1214,11 +1223,14 @@
]
]
},
},
{
{
"cell_type": "
markdown
",
"cell_type": "
code
",
"
metadata": {}
,
"
collapsed": false
,
"
source
": [
"
input
": [
""
""
]
],
"language": "python",
"metadata": {},
"outputs": []
},
},
{
{
"cell_type": "markdown",
"cell_type": "markdown",
...
@@ -1270,13 +1282,13 @@
...
@@ -1270,13 +1282,13 @@
],
],
"metadata": {},
"metadata": {},
"output_type": "pyout",
"output_type": "pyout",
"prompt_number":
34
,
"prompt_number":
1
,
"text": [
"text": [
"<IPython.lib.display.YouTubeVideo at 0x3
31c85
0>"
"<IPython.lib.display.YouTubeVideo at 0x3
22489
0>"
]
]
}
}
],
],
"prompt_number":
34
"prompt_number":
1
},
},
{
{
"cell_type": "heading",
"cell_type": "heading",
...
@@ -1448,7 +1460,7 @@
...
@@ -1448,7 +1460,7 @@
"metadata": {},
"metadata": {},
"source": [
"source": [
"\n",
"\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=\"
5
00\"
></a
>\n"
"<img src=\"http
s
://
git.lumc.nl/humgen/programming-course/raw/master/images
/1590px-DNA_palindrome.svg.png\" align=\"center\" width=\"
4
00\" >\n"
]
]
},
},
{
{
...
@@ -1464,9 +1476,17 @@
...
@@ -1464,9 +1476,17 @@
"metadata": {},
"metadata": {},
"source": [
"source": [
" - Think of function which can test if a sequence is palindromic\n",
" - 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",
" - 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"
]
]
},
},
{
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment