2008-06-27

Eclipse Ganymede OutOfMemoryError

The new version of Eclipse is out now: Ganymede. I installed it and most things seem to work fine. The only problem I had was getting an OutOfMemoryError when starting a second Eclipse instance with the Eclipse plugins I develop. This error occurs in the second Eclipse instance after activating some of the plugins by GUI interaction. Normally, such an error can be solved by increasing the maximum heap size the JVM can use with the VM argument -Xmx. The default size is 128m and usually -Xmx256m is enough for my purposes.

However, in this case, increasing the heap size did not solve the problem. The error that occurred was not the typical OutOfMemoryError. The total heap size was big enough but the PermGen region was too small. This was indicated by the error's message:
java.lang.OutOfMemoryError: PermGen space

To solve this error, I had to increase this region's size with this VM argument (the default size is 64m):
-XX:MaxPermSize=128m

2008-06-25

Resizing sparse bundle image for time machine

I use Mac OS X Leopard's time machine to backup my notebook data to a network drive. I configured it according to this tutorial. Everything works fine. Initially, I set the maximum size of the spare bundle image to 15GB. Now I wanted to increase this to 20GB. After some searching, I found the solution:

hdiutil resize -size 20g

2008-04-13

Configurable Sequence Highlighting








Sometimes when editing DNA sequences, you wish to highlight specific sequence parts, e.g., all stop codons.
For this, I made an update of the TextMate bundle I wrote for sequence analysis. The new version supports custom highlighting of sequences and can be downloaded from the same location as the old version. There is a new command ("Sequence Analysis" -> "Highlighted Sequences...") for configuring the custom highlighting. It opens a dialog in which you can enter sequence patterns, give each sequence pattern a name and a color, and enable and disable sequence patterns. A sequence pattern can be a single sequence string or a list of multiple sequences separated by dashes ("|"). Unfortunately, you must restart TextMate for the changes to take effect.

2008-04-09

Finder integration for restoring .svn folders






I created an Automator workflow for the shell script "svnRecover" I wrote about in an earlier post. This allows to restore the .svn folders in a Keynote/Pages or similar document that is under Subversion control. For this, you simply select More->Automator->SVN_Recover from the document's context menu (see screenshot). You can download the automator workflow here. To install it, unzip it and copy the workflow document into the folder ~/Library/Workflows/Applications/Finder in your home directory. (You do not need to install the shell script separately; it is included in the Automator workflow.)

Update 2008-09-16: I fixed a bug that could lead to the deletion of all contents of folders with extended privileges.

2008-04-07

DNA Sequence Analysis with TextMate















I have built my first bundle for TextMate, the famous text editor for Mac OS X. The bundle allows simple DNA sequence analysis tasks, like setting the reading frame, sequence comparison, expressing codons, and determining masses of the expressed amino acids. For sequence comparison, I integrated two tools from EMBOSS: needle and water. These are also accessible via a web interface of the European Bioinformatics Institute.



You can download the bundle here. Just unzip the file and double click it or drag it on the TextMate application. When you edit a sequence file you should select "Fasta" as language at the bottom of TextMate. Then, you can access the sequence analysis commands by pressing Ctrl+Escape.



Have fun!




2008-02-19

Remove .svn folders

This is just another svn hack. On the Mac, when copying a Keynote/Pages/Numbers or similar document that is under subversion control, you also copy all its .svn directories. A similar problem to the one I described in this post. Again, a litte shell script can help here. svnCleanAllSvnFolders simply removes all .svn folders inside the current directory—if you call it with "yes" as a parameter; otherwise it just prints out what it would remove.

2007-07-16

Restore .svn in Keynote/Pages documents

Subversion stores its metadata in a directory called ".svn" that lies in every directory under version control. Keynote, Pages, and some other applications on Mac OS X store their documents in directories that look like files in the Finder. However, for Subversion they are normal directories and as such contain a ".svn" when under Subversion control.

Unfortunately, Keynote/Pages delete the ".svn" metadata-directories when a document is saved. This breaks Subversion: on the next commit or update you get the error "containing working copy admin area is missing". This bug is known since years but has not been fixed.

As a workaround, I've written a shellscript that restores the deleted ".svn" files. You can download it here.


Update 2008-09-16: I fixed a bug that could lead to the deletion of all contents of folders with extended privileges.

Update 2008-04-09: I created an Automator workflow so that the .svn folder recovery can be started from a document's context menu in Finder.

Update 2008-04-09: I improved error handling when the document is not under version control or has been an ordinary file before.

Update 2008-02-19: I incorporated the improvements from the comments. Thank you!