Success! I have python bindings for wurst, and I have used them to write a very very basic alignment script. Also, last week, I completed a first prototype of my multiple structure alignment tool. Now, I just need to restore the salami server so I can tick the last item on my TODO list for 2006.
Merry christmas everyone!
Archive for December, 2006
Success!
Saturday, December 23rd, 2006The limits of Perl
Saturday, December 9th, 2006In the last couple of weeks, I hit the limtation of Perl not once, but twice! I’m not sure what (if anything) that says about either me, or Perl.
The first problem I encountered wasn’t exactly with the language itself, but with the OpenGL bindings. In order to be able to code a nice looking ribbon view for my Protein Structure Alignment Viewer, I wanted to use NURBS. However, the OpenGL::Simple module doesn’t support advanced functions such as NURBS (hence the “Simple” in the name). The OpenGL module was obviously what I turned to. Unfortunately, it seems that I was the first person to try to use that module in this decade. This means that it no longer compiles, and is probably in need of more love than I can give it. -Maybe doing 3D graphics from perl is a stupid idea anyways. I briefly thought about using the SWIG interface files from PyOpenGL to build working Perl bindings, but at that point, my motivation had left me, and I decided to do something else.
That something else was multithreading. I thought now that I’ve got a dual core processor, I might as well use it to speed up the search even further and keep the GUI responsive while the search is running. I started by moving the search function to its own thread. Unfortunately, the resulting alignments and structures kept disappearing after the search-thread had finished. When I finally asked Andrew for advice, he told me that Perl threads and XS modules don’t like each other, and the garbage collector takes away your data after the thread which allocated memory for it has died.
As a result, I have decided to use SWIG to build bindings for wurst. Maybe things will be better with Python. That means that I’ll have to rewrite my scripts from scratch, but I’ve got nothing better to do at the moment, and its more fun than chasing my weird memory management bug.









