Skip to content
Snippets Groups Projects
Commit 997104b2 authored by wyleung's avatar wyleung
Browse files

Merge changes from upstream

parents e3d28e6a 7894cf5c
No related branches found
No related tags found
1 merge request!2Merge with lecture about Data analysis (PaintingPanda's)
[submodule "reveal.js"]
path = reveal.js
url = https://github.com/hakimel/reveal.js.git
{
"metadata": {
"name": ""
"celltoolbar": "Slideshow",
"name": "",
"signature": "sha256:6c570ac428c0fbfa0115d6c05d52e3c05410cd3de42ae35e7ee7feb0f435a641"
},
"nbformat": 3,
"nbformat_minor": 0,
......@@ -20,31 +22,15 @@
"\n",
"<br>\n",
"\n",
"[Wibowo Arindrarto](mailto:w.arindrarto@lumc.nl), [Jeroen Laros](mailto:j.f.j.laros@lumc.nl), [Zuotian Tatum](mailto:z.tatum@lumc.nl), [Martijn Vermaat](mailto:m.vermaat.hg@lumc.nl)\n",
"[Jeroen Laros](mailto:j.f.j.laros@lumc.nl), [Department of Human Genetics, Leiden University Medical Center](http://humgen.nl)\n",
"\n",
"[Department of Human Genetics, Leiden University Medical Center](http://humgen.nl)\n",
"[Michiel van Galen](mailto:m.van_galen@lumc.nl), [Department of Human Genetics, Leiden University Medical Center](http://humgen.nl)\n",
"\n",
"License: [Creative Commons Attribution 3.0 License (CC-by)](http://creativecommons.org/licenses/by/3.0)"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "skip"
}
},
"source": [
"About this notebook\n",
"===\n",
"\n",
"This notebook is the source for a set of slides. If you want to edit them, be sure to choose *Slideshow* in the *Cell Toolbar* menu.\n",
"[Wai Yi Leung](mailto:w.y.leung@lumc.nl), [Sequencing Analysis Support Core, Leiden University Medical Center](http://sasc.lumc.nl)\n",
"\n",
"You can use nbconvert to convert the slides to HTML and serve them:\n",
"[Martijn Vermaat](mailto:m.vermaat.hg@lumc.nl), [Department of Human Genetics, Leiden University Medical Center](http://humgen.nl)\n",
"\n",
" ipython nbconvert --to slides --post serve welcome.ipynb\n",
"\n",
"This will open the slides in a new browser window."
"License: [Creative Commons Attribution 3.0 License (CC-by)](http://creativecommons.org/licenses/by/3.0)"
]
},
{
......@@ -62,7 +48,7 @@
"* Programming as a tool to do your research.\n",
"* Slightly focussed on bioinformatics.\n",
"\n",
"**Note:** It's a pilot."
"**Note:** It <s>is</s> was a pilot."
]
},
{
......@@ -76,16 +62,16 @@
"Teachers\n",
"===\n",
"\n",
"* Wibowo Arindrarto<br>\n",
" [w.arindrarto@lumc.nl](mailto:w.arindrarto@lumc.nl)\n",
"\n",
"\n",
"* Jeroen Laros<br>\n",
" [j.f.j.laros@lumc.nl](mailto:j.f.j.laros@lumc.nl)\n",
"\n",
"\n",
"* Zuotian Tatum<br>\n",
" [z.tatum@lumc.nl](mailto:z.tatum@lumc.nl)\n",
"* Michiel van Galen<br>\n",
" [m.van_galen@lumc.nl](mailto:m.van_galen@lumc.nl)\n",
"\n",
"\n",
"* Wai Yi Leung<br>\n",
" [w.y.leung@lumc.nl](mailto:w.y.leung@lumc.nl)\n",
"\n",
"\n",
"* Martijn Vermaat<br>\n",
......@@ -129,34 +115,34 @@
"</tr>\n",
"<tr><td>11-12</td>\n",
"<td>Introduction to Python (3)</td>\n",
"<td>Zuotian</td>\n",
"<td>Michiel</td>\n",
"</tr>\n",
"<tr><td rowspan=\"3\">Tuesday</td>\n",
"<td>09-10</td>\n",
"<td>Version control with Git</td>\n",
"<td>Zuotian</td>\n",
"<td>More Python (1)</td>\n",
"<td>Michiel</td>\n",
"</tr>\n",
"<tr><td>10-11</td>\n",
"<td>More Python (1)</td>\n",
"<td>Bowo</td>\n",
"<td>More Python (2)</td>\n",
"<td>Wai Yi</td>\n",
"</tr>\n",
"<tr><td>11-12</td>\n",
"<td>More Python (2)</td>\n",
"<td>Working with NumPy arrays</td>\n",
"<td>Martijn</td>\n",
"</tr>\n",
"<tr><td rowspan=\"3\">Wednesday</td>\n",
"<td>09-10</td>\n",
"<td>Working with NumPy arrays (1)</td>\n",
"<td>Zuotian</td>\n",
"<td>IPython Notebook</td>\n",
"<td>Michiel</td>\n",
"</tr>\n",
"<tr><td>10-11</td>\n",
"<td>Working with NumPy arrays (2)</td>\n",
"<td>Martijn</td>\n",
"</tr>\n",
"<tr><td>11-12</td>\n",
"<td>Plotting with matplotlib</td>\n",
"<td>Jeroen</td>\n",
"</tr>\n",
"<tr><td>11-12</td>\n",
"<td>Python for data analysis</td>\n",
"<td>Wai Yi</td>\n",
"</tr>\n",
"<tr><td rowspan=\"3\">Friday</td>\n",
"<td>09-10</td>\n",
"<td>Object-oriented programming</td>\n",
......@@ -164,7 +150,7 @@
"</tr>\n",
"<tr><td>10-11</td>\n",
"<td>Biopython (1)</td>\n",
"<td>Bowo</td>\n",
"<td>Wai Yi</td>\n",
"</tr>\n",
"<tr><td>11-12</td>\n",
"<td>Biopython (2)</td>\n",
......@@ -173,7 +159,7 @@
"</tbody>\n",
"</table>\n",
"\n",
"All slides are linked as one-page documents from the course website: [humgenprojects.lumc.nl/trac/programming-course](https://humgenprojects.lumc.nl/trac/programming-course/)"
"All slides are linked as one-page documents from the course website: [humgenprojects.lumc.nl/trac/humgenprojects/wiki/ProgrammingCourse](https://humgenprojects.lumc.nl/trac/humgenprojects/wiki/ProgrammingCourse)"
]
},
{
......@@ -190,10 +176,10 @@
"* Linux or Mac OSX\n",
"* Git\n",
"* Python 2.7\n",
"* IPython 1.0\n",
"* IPython 2.1\n",
"* NumPy, matplotlib, Biopython\n",
"\n",
"Instructions on the course website: [humgenprojects.lumc.nl/trac/programming-course](https://humgenprojects.lumc.nl/trac/programming-course/)"
"Instructions on the course website: [humgenprojects.lumc.nl/trac/humgenprojects/wiki/ProgrammingCourse](https://humgenprojects.lumc.nl/trac/humgenprojects/wiki/ProgrammingCourse)"
]
},
{
......@@ -241,32 +227,16 @@
}
},
"source": [
"GitLab accounts\n",
"Getting help\n",
"===\n",
"\n",
"* Login with your LUMC username and password.\n",
"* Make some noise if you don't have an account\n",
"* We'll use this later.\n",
"* Ask a teacher or assistant.\n",
"* If it's private, mail one of the teachers.\n",
"* Use our etherpad:\n",
"\n",
"<br>\n",
"\n",
"<center style=\"font-size: 300%\">[https://git.lumc.nl](https://git.lumc.nl/)</center>"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"Getting help\n",
"===\n",
"\n",
"* Ask a teacher or assistant.\n",
"* Post your question on the GitLab wall: [https://git.lumc.nl/humgen/programming-course/wall](https://git.lumc.nl/humgen/programming-course/wall)\n",
"* If it's private, mail one of the teachers."
"<center style=\"font-size: 300%\">[tinyurl.com/leidencourse](http://tinyurl.com/leidencourse)</center>"
]
},
{
......@@ -289,7 +259,7 @@
{
"html": [
"<style>/* Remove the vertical scrollbar added by nbconvert. */\n",
".reveal {\n",
"html {\n",
" overflow-y: hidden;\n",
"}\n",
"\n",
......@@ -302,13 +272,22 @@
" color: black ! important;\n",
" font-weight: normal ! important;\n",
"}\n",
"span.title {\n",
" color: black ! important;\n",
"}\n",
"span.tag {\n",
" color: black ! important;\n",
"}\n",
"span.attribute {\n",
" color: black ! important;\n",
"}\n",
"</style>"
],
"metadata": {},
"output_type": "pyout",
"prompt_number": 1,
"text": [
"<IPython.core.display.HTML at 0x32f7210>"
"<IPython.core.display.HTML at 0x33caa50>"
]
}
],
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Software installation
=====================
The following guide gets you a virtual environment with all the necessary
packages installed.
Linux
-----
We assume Ubuntu (12.10 Quantal Quetzal or later) or Debian Linux (7.0 Wheezy
or later), but if you manage to install everything on a different flavour
that's also fine.
You can [download Ubuntu here](http://www.ubuntu.com/) and either install it
directly on your machine, or run it inside
[VirtualBox](https://www.virtualbox.org/).
Python version >= 2.7.3 and < 3.0 is required. This is installed by default on
Ubuntu and Debian Linux. Note that we use Python 2, *not* Python 3.
We need some system packages to be installed. For the following command, you
need sudo rights:
sudo apt-get install -y \
curl python-qt4 libfreetype6-dev libpng12-dev python-cairo \
python-gtk2 python-gtk2-dev git gfortran
From here on, everything is local for the current user.
Install [virtualenv](http://www.virtualenv.org/) and
[virtualenvwrapper](http://virtualenvwrapper.readthedocs.org/) using
[Virtualenv Burrito](https://github.com/brainsik/virtualenv-burrito):
curl -sL https://raw.github.com/brainsik/virtualenv-burrito/master/virtualenv-burrito.sh | $SHELL
source ~/.venvburrito/startup.sh
Automatically
[link PyGTK/Pycairo/PyQt system packages](https://gist.github.com/martijnvermaat/6111396/)
into our virtual environments:
curl -sL https://gist.github.com/martijnvermaat/6111396/raw/postmkvirtualenv > ~/.virtualenvs/postmkvirtualenv
Create a virtual environment (named `programming-course`, but you could choose
any name here):
mkvirtualenv programming-course
Install IPython:
pip install ipython
Install some of the other package we'll use:
pip install pyzmq tornado jinja2 pygments sphinx markdown nose
pip install numpy
pip install matplotlib
pip install biopython
pip install pandas==0.14.0
pip install openpyxl==2.0.4
Define a default matplotlib backend:
mkdir -p ~/.config/matplotlib
echo "backend : GTKCairo" >> ~/.config/matplotlib/matplotlibrc
Mac OSX Mountain Lion
---------------------
Install
[Xcode from the App Store](https://itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12
Xcode from the App Store). Start Xcode and install the device support
(Preferences -> Downloads).
Install Xcode command line tools:
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
brew doctor
xcodebuild -license # accept license
Add user `bin`, and local Python to your `$PATH`:
echo 'export PATH="~/bin:/usr/local/share/python:/usr/local/bin:$PATH"' > .bash_profile
. .bash_profile
We need some system packages:
brew install python --with-brewed-openssl
brew install gfortran
Install [virtualenv](http://www.virtualenv.org/) and
[virtualenvwrapper](http://virtualenvwrapper.readthedocs.org/) using
[Virtualenv Burrito](https://github.com/brainsik/virtualenv-burrito):
curl -s https://raw.github.com/brainsik/virtualenv-burrito/master/virtualenv-burrito.sh | $SHELL
source .venvburrito/startup.sh
Create a virtual environment (named `programming-course`, but you could choose
any name here):
mkvirtualenv programming-course
Install IPython (version 1.0):
pip install -e git+https://github.com/ipython/ipython#egg=ipython
# or after its 1.0 release: pip install ipython
Install some of the other package we'll use:
pip install pyzmq tornado jinja2 pygments sphinx markdown nose
pip install numpy
pip install matplotlib
pip install biopython
pip install pandas==0.14.0
pip install openpyxl==2.0.4
Software installation
=====================
The following guide gets you a virtual environment with all the necessary
packages installed.
Linux
-----
We assume Ubuntu (12.04 Precise Pangolin or later) or Debian Linux (7.0 Wheezy
or later), but if you manage to install everything on a different flavour
that's also fine.
You can [download Ubuntu here](http://www.ubuntu.com/) and either install it
directly on your machine, or run it inside
[VirtualBox](https://www.virtualbox.org/).
Python version >= 2.7.3 and < 3.0 is required. This is installed by default on
Ubuntu and Debian Linux. Note that we use Python 2, *not* Python 3.
We need some system packages to be installed. For the following command, you
need sudo rights:
sudo apt-get install -y \
curl python-qt4 libfreetype6-dev libpng12-dev python-cairo \
python-gtk2 python-gtk2-dev git gfortran
From here on, everything is local for the current user.
Install [virtualenv](http://www.virtualenv.org/) and
[virtualenvwrapper](http://virtualenvwrapper.readthedocs.org/) using
[Virtualenv Burrito](https://github.com/brainsik/virtualenv-burrito):
curl -sL https://raw.github.com/brainsik/virtualenv-burrito/master/virtualenv-burrito.sh | $SHELL
source ~/.venvburrito/startup.sh
Automatically
[link PyGTK/Pycairo/PyQt system packages](https://gist.github.com/martijnvermaat/6111396/)
into our virtual environments:
curl -sL https://gist.github.com/martijnvermaat/6111396/raw/postmkvirtualenv > ~/.virtualenvs/postmkvirtualenv
Create a virtual environment (named `programming-course`, but you could choose
any name here):
mkvirtualenv programming-course
Install Python packages:
pip install -r requirements.txt
Define a default matplotlib backend:
mkdir -p ~/.config/matplotlib
echo "backend : GTKCairo" >> ~/.config/matplotlib/matplotlibrc
Mac OSX Mountain Lion
---------------------
Install
[Xcode from the App Store](https://itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12
Xcode from the App Store). Start Xcode and install the device support
(Preferences -> Downloads).
Install Xcode command line tools:
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
brew doctor
xcodebuild -license # accept license
Add user `bin`, and local Python to your `$PATH`:
echo 'export PATH="~/bin:/usr/local/share/python:/usr/local/bin:$PATH"' > .bash_profile
. .bash_profile
We need some system packages:
brew install python --with-brewed-openssl
brew install gfortran
Install [virtualenv](http://www.virtualenv.org/) and
[virtualenvwrapper](http://virtualenvwrapper.readthedocs.org/) using
[Virtualenv Burrito](https://github.com/brainsik/virtualenv-burrito):
curl -sL https://raw.github.com/brainsik/virtualenv-burrito/master/virtualenv-burrito.sh | $SHELL
source .venvburrito/startup.sh
Create a virtual environment (named `programming-course`, but you could choose
any name here):
mkvirtualenv programming-course
Install Python packages:
pip install -r requirements.txt
Programming course
==================
This repository contains material for the first installment (August 2013) of
a programming course for scientists organised by the department of Human
This repository contains material for the second installment (July 2014) of a
programming course for scientists organised by the department of Human
Genetics of the Leiden University Medical Center.
The course is targeted at PhD students, Postdocs, or anyone willing to learn
......@@ -23,35 +23,55 @@ Software installation
See the instructions in `INSTALL.md`.
Slides
------
Materials
---------
The top-level directory contains slides for the following lessons.
The top-level directory contains materials for the following lessons:
1. [Welcome](http://nbviewer.ipython.org/urls/raw.github.com/LUMC/programming-course/master/welcome.ipynb)
2. [Introduction to Python](http://nbviewer.ipython.org/urls/raw.github.com/LUMC/programming-course/master/python.ipynb)
3. [Version control with Git](http://nbviewer.ipython.org/urls/raw.github.com/LUMC/programming-course/master/git.ipynb)
4. [More Python Goodness](http://nbviewer.ipython.org/urls/raw.github.com/LUMC/programming-course/master/more-python.ipynb)
5. [Working with NumPy arrays](http://nbviewer.ipython.org/urls/raw.github.com/LUMC/programming-course/master/numpy.ipynb)
6. [Plotting with matplotlib](http://nbviewer.ipython.org/urls/raw.github.com/LUMC/programming-course/master/matplotlib.ipynb)
7. [Object-oriented programming](http://nbviewer.ipython.org/urls/raw.github.com/LUMC/programming-course/master/classes.ipynb)
8. [A sip of Biopython](http://nbviewer.ipython.org/urls/raw.github.com/LUMC/programming-course/master/biopython.ipynb)
1. Welcome (slides) [view](http://nbviewer.ipython.org/urls/git.lumc.nl/humgen/programming-course/raw/master/welcome.ipynb)
2. Introduction to Python (slides) [view](http://nbviewer.ipython.org/urls/git.lumc.nl/humgen/programming-course/raw/master/python.ipynb)
3. More Python Goodness (notebook) [view](http://nbviewer.ipython.org/urls/git.lumc.nl/humgen/programming-course/raw/master/more-python.ipynb)
4. Working with NumPy arrays (slides) [view](http://nbviewer.ipython.org/urls/git.lumc.nl/humgen/programming-course/raw/master/numpy.ipynb)
5. Plotting with matplotlib (slides) [view](http://nbviewer.ipython.org/urls/git.lumc.nl/humgen/programming-course/raw/master/matplotlib.ipynb)
6. Object-oriented programming (slides) [view](http://nbviewer.ipython.org/urls/git.lumc.nl/humgen/programming-course/raw/master/classes.ipynb)
7. A sip of Biopython (notebook) [view](http://nbviewer.ipython.org/urls/git.lumc.nl/humgen/programming-course/raw/master/biopython.ipynb)
Note: These links are to one-page renderings on [IPython Notebook Viewer](http://nbviewer.ipython.org/), see below how to get the real slideshows.
As indicated, some of the lessons are slideshows, whereas others are just
notebooks we scroll through during class. The links above are all one-page
static renderings on [IPython Notebook Viewer](http://nbviewer.ipython.org/).
We also have a
[repository with material for the assignments](https://git.lumc.nl/humgen/programming-course-assignments).
Editing the slides
------------------
The slides are simple IPython notebooks, you can edit them by starting a
notebook server:
Notebooks
---------
We apply some custom styling to the notebooks (e.g., body width, font), which
is loaded in the last cell. This loads `styles/notebook.css` and
`styles/notebook.js`.
A variant `styles/notebook.css.small` is provided that is more suitable for
use on low-resolution displays. To use it, manually change the reference to
this file in the bottom cell, and rerun it.
Slideshows
----------
The sources for the slideshows are also IPython notebooks and you can edit
them by starting a notebook server:
ipython notebook
Choose *Slideshow* in the *Cell Toolbar* menu.
Some aditional information on editing slides in the Notebook can be found
here in [this presentation](http://www.slideviper.oquanta.info/tutorial/slideshow_tutorial_slides.html).
here in
[this presentation](http://www.slideviper.oquanta.info/tutorial/slideshow_tutorial_slides.html).
We also apply some custom styling to the slideshows, which is loaded in the
last cell.
Live rendering of the slides
......@@ -72,12 +92,17 @@ think it's usually not a good idea to rely on internet connectivity for your
slides, so you can also place a copy of reveal.js on your local computer and
specify the location like this:
--RevealHelpTransformer.url_prefix=reveal.js
--reveal-prefix reveal.js
This would look for the reveal.js library in the `reveal.js` directory. A Git
submodule is already setup for this, so you can just do:
This would look for the reveal.js library in the reveal.js directory. You can
download reveal.js by cloning its GitHub repository:
git submodule init
git submodule update
git clone https://github.com/hakimel/reveal.js.git
(Unfortunately, there are other online dependencies such Font Awesome, so
without an internet connection, not everything will look ok, but it will
work.)
Also, if you just want to compile the slides to HTML without serving them to
your browser, leave out the `--post serve` argument.
This diff is collapsed.
This diff is collapsed.
ipython==2.1.0
pyzmq==14.3.1
tornado==3.2.2
Cython==0.20.2
Jinja2==2.7.3
Markdown==2.4.1
Pygments==1.6
Sphinx==1.2.2
Markdown==2.4.1
biopython==1.64
ipython==2.1.0
matplotlib==1.3.1
nose==1.3.3
numpy==1.8.1
matplotlib==1.3.1
biopython==1.64
pandas==0.14.0
openpyxl==1.8.6
seaborn==0.3.1
pandas==0.14.0
pyzmq==14.3.1
scikit-learn==0.14.1
scipy==0.14.0
seaborn==0.3.1
tornado==3.2.2
Subproject commit 131c00689a4c7a18e5c991fc8102347e4594b5d4
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment