Feynman has always been a hero to me…
Søren and I spent this afternoon planning our upcoming course, Applied Programming (essentially a Python programming class with focus on bioinformatics applications). See my previous thoughts on the class here and here.
The class runs for seven weeks, and this is the plan we came up with is listed below. There is eight weeks there, since the first and last week are really half-weeks.
Week 1: Introduction to Python
- Logging into the department’s computers and running Python there (plus how to use Idle).
- Installing Python on your own computer.
- Interactive Python sessions
- Using help() to learn more
- built-in data types
- scripts in files (and how to execute them)
Week 2: Control structures
- (list comprehension)
- Locate ORFs in a string
- Translate them into proteins
- Calculate frequencies of AA
Week 3: Parsing
- files and IO
- string operations
- regular expressions
- parse table of genes (GFF)
- parse sequences from FASTA
- calculate AA frequencies
Week 4: Structuring code
- “Design by Contract”
- Unit testing
- write a class containing a multiple sequence alignment
- add a method for iterating through the columns of the alignment
- add a method to restrict to subset of species
- add a method to slice the alignment
- add a method to remove all-gaps columns
Week 5: BioPython
- Introduction to BioPython (and Bio*)
- Sequences and sequence parsers
- NCBI access
- Read a list of human genes (or IDs) from a table
- Download them from NCBI
- Blast them against the mouse
Week 6: SciPy
- Plotting using matplotlib (pylab)
- Fitting functions
- Linear regression
Week 7: Go faster stripes (profiling and optimizing)
- Timing code-chunks
- Algorithmic complexity
- “Big O” notation (and roughly how to figure it out)
- Implement a program that builds a string by appending vs. using join()
- Measure the running time on both solutions
- plot and fit to O(n) and O(n2)
Week 8: Introducing the exam project
We still haven’t decided on the exam project, but it is a take-home exam where they will need to write a small program and then hand it in together with a short report.
We had a discussion about the teaching material. We would really like to have a text book for this, but we have been looking for a while without finding one that fits our needs.
We also thought about using one of the many online introductions. There are some pretty good ones.
Still, they are typically more or less at the tutorial level, and that we could just as easily write ourselves, and then get it exactly the way we want it.
I wrote my own lecture notes in previous classes (see e.g. here). It is a lot of work, but it is nice to taylor it exactly to the needs of the class.
The downside is, of course, that the first time the class runs the notes will be pretty short and not proofread in sufficient detail.
I’m used to writing my papers in (La)TeX. In mathematics and computer science, that is the tradition, and quite frankly it is the only choice if you include a lot of math in your documents.
Recently, though, I’m working with people used to writing in Word, and rather than forcing them to learn LaTeX I’ve decided to use Word as well. Only when the math content is low, though. Writing math in Word is too painful to even contemplate.
Anyway, for simple text editing I have no complains with Word. It does what it is supposed to, and I find the grammar checker a great help (I do have a grammar checker in the editor I use for LaTeX, but it isn’t quite as good).
I run into problems when I try to do anything but simple text editing.
Like today, I am trying to insert a figure in a document. I have a plot in PDF and I want to insert that together with a caption.
I can insert the figure and write the caption in a text box. No problem. It looks something like this:
Now, to make the editing easier, I want to group the figure with the caption, so I can move them around as a unit if I need to move them later on.
If I do that, it looks like this:
WTF? Why did it suddenly turn my (vector graphic) PDF into (a very pixilated) bitmap image?
This is so not what I expected, and certainly not what I wanted…