开发者
资源
安装wise2.4.1(genewise)的安装基础指导以及相关的报错处理
安装wise2.4.1(genewise)的安装基础指导以及相关的报错处理
发表于2023/09/07
7425

1、源码下载网址

wget http://www.ebi.ac.uk/~birney/wise2/wise2.4.1.tar.gz

2、解压源码安装包

tar -xvf wise2.4.1.tar.gz wise2.4.1/

3、安装

make all

出现错误1

sqio.c:232:1: error: conflicting types for ‘getline’
  232 | getline(struct ReadSeqVars *V)
      | ^~~~~~~
In file included from sqio.c:27:
/usr/include/stdio.h:639:18: note: previous declaration of ‘getline’ was here
  639 | extern __ssize_t getline (char **__restrict __lineptr,
      |                  ^~~~~~~
make[1]: *** [Makefile:69: sqio.o] Error 1
make[1]: Leaving directory '/path/to/wise2.4.1/src/HMMer2'
make: *** [makefile:88: realall] Error 2

原因:源码的函数类型需要更新

出现错误2:

/bin/sh: line 1: glib-config: command not

4、修改源码

替换make的源码

find ./ -name makefile | xargs sed -i 's/glib-config/pkg-config glib-2.0/'
perl -p -i -e 's/csh welcome.csh/sh welcome.csh/g' makefile

修改HMMer/sqio.c文件的函数

perl -p -i -e 's/getline/getline_ReadSeqVars/g' ./HMMer2/sqio.c

修改models/phasemodel.c函数

perl -p -i -e 's/isnumber/isdigit/g' ./models/phasemodel.c
 

5.编译

make all

安装完成如下所示:

Welcome to Wise2.4

The executable programs are in the ./bin directory

You must set your WISECONFIGDIR to the config directory
before using the programs

ie, type setenv WISECONFIGDIR /path/to/wise2.4.1/src/../wisecfg/

to try an example, try cd example and then
../bin/genewise road.pep human.genomic

to build perl, type make perl and follow the instructions

to test the package, type make test

6.测试

make test

出现错误:

cke_14255.png

修改方案如下:

在源码的src目录下面找到并修改dynlibsrc/sequence.c 和dnaindex/largeseqreader.c两个文件,在若干行末尾添加 || feof(ifp) )

修改前文件:

[root@node-1 src]# grep -rn пС == ЕОЕ"
dynlibsrc/sequence.dy:787: if( c == EOF ) {	
dynlibsrc/sequence.dy:852:	if( c == EOF || c == '>' |lc=='/'){	
dynlibsrc/sequence.dy:935:	if( c == EOF || feof(ifp) )	
dynlibsrc/sequence.dy:945: if( c == EOF)
dynlibsrc/sequence.c: 788:	if( c == EOF ) {
dynlibsrc/sequence.c:853:	if( c == EOF || c == '>' || c =='/'){
dynlibsrc/sequence .c:941:- if( c == EOF || feof(ifp) )
dynlibsrc/sequence.c:951:	if( c == EOF)
dnaindex/largeseqreader .c:38: if( c == EOF ) {
dnaindex/largeseq reader.dy:44:	if( c == EOF){
dyc/lex.yy.c:483:	if ( c == EOF && ferror( yyin ) ) \
[root@node-1 src]#

修改后文件:

[root@node-1 src]# grep -rn "c == EOF"	
dynlibsrc/sequence.dy: 787:	if( c == EOF ) {
dynlibsrc/sequence.dy:852:	if( c == EOF || c == '>' Ilc=='/'){	
dynlibsrc/sequence. dy 935: if( c == EOF || feof(ifp) )	
dynlibsrc/sequence.dy:945:	if( c == EOF)	
dynlibsrc/sequence.c: 788: if( c == EOF || feof(ifp) ) {	
dynlibsrc/sequence.c:853: if( c == EOF İİ feof(ifp)|| c == '>' || c=='/'){
dynlibsrc/sequence.c:941:	if( c == EOF ||	feof(ifp)	
dynlibsrc/sequence.c:951: if( c == EOF || feof(ifp) )	
dnaindex/largeseqreader .C:38: if( c == EOF || feof(ifp) ) {
dnaindex/largeseqreader.dy:44: if( c == EOF ) {
dyc/lex.yy.c:483:	if ( c == EOF && ferror( yyin ) ) \

 重新编译: 

make clean 
 make all

 重新测试: 
make test
 

测试结果正常Tests passed 则表示测试通过。 

收藏举报
Level 1
0
帖子
0
粉丝
0
获赞