In early October 2006 I lectured at the University of Stellenbosch on how to make C and Python work together, various ways to parse files, and more.
Introduction to Programming for Bioinformatics in Python
In February 2004 I taught an introductary programming course at the NBN (National Bioinformatics Network)
in South Africa. It was part of an intense and impressive 7 week
training session for bioinformatics research with topics including
bioinfomatics theory, algorithms, databases, software, unix,
programming and even grant writing.
The portion I taught was two hours a day, six days a week for the
first two weeks. I started off with a translation of a introductory
Perl course Lincoln Stein taught but after the first day I realized
that most of the people in the class had very little programming
experience so I started the next day with the basics and lots of
Some of the students already knew how to program so I made a wide
range of exercises with the expectation that the beginning students
would only get through the first few in each problem set while the
most advanced ones would still be challenged with the harder ones.
Judging from the feedback it worked out pretty well.
Here are all the slides in PDF and PowerPoint format. I made them
using Apple's Keynote but that format is verbose and requires
directories so too much work to put it on-line. Contact me if you
- Introduction to Python [html]
- Strings in Python [PDF|PPT]
- Variables and References in Python [PDF|PPT]
- Lists and the 'for' loop [PDF|PPT]
- Stepping through a 'for' loop [PDF|PPT]
- The if statement and files [PDF|PPT]
- Working on exercises (a few notes first) [PDF|PPT]
- Code Blocks and Indentation [PDF|PPT]
- Functions [PDF|PPT]
- Why? [PDF|PPT]
- Dictionaries [PDF|PPT]
- Advanced Exercises [PDF|PPT]
- Sorting and Modules [PDF|PPT]
- Searching and Regular Expressions [PDF|PPT]
- Important modules: Biopython, SQL & COM [PDF|PPT]
- "Everything Else" [PDF|PPT]
- Answers to all the exercises
Some of the exercises used data files. I think this is the complete
list. If missing I note why.
I really enjoyed teaching the course. It was a lot of work but the
result was seeing many people really get into it and faces light up
with understanding and achievement.
To the whole class, best wishes and good luck for the future!