Archive for the ‘Uncategorized’ Category

No “last week in the blogs” this week

Monday, April 27th, 2009

Sorry, there won’t be a list this week.  I have not only been too busy to blog, but too busy even to read the blogs, so I don’t really feel up to trying to make a list for this week… it would have to be based on very quick scans of headlines and you have your RSS reader for that!

Oh well, I hope to catch up for next week.  I should, I think.  This week was crazy because I needed to finish some work before today, but for the rest of the week I am on the road (visiting London and Oxford) and should have plenty of blogging time when sitting in a hotel waiting for my slow laptop to finish MCMC runs.

117-131=-14

That is one seriously messed up woman

Sunday, April 12th, 2009

Evolution in action.

Now that woman is either seriously mentally ill, or seriously stupid…

102-126=-24

Applied Programming: Course plan

Thursday, September 25th, 2008

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.

Course plan

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

One lecture:

  • Logging into the department’s computers and running Python there (plus how to use Idle).
  • Installing Python on your own computer.
  • Interactive Python sessions
    • expressions
    • comparisons
    • assignments
    • multiple-assignments
  • Using help() to learn more
  • built-in data types
  • scripts in files (and how to execute them)

Week 2: Control structures

First lecture:

  • branching
  • looping
  • indentation

Second lecture:

  • functions
  • (list comprehension)
  • generators
  • exceptions

Hand-in exercise:

  • Locate ORFs in a string
  • Translate them into proteins
  • Calculate frequencies of AA

Week 3: Parsing

First lecture:

  • files and IO
  • string operations

Second lecture:

  • regular expressions

Hand-in exercise:

  • parse table of genes (GFF)
  • parse sequences from FASTA
  • calculate AA frequencies

Week 4: Structuring code

First lecture:

  • modules
  • classes

Second lecture:

  • “Design by Contract”
  • Unit testing

Hand-in exercise:

  • 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

First lecture:

  • Introduction to BioPython (and Bio*)

Second lecture:

  • Sequences and sequence parsers
  • NCBI access
  • Blast

Hand-in exercise:

  • Read a list of human genes (or IDs) from a table
  • Download them from NCBI
  • Blast them against the mouse

Week 6: SciPy

First lecture:

  • Plotting using matplotlib (pylab)

Second lecture:

  • Fitting functions
  • Linear regression

Week 7: Go faster stripes (profiling and optimizing)

First lecture:

  • cProfile
  • Timing code-chunks

Second lecture:

  • Algorithmic complexity
  • “Big O” notation (and roughly how to figure it out)

Hand-in exercise:

  • 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.

Teaching material

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 back!

Monday, July 21st, 2008

As you might have noticed I haven’t blogged for ages.  I was busy for a few weeks with projects and the last week and a half I’ve been out of the office taking a little holiday.  Not travelling anywhere, just not working, and not blogging either.

Well, that got boring so now I’m back again.  I have a deadline for a paper submission at the end of the week, so I guess I’ll be working on that.  Otherwise it is still a bit slow around here which is both good and bad.  It means I have time to focus on research rather than teaching or writing, but it also means that I am likely to slack it a bit.

Oh well, back to work :)

Man, that was a long blogging break

Saturday, July 5th, 2008

It has been a while since I blogged about anything, and I’m not really writing anything interesting today either.  I’ve been busy with exams and projects and haven’t really had anything to write about.

Now the summer holiday is approaching, and I have a lot of projects I’d like to finish before it, so I don’t know how much time I’ll have for blogging the coming weeks either.