Tutorial: Getting Cegma/Genewise To Work On Centos, Rhel
gravatar for Adrian Pelin
5.4 years ago by
Adrian Pelin2.2k
Adrian Pelin2.2k wrote:
# This is based on a Ubuntu guide:


# get these


# Genewise install

# need this to avoid glib-config error in genewise install

    sudo yum install glib
    sudo yum install glib-devel

    cd wise2.4.1/src

# modify makefile to use "CC = cc" into "CC = gcc"

    cd wise2.4.1/src/HMMer2/
    sed 's/getline/getline_new/' sqio.c  > a &&  mv a sqio.c

# that takes care of a get line error

    cd ../models/

# Change phasemodel.c

    if( !isnumber(line[0]) ) {


    if( !isdigit(line[0]) ) {

# That takes care of a isnumber error

# Genewise install is the most problematic one, the rest install flawlessly.

# I thought I would start from the Ubuntu guide and change what is needed for CentOS.Turns out the glib part is slightly different, the rest is the same.
tutorial • 5.1k views
ADD COMMENTlink modified 4.5 years ago by Darked894.2k • written 5.4 years ago by Adrian Pelin2.2k

This is a god-send :) Thank you!

ADD REPLYlink modified 4.8 years ago • written 4.8 years ago by Hranjeev1.5k
gravatar for Darked89
4.5 years ago by
Barcelona, Spain
Darked894.2k wrote:

re getting wise2.4.1:

  1. it exist as Debian package: https://packages.debian.org/unstable/science/wise
    1. sudo apt-get install wise
  2. if you are not on Debian/Ubuntu, you will be better of getting wise_2.4.1-17.debian.tar.xz from the above Debian wise package page, unpacking it and applying to wise-2.4.1 from wise_2.4.1.orig.tar.gz by running:
for file in debian/patches/[01]*.patch; do patch -p0 < $file; done


No idea why, but 10_fix_path_to_data_files.patch has different directory naming. Quick and dirty way of fixing it is to softlink wise-2.4.1 to b: 

ln -s wise-2.4.1 b

Then everything compiled with gcc_4.8.1 without problems.   




ADD COMMENTlink written 4.5 years ago by Darked894.2k
gravatar for Buttonwood
5.1 years ago by
Buttonwood40 wrote:

Does anyone know how to install genewise on a redhat OS server?

ADD COMMENTlink written 5.1 years ago by Buttonwood40

above you is the exact tutorial on how to do it.

ADD REPLYlink written 5.1 years ago by Adrian Pelin2.2k

Thanks you very much。

But I still need your help。

*I followed your steps *

but get these:

make CC="gcc" CFLAGS="-c -O3 glib-config --cflags" libwisebase.a )
/bin/sh: glib-config: command not found

if test -x /bin/ranlib; then /bin/ranlib libdyna.a; else exit 0; fi
if test -x /usr/bin/ranlib; then /usr/bin/ranlib libdyna.a; else exit 0; fi
make[1]: Leaving directory /data/tanhao/dev/gene_prediction/GeneWise/wise-2.4.1/src/dynlibsrc' (cd dynlibsrc ; make CC="gcc" CFLAGS="-c -O3glib-config --cflags" libdyna_glib.a ) /bin/sh: glib-config: command not found make[1]: Entering directory/data/tanhao/dev/gene_prediction/GeneWise/wise-2.4.1/src/dynlibsrc'

I have done “sudo yum install glib*)

**Then I searched “/bin/sh: glib-config: command not found” and followed the seqanswer's tips: http://seqanswers.com/forums/showthread.php?t=24027**

to edit the makefile and change
CFLAGS = -c -O3 glib-config --cflags
CFLAGS = -c -O3 pkg-config --libs glib-2.0 --cflags

But I still get errors like:

(cd network ; make CC="gcc" CFLAGS="-c -O3 pkg-config --libs glib-2.0 --cflags" all )
make[1]: Entering directory /data/tanhao/dev/gene_prediction/GeneWise/wise-2.4.1/src/network' gcc -c -O3 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -lglib-2.0 -I../base/ -I../socket -I../dynlibsrc -I../dnaindex wise_proteinindex_server.c gcc -c -O3 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -lglib-2.0 -I../base/ -I../socket -I../dynlibsrc -I../dnaindex net_hspscan.c gcc -g -o scanwise_server wise_proteinindex_server.o net_hspscan.o ../dnaindex/compressed_protein_index.o ../dnaindex/kmer_index_interface.o ../dnaindex/singleseqspace.o ../dnaindex/kmer_direct.o -ldyna_glib -ldyna -lwisesocket -lwisebase -g -L../base/ -L../socket -L../dynlibsrc -L../dnaindex -lmglib-config --libs-lpthread /bin/sh: glib-config: command not found ../dynlibsrc/libdyna_glib.a(subseqhash.o): In functionWise2_is_populated_subseqhash_ghash':
subseqhash.c:(.text+0x18): undefined reference to g_hash_table_lookup' ../dynlibsrc/libdyna_glib.a(subseqhash.o): In functionWise2_add_direct_number_subseqhash_ghash':
subseqhash.c:(.text+0x7a): undefined reference to g_hash_table_lookup' subseqhash.c:(.text+0xc2): undefined reference tog_hash_table_insert'
../dynlibsrc/libdyna_glib.a(subseqhash.o): In function Wise2_add_seq_subseqhash_ghash': subseqhash.c:(.text+0x138): undefined reference tog_hash_table_lookup'
subseqhash.c:(.text+0x17a): undefined reference to g_hash_table_insert' ../dynlibsrc/libdyna_glib.a(subseqhash.o): In functionWise2_lookup_subseqhash_ghash':
subseqhash.c:(.text+0x1b8): undefined reference to `g_hash_table_lookup'

It seems the glib-config problem is still there!

Do you have any suggestion for me?And thank you again!

ADD REPLYlink modified 5.1 years ago • written 5.1 years ago by Buttonwood40

have you also done "sudo yum install glib-devel"?

ADD REPLYlink written 5.1 years ago by Adrian Pelin2.2k

Yes, I also done "sudo yum install glib-devel" but there is no such package;

so I did "find ./ -name make |xargs sed -i 's/glib-config/pkg-config --libs glib-2.0/' "

and it seems work.

Thank you.


##Darked89: ake changed to make

ADD REPLYlink modified 4.5 years ago by Darked894.2k • written 5.1 years ago by Buttonwood40
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1135 users visited in the last hour