csbio (biocs tumbled) RSS

a tumblelog to supplement my real blog

Things too long to tweet and too unimportant to blog go here.

Archive

Jan
22nd
Fri
permalink

If you get this error when trying to use the —home option when installing a custom Python module:

error: must supply either home or prefix/exec-prefix -- not both

then this might be because of default setting for prefix. This will work:

python setup.py install --home=~ --prefix=''
Jan
20th
Wed
permalink
[The HMMER3 tblout format is] a whitespace delimited file for the first 18 fields on each line; everything after field 18 is free text target description. We parse this with awk, perl, sort, cut, join, and other tools.
Sean Eddy Therefore: don’t rely on the format of the table, it will break in some cases. Rather, split the lines with a regex or something.
Sep
30th
Wed
permalink
So often people are working hard at the wrong thing. Working on the right thing is probably more important than working hard.
Caterina Fake, also pointing to Watson & Crick who discovered the structure of the DNA not working 24/7.
Aug
6th
Thu
permalink

Handle non-UTF8 character in Perl

use Encode;
decode("utf8", $line, Encode::FB_HTMLCREF); 

Jun
30th
Tue
permalink
Genes do not respect disciplinary boundaries.
— Lawrence Hunter in his talk at ISMB/ECCB 2009. Some genes that have been studied in certain clinical areas might be relevant in other areas as well, e.g. relaxin I.
Apr
14th
Tue
permalink
You can predict the neural activity in your brain when you think about a word based on how that word is used on the web.
— Tom M. Mitchell in a most excellent Google Tech Talk: Brains, Meaning and Corpus Statistics.
Mar
5th
Thu
permalink

migrate to Django 1.0 with sed

Doesn’t cover everything, but works for me:

find -name '*py' | xargs sed -i -e 's/maxlength/max_length/' -e 's/FloatField/DecimalField/'

Jan
28th
Wed
permalink

Date regex for grep

(January|February|March|April|May|June|July|August|September|October|November|December) *([1-9]|[1-3][0-9]), *[12][0-9][0-9][0-9]|([1-9]|[1-3][0-9]) *(January|February|March|April|May|June|July|August|September|October|November|December) *[12][0-9][0-9][0-9]

This matches dates like:

12 October 1993
29 June 1982
31 March 2008
4 July 1980
April 21, 2008
February 12, 2007
March 31, 2008
May 27, 2002
November 16, 2006

Jan
26th
Mon
permalink
If you drive too fast (and go over a hill)…

If you drive too fast (and go over a hill)…

permalink
…you’ll end up in the roof of a church
[context]

…you’ll end up in the roof of a church

[context]