参考链接:https://github.com/hall-lab/speedseq
1。配置环境
下载安装包。
git clone --recursive https://github.com/hall-lab/speedseq
cd speedseq
make
报了一堆的错误。猜想可能是由于一些依赖的包是缺乏的。
参考链接:https://github.com/hall-lab/speedseq/blob/master/example/example_speedseq_install.sh
尝试按照示例代码一点点敲入,但是出现了报错。
由于我的系统是ubuntu,所以我使用apt-get代替示例代码中的yum。
sudo apt-get install make automake cmake gcc gcc-c++ git ncurses-devel zlib-devel
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package gcc-c+
E: Couldn’t find any package by regex ‘gcc-c+’
E: Unable to locate package ncurses-devel
E: Unable to locate package zlib-devel
再去查找出现了什么问题,我发现是由于ubuntu系统的改变,因此导致包的名字改变。
参考链接:https://blog.csdn.net/wang__rongwei/article/details/54846759
于是,现在去查找新的包的名字,无异于大海捞针。我决定从make报错中查找,我缺了什么包。
make align
make[1]: Entering directory ‘/home/zxx/workplace/speedseq’
make -C src/bwa
make[2]: Entering directory ‘/home/zxx/workplace/speedseq/src/bwa’
make[2]: Nothing to be done for ‘all’.
make[2]: Leaving directory ‘/home/zxx/workplace/speedseq/src/bwa’
cp src/bwa/bwa bin
cp src/sambamba bin
make -C src/samblaster
make[2]: Entering directory ‘/home/zxx/workplace/speedseq/src/samblaster’
make[2]: Nothing to be done for ‘SAMBLASTER’.
make[2]: Leaving directory ‘/home/zxx/workplace/speedseq/src/samblaster’
cp src/samblaster/samblaster bin
cd src/parallel; ./configure --prefix=/home/zxx/workplace/speedseq
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking for a thread-safe mkdir -p… /bin/mkdir -p
checking for gawk… no
checking for mawk… mawk
checking whether make sets $(MAKE)… yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: config.h is unchanged
make -C src/parallel
make[2]: Entering directory ‘/home/zxx/workplace/speedseq/src/parallel’
make all-recursive
make[3]: Entering directory ‘/home/zxx/workplace/speedseq/src/parallel’
Making all in src
make[4]: Entering directory ‘/home/zxx/workplace/speedseq/src/parallel/src’
pod2man --release=‘20131022’ --center=‘parallel’
–section=1 ./parallel.pod > ./parallel.1
pod2man --release=‘20131022’ --center=‘parallel’
–section=1 ./sem.pod > ./sem.1
pod2man --release=‘20131022’ --center=‘parallel’
–section=1 ./sql > ./sql.1
pod2man --release=‘20131022’ --center=‘parallel’
–section=1 ./niceload.pod > ./niceload.1
pod2man --release=‘20131022’ --center=‘parallel’
–section=1 ./parallel_tutorial.pod > ./parallel_tutorial.1
pod2html ./parallel.pod > ./parallel.html
rm -f ./pod2htm*
pod2html ./parallel_tutorial.pod > ./parallel_tutorial.html
rm -f ./pod2htm*
pod2html ./sem.pod > ./sem.html
rm -f ./pod2htm*
pod2html ./sql > ./sql.html
rm -f ./pod2htm*
pod2html ./niceload.pod > ./niceload.html
rm -f ./pod2htm*
pod2texi --output=./parallel_tutorial.texi ./parallel_tutorial.pod || true
/bin/bash: pod2texi: command not found
pod2pdf --output-file ./parallel.pdf ./parallel.pod --title “GNU Parallel” || true
/bin/bash: pod2pdf: command not found
pod2pdf --output-file ./parallel_tutorial.pdf ./parallel_tutorial.pod --title “GNU Parallel Tutorial” || true
/bin/bash: pod2pdf: command not found
make[4]: Leaving directory ‘/home/zxx/workplace/speedseq/src/parallel/src’
make[4]: Entering directory ‘/home/zxx/workplace/speedseq/src/parallel’
make[4]: Leaving directory ‘/home/zxx/workplace/speedseq/src/parallel’
make[3]: Leaving directory ‘/home/zxx/workplace/speedseq/src/parallel’
make[2]: Leaving directory ‘/home/zxx/workplace/speedseq/src/parallel’
cp src/parallel/src/parallel bin
make[1]: Leaving directory ‘/home/zxx/workplace/speedseq’
make var
make[1]: Entering directory ‘/home/zxx/workplace/speedseq’
make -C src/freebayes
make[2]: Entering directory ‘/home/zxx/workplace/speedseq/src/freebayes’
wget -q http://hypervolu.me/freebayes/build/v0.9.21 &
cd src && make
make[3]: Entering directory ‘/home/zxx/workplace/speedseq/src/freebayes/src’
DETECTED_VERSION = v0.9.21
CURRENT_VERSION = v0.9.21
cd …/bamtools && mkdir -p build && cd build && cmake … && make
/bin/sh: 1: cmake: not found
Makefile:39: recipe for target ‘…/bamtools/lib/libbamtools.a’ failed
make[3]: *** […/bamtools/lib/libbamtools.a] Error 127
make[3]: Leaving directory ‘/home/zxx/workplace/speedseq/src/freebayes/src’
Makefile:2: recipe for target ‘all’ failed
make[2]: *** [all] Error 2
make[2]: Leaving directory ‘/home/zxx/workplace/speedseq/src/freebayes’
Makefile:116: recipe for target ‘freebayes’ failed
make[1]: *** [freebayes] Error 2
make[1]: Leaving directory ‘/home/zxx/workplace/speedseq’
Makefile:23: recipe for target ‘all’ failed
make: *** [all] Error 2
从这里也找不到线索,说缺啥。尝试失败。
那就接下来一个个的来安装先决环境。
sudo apt-get install libX11-devel libXpm-devel libXft-devel libXext-devel
E: Unable to locate package libX11-devel
E: Unable to locate package libXpm-devel
E: Unable to locate package libXft-devel
E: Unable to locate package libXext-devel
参考链接:https://blog.csdn.net/helaisun/article/details/79257697
之所以找不到包,是由于系统的版本不同,包的名字在更新的过程中也会产生变化。所以我现在的目标就是根据关键词去找,这些包在我的系统中所对应的名字是什么。然后安装。
主要的步骤如下:
首先,确定我的系统的版本。
sudo lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic
我的系统的版本是bionic。
我就在https://packages.ubuntu.com/网站中,根据关键词,搜查与我的系统相对应的包的名字。
得到结果。
原名 | 现名 |
---|---|
libX11-devel | libx11-dev |
libXpm-devel | libxpm-dev |
libXft-devel | libxft-dev |
libXext-devel | libxext-dev |
上述包全部安装成功。
同理,继续安装其他依赖的包。
sudo apt-get install make automake cmake gcc gcc-c++ git ncurses-devel zlib-devel
E: Unable to locate package gcc-c+
E: Couldn’t find any package by regex ‘gcc-c+’
E: Unable to locate package ncurses-devel
E: Unable to locate package zlib-devel
原名 | 现名 |
---|---|
gcc-c+ | 暂无 |
ncurses-devel | lib64ncurses5-dev |
zlib-devel | zlib1g-dev |
sudo apt-get install make automake cmake gcc git lib64ncurses5-dev zlib1g-dev
安装成功!
sudo apt-get install python27 python27-devel python27-pip lapack lapack-devel blas blas-devel
E: Unable to locate package python27
E: Unable to locate package python27-devel
E: Unable to locate package python27-pip
E: Unable to locate package lapack
E: Unable to locate package lapack-devel
E: Unable to locate package blas
E: Unable to locate package blas-devel
原名 | 现名 |
---|---|
python27 | 暂无 |
python27-devel | 暂无 |
python27-pip | 暂无 |
lapack | liblapack3 |
lapack-devel | liblapack-dev |
blas | 暂无 |
blas-devel | 暂无 |
修改为:
sudo apt-get install liblapack3 liblapack-dev
安装成功!
2。安装root
下面开始安装root。
curl -OL ftp://root.cern.ch/root/root_v5.34.20.source.tar.gz
Command ‘curl’ not found, but can be installed with:
sudo apt install curl
所以接下来,看一下,curl是什么?
该命令设计用于在没有用户交互的情况下工作。
curl 是一个工具,用于传输来自服务器或者到服务器的数据。
可支持的协议有(DICT、FILE、FTP、FTPS、GOPHER、HTTP、HTTPS、IMAP、IMAPS、LDAP、LDAPS、POP3、POP3S、RTMP、RTSP、SCP、SFTP、SMTP、SMTPS、TELNET和TFTP)。
curl提供了大量有用的技巧,比如代理支持、用户身份验证、FTP上传、HTTP post、SSL连接、cookie、文件断点续传、Metalink等等。
下载curl指令。
sudo apt install curl
下载完成之后,重新运行指令。(12:02)
curl -OL ftp://root.cern.ch/root/root_v5.34.20.source.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:–:-- 0:02:15 --:–:-- 0curl: (7) Failed to connect to root.cern.ch port 21: Connection timed out
再次报错,ftp地址打不开,现在决定手动下载。
我们回溯到网站https://github.com/hall-lab/speedseq
发现有显示ROOT的网址为https://root.cern.ch/
我们在网址中找到与我们ubuntu系统一致的文件。
我们在选择下载的安装包时,源文件或二进制文件的区别是什么?
参考链接:https://blog.csdn.net/tiao321/article/details/109492581
所以,本次我们选择源文件进行安装。
https://github.com/hall-lab/speedseq/blob/master/example/example_speedseq_install.sh
https://root.cern.ch/releases/release-62400/
使用git指令下载:
git clone https://github.com/root-project/root.git
的确下载成功了,但是再进行下一步编译的时候,又遇到问题。
./configure
显示ROOT是由cmake编译的。
于是就:cmake root
结果文件夹下出现了一堆的文件,并不是我们想要的结果。
于是,选择手动下载,安装,解压缩。
出错。
CMakeFiles/XROOTD.dir/build.make:111: recipe for target ‘XROOTD-prefix/src/XROOTD-stamp/XROOTD-build’ failed
make[2]: *** [XROOTD-prefix/src/XROOTD-stamp/XROOTD-build] Error 1
CMakeFiles/Makefile2:288: recipe for target ‘CMakeFiles/XROOTD.dir/all’ failed
make[1]: *** [CMakeFiles/XROOTD.dir/all] Error 2
Makefile:151: recipe for target ‘all’ failed
make: *** [all] Error 2
(没有安装好root的情况下)
这个时候继续跑speedup的安装,那么:
src/toolkit/CMakeFiles/bamtools_cmd.dir/build.make:254: recipe for target ‘src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_resolve.cpp.o’ failed
make[6]: *** [src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_resolve.cpp.o] Error 1
make[6]: Leaving directory ‘/home/zxx/workplace/speedseq/src/freebayes/bamtools/build’
CMakeFiles/Makefile2:520: recipe for target ‘src/toolkit/CMakeFiles/bamtools_cmd.dir/all’ failed
make[5]: *** [src/toolkit/CMakeFiles/bamtools_cmd.dir/all] Error 2
make[5]: Leaving directory ‘/home/zxx/workplace/speedseq/src/freebayes/bamtools/build’
Makefile:129: recipe for target ‘all’ failed
make[4]: *** [all] Error 2
make[4]: Leaving directory ‘/home/zxx/workplace/speedseq/src/freebayes/bamtools/build’
Makefile:39: recipe for target ‘…/bamtools/lib/libbamtools.a’ failed
make[3]: *** […/bamtools/lib/libbamtools.a] Error 2
make[3]: Leaving directory ‘/home/zxx/workplace/speedseq/src/freebayes/src’
Makefile:2: recipe for target ‘all’ failed
make[2]: *** [all] Error 2
make[2]: Leaving directory ‘/home/zxx/workplace/speedseq/src/freebayes’
Makefile:116: recipe for target ‘freebayes’ failed
make[1]: *** [freebayes] Error 2
make[1]: Leaving directory ‘/home/zxx/workplace/speedseq’
Makefile:23: recipe for target ‘all’ failed
make: *** [all] Error 2
我发现root有其他的安装方式。https://root.cern/install/
我有个想法,如果我不使用源文件,而是使用依赖于系统但不需要编译的二进制文件,是否可以更加方便一些?
好的,那我现在就去尝试。
重新开始。
下载事先编译(跳过前面非常复杂的编译过程)好的二进制的文件。
(1)安装好依赖的包。
sudo apt-get install dpkg-dev cmake g++ gcc binutils libx11-dev libxpm-dev \ libxft-dev libxext-dev python libssl-dev
(2)下载对应版本的二进制文件。
链接:https://root.cern/download/root_v6.24.00.Linux-ubuntu18-x86_64-gcc7.5.tar.gz
(3)解压
tar -xzvf root_v6.24.00.Linux-ubuntu18-x86_64-gcc7.5.tar.gz
到这里,算是安装完成了root。
(4)将解压后的root文件存放到/usr/local
cd ..
sudo mv root /usr/local
(5)设置环境变量
echo "source /usr/local/root/bin/thisroot.sh" >> ~/.bashrc
source ~/.bashrc
(6)移除安装包
rm root_v5.34.20.source.tar.gz
(7)最后,检验是否安装成功。
在任意路径下输入root
| Welcome to ROOT 6.24/00 https://root.cern |
| © 1995-2021, The ROOT Team; conception: R. Brun, F. Rademakers |
| Built for linuxx8664gcc on Apr 14 2021, 14:33:50 |
| From tags/v6-24-00@v6-24-00 |
| With |
| Try ‘.help’, ‘.demo’, ‘.license’, ‘.credits’, ‘.quit’/’.q’ |
root [0]
如图所示,安装成功。
3。python2.7包
首先,安装pip,然后根据pip下载pysam,numpy,scipy三个包。
参考链接:https://blog.csdn.net/liumaolincycle/article/details/50547275
- 下载setuptools
wget --no-check-certificate https://bootstrap.pypa.io/ez_setup.py
sudo python ez_setup.py --insecure
- 下载pip安装包,解压
参考链接:https://pypi.org/project/pip/#files
tar -zxvf pip-21.1.1.tar.gz
- 安装pip
cd pip-21.1.1/
sudo python setup.py install
- pip安装完成之后,使用pip安装包pysam,numpy,scipy
pip install pysam numpy scipy
Collecting numpy
Downloading numpy-1.20.2-cp39-cp39-manylinux2010_x86_64.whl (15.4 MB)
|████████████████████████████████| 15.4 MB 12.1 MB/s
Collecting pysam
Downloading pysam-0.16.0.1.tar.gz (3.6 MB)
|████████████████████████████████| 3.6 MB 11.0 MB/s
Collecting scipy
Downloading scipy-1.6.3-cp39-cp39-manylinux1_x86_64.whl (27.3 MB)
|████████████████████████████████| 27.3 MB 11.3 MB/s
Building wheels for collected packages: pysam
Building wheel for pysam (setup.py) … done
Created wheel for pysam: filename=pysam-0.16.0.1-cp39-cp39-linux_x86_64.whl size=2992268 sha256=aaa602cfe1592e65b556de3ae2b316b7047f873a85d4abadeba07dc0cb78aba4
Stored in directory: /home/zxx/.cache/pip/wheels/fb/96/5b/d62b12ccae437c41f0368bca424aa34b6d3f9fef4a38640edc
Successfully built pysam
Installing collected packages: numpy, scipy, pysam
Successfully installed numpy-1.20.2 pysam-0.16.0.1 scipy-1.6.3
安装完成。
4。加载Speedup
仍然是莫名原因出错。