加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

安装Bio :: DB :: Sam perl模块

发布时间:2020-12-15 22:05:52 所属栏目:大数据 来源:网络整理
导读:我正在尝试在远程服务器上的主目录上安装perl模块 Bio::DB::Sam . 我下载了模块,解压缩了文件,然后运行: perl Build.pl prefix=~/local 接下来会发生什么: This module requires samtools 0.1.10 or higher (samtools.sourceforge.net).Please enter the l
我正在尝试在远程服务器上的主目录上安装perl模块 Bio::DB::Sam.

我下载了模块,解压缩了文件,然后运行:

perl Build.pl prefix=~/local

接下来会发生什么:

This module requires samtools 0.1.10 or higher (samtools.sourceforge.net).
Please enter the location of the bam.h and compiled libbam.a files: **/some_places/samtools-0.1.19**

Found /some_places/samtools-0.1.19/bam.h and /some_places/samtools-0.1.19/libbam.a.
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'Bio-SamTools' version '1.39'

接下来当我尝试运行时:

./Build

这就是我得到的:

Building Bio-SamTools
gcc -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -o blib/arch/auto/Bio/DB/Sam/Sam.so lib/Bio/DB/Sam.o c_bin/bam2bedgraph.o -L/some_places/samtools-0.1.19 -lbam -lpthread -lz
/usr/bin/ld: /some_places/samtools-0.1.19/libbam.a(bgzf.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/some_places/samtools-0.1.19/libbam.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
error building blib/arch/auto/Bio/DB/Sam/Sam.so from lib/Bio/DB/Sam.o c_bin/bam2bedgraph.o at ~/perl5/lib/perl5/ExtUtils/CBuilder/Base.pm line 323.

我确实谷歌可能的解决方案并尝试了一对,但他们没有工作,例如–enable-shared OR export CXXFLAGS =“$CXXFLAGS -fPIC”.

我已经在我的主目录上安装了Bioperl.

任何帮助,将不胜感激.

干杯

解决方法

这是一个脚本,它将获取SAMtools源并对其进行编译,然后获取并编译Perl绑定.
wget http://sourceforge.net/projects/samtools/files/samtools/0.1.18/samtools-0.1.18.tar.bz2
tar xjf samtools-0.1.18.tar.bz2 && cd samtools-0.1.18
make CFLAGS=-fPIC
export SAMTOOLS=`pwd`
cpanm Bio::DB::Sam

您可能看到的部分问题是SAMtools项目最近经历了一些主要的代码重组(这自然使得很难使用外部语言绑定).

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读