Wednesday, November 14, 2012

Quick Note: genewise and glib

I've been trying to set up genewise for use with CEGMA, which turns out not to be the most straight-forward setup I've had to do. I'm compiling genewise 2.4.1 on Opensuse 12.2. There are some hints how to get this going on Ubuntu here, but installing glib1 is not an option for me. I can get it to compile and provide sane looking output for the (few) examples I tested as described below.

No guarantee that this works (properly, or at all):

I'm assuming the source has been downloaded and unpacked (and that the required packages for compiling source are present). Go to the src/ subdirectory of the inpacked wise2.4.1 source. To fix the problems described on the page linked above (conflicting types for ‘getline’ and undefined reference to `isnumber'):

sed -i.old 's/getline/getline_new/' HMMer2/sqio.c
sed -i.old 's/isnumber/isdigit/' models/phasemodel.c

To get genewise to compile using glib2 (the whole glib-config not found and glib.h: No such file or directory errors), do (two commands, one line each):

find ./ -type f -name "makefile" -exec sed -i.old 's/glib-config --libs/pkg-config --libs glib-2.0/g' "{}" +;
find ./ -type f -name "makefile" -exec sed -i.old 's/glib-config --cflags/pkg-config --cflags glib-2.0/g' "{}" +;
If you tried to compile before, run make clean first. After this run make all to compile. Running make test does not work for me, but manually running some tests does work. Don't forget to set the WISECONFIGDIR variable for your shell!
I don't have time to extensively test this now, so be warned.

5 comments:

Unknown said...

Hi there,
thanks for the guide. On Opensuse I always get the error message "dyc: command not foound". Do you know where can I download the dyc package for opensuse 12.2?
thanks for your help

JHMS said...

I don't know of any ready-to-install packages, as I usually build from source anyway. Dyc isn't compiled by default, but the instructions in INSTALL in the source code distribution work for me (cd to the src/dyc directory and 'make linux'). The binary will then need to be copied to a location on your PATH (or alternatively add the relevant folder to your path).

Anonymous said...

tested with CentOS 6.3 and wise2.2.3
It compiles.
Thank you so much,

Carlos

Anonymous said...

Thanks a lot for this post! I have been stuck with genewise installation for a long time now. I tried with genewise2.4.1 version and followed your instructions and it worked fine in RH6.2

Anonymous said...

Instead of changing all makefiles one can create a script file named glib-config with content
#!/bin/bash
exec pkg-config glib-2.0 "$@"

Don't forget to make the script executable and to put it into the PATH