EMBOSS and primer3

I finally figured it out. Since primer3 version 2.2.3, its EMBOSS wrapper eprimer32 somehow did not work. I was wondering what the problem was and did not submit any updates of my primer3.SlackBuild for the sake of compatibility with EMBOSS. However, these days I was preparing updates for EMBOSS.SlackBuild and EMBASSY.SlackBuild to version 6.5.7 when something about the documentation of primer3 in EMBOSS-6.5.7/README caught my attention. It read:

EMBOSS application eprimer32 launches primer32_core and expects this to be a renamed primer3_core from version 2.x of the program. primer3’s configuration files also need to be installed. The original application looks by default in /opt/primer3_config.

I had skipped installing the /opt/primer3_config directory before, since packages for some other distributions did not include it. A mistake… In Slackware, such architecture-independent data should better go to /usr/share/ and after examining the primer3 source RPM for Fedora, it seems that two files need to be changed before compiling: thal_main.c and primer3_boulder_main.c in primer3-2.3.4/src. The fix goes something like this in the SlackBuild:

# Look for configuration files in /usr/share instead of /opt
sed -i "s:/opt/primer3_config:/usr/share/$PRGNAM/primer3_config:g" thal_main.c primer3_boulder_main.c

Further reading the documentation of primer3 in /primer3-2.3.4/src/release_notes.txt revealed the following for release 2.3.0 2012-02-03:

1.4 To make old defaults easily accessible, we added a command line argument, --default_version=1, which directs primer3_core to use the old defaults. --default_version=2 directs primer3_core to use the new defaults.  The default is --default_version=2.

I had a working primer3.SlackBuild for version 2.3.4 and made a simple wrapper: /usr/bin/eprimer32_core to start primer3_core as follows:

primer3_core --default_version=1

Now eprimer32 worked! So, which one solved the problem? Did eprimer32 want to launch primer32_core with the old settings or it required the primer3_config directory? Actually — it seems either one alone makes eprimer32 work. Therefore I will include the primer3_config directory with the next primer3.SlackBuild update and just make a symlink between primer32_core and primer3_core :)

heh… the SlackBuilds.org submissions page is closed at the moment, so these will probably go for the new, nice and shiny Slackware 14 :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s