Duuude…

…where’s my blog?

 

Published May 24, 2009

Filed under: Uncategorized — Tommy @ 1:34 pm

The paper about our SALAMI server has been published. It will appear in Nucleic Acids Research’s Webserver issue. You can get the advance access version here.
Also, I will be speaking at 3dSIG in Stockholm at the end of June. The Topic will be multiple alignments and phylogenies of protein structures. I can’t wait…

 
 

Generating Bibtex Cite-Keys February 2, 2009

Filed under: Uncategorized — Tommy @ 7:24 pm

As I found out recently, Endnote’s bibtex export feature doesn’t really produce bibtex files, but some weird bibtex wannabe format. The biggest problem is that it doesn’t assign cite-keys. If you run into the problem that bib files exported by endnote, you might find this script useful. It simply assigns ascending numbers as cite-keys.

There was also a problem with missing braces in certain publication types, but in my case that was rare enough to be fixed by hand. Vim’s bracket matching and syntax highlighting is quite useful for that kind of thing. Anyway, here is the script. If you find it useful and you would like to extend it to handle the bracket issue, please do get in touch. Of course, the Endnote folks fixing their exporter would also solve the problem…

#!/usr/bin/perl
#
open(MYINPUTFILE, "<$ARGV[0]"); # open for input
my(@lines) = ;
my $counter = 0;
foreach my $line (@lines){
    if ($line =~ /\@article{\n/ | $line =~ /\@incollection{\n/  ){
        $line =~ s/\n/$counter,\n/;
        print $line;
        $counter++;
    }
    else{
        print $line;
    }
}
 
 

The Black Keys December 4, 2008

Filed under: Uncategorized — Tommy @ 3:25 pm

If you dig the Raconteurs or the White Stripes, The Black Keys are going to blow you away! They’ve been on my list of bands to check out for years, and I’m seriously disappointed that I’ve not listened to their stuff sooner. Give them a listen. They’re brilliant!

 
 

Quote of the day December 2, 2008

Filed under: Uncategorized — Tommy @ 5:15 pm

“As economics is known as ‘the miserable science’, software engineering should be known as ‘the doomed discipline’, doomed because it cannot even approach its goal since its goal is self-contradictory. Software engineering presents itself as another worthy cause, but that is eyewash: if you carefully read its literature and analyse what its devotees actually do, you will discover that software engineering has accepted as its charter ‘How to program if you cannot’.”

– Edsger Dijkstra

 
 

Ain’t it cool? September 26, 2008

Filed under: Uncategorized — Tommy @ 4:40 pm

Last week, I took a couple of hours to implement a simple toy force field in perl. A 100 lines of code (plus UCSF Chimera and POVRay) and a couple hours of CPU time resulted in the following animation:

Essentially, the system simulates 780 particles with identical masses which are connected by invisible springs with varying lengths and stiffness. Initially, the masses are placed at random positions. In order to get the system to settle, the force field includes a thermostat which cools the system down quite quickly.

Over the next few weeks, I’ll put up a series of posts which try to explain what I’m working on and why this animation and the code which produces it isn’t just qute, but also interesting and useful.

 
 

Innuendo of the day September 9, 2008

Filed under: Uncategorized — Tommy @ 11:17 pm

Normally, I don’t publicise this kind of thing, but this one is too good to keep to myself:

“Hey baby, do you want to explore black holes with my large particle accelerator?”

This is of course in reference to the start of the LHC experiments at CERN. If you try this as a pickup line, let me know how it went…

UPDATE:

This seems fitting, too:

 
 

I love MPI September 4, 2008

Filed under: Uncategorized — Tommy @ 6:59 pm

Using MPI, I’ve just managed to get a speedup of about 6 for protein structure searches on 8 CPUs without even thinking about optimizations. If that scales across multiple nodes, the SALAMI server might soon become fast enough for interactive use…

MPI in general, and the Perl Parallel::MPI::Simple module are pretty neat APIs. However, despite its name, MPI::Simple still follows the standard MPI API quite closely and is thus not as “simple” as it could be. For many applications, a process manager would already be sufficient. Such a module would create and manage a pool of worker processes and distribute tasks in a round robin fashion.
Both apple and the Qt library offer something similar for thread pools, so why not do the same for MPI processes?

Surely, many others before me have tackled embassasingly parallel tasks before. However, CPAN seems to offer nothing like this. Is such a module simply too trivial so that nobody has bothered publishing their code? Looking at CPAN in general, this doesn’t seem to have stopped folks in the past…

I’ll probably try to cook something up tomorrow.

 
 

Just one thing… June 19, 2008

Filed under: Uncategorized — Tommy @ 5:46 pm


View Larger Map

 
 

Getting EC numbers for PDB-chains March 7, 2008

Filed under: Uncategorized — Tommy @ 2:57 pm

If you ever need IUPAC Enzyme Classification numbers for larger numbers of protein structures, you can use the script below.
Just feed it a text file with one PDB-id and chain identifier per line as the first argument, and it spits out E.C. numbers for each chain. I don’t know what the pdb folks would say if you tried to grab E.C. no.s for the whole database, but getting a couple of hundred at a time should be fine. If you do pull down the ECs for every chain, I’d appreciate it if you made the list available and left a comment or dropped me a line as to where we can find it.

#!/usr/bin/perl

while($_ = <>){
    my $id = $_;
    #chomp($id);
    $id =~ s/^\s+//;
    $id =~ s/\s+$//;
    my $chain = chop($id);
    my $page = `curl -s http://www.rcsb.org/pdb/explore.do?structureId=$id`;
    $page =~ m/Chains.*$chain.*\n.*EC no.*([0-9]+\.[0-9]+\.[0-9]+\.[0-9-]+)/;
    my $ecno = $1;
    $id = $_;
    $id =~ s/^\s+//;
    $id =~ s/\s+$//;
    $id =~ s/\s+/ /g;
    print "$id $ecno\n";
}

Enjoy!

 
 

Be your own Valentine February 16, 2008

Filed under: Uncategorized — Tommy @ 8:57 pm

Thomas Thurman wrote today:
“My team lead was told “Be your own Valentine!â€? which sounds like a polite way of saying something else.”

That quote has got to be by far the best thing that came out of any Valentine’s day ever since some corporate twat invented it.