前言
在后臺(tái)小伙伴的催促下纯衍,小Q終于把拖欠了N久的第3篇SV分析--軟件安裝篇寫完了城榛。廢話不多說(shuō)。
內(nèi)容目錄
預(yù)安裝依賴軟件
1.安裝Miniconda
軟件說(shuō)明
官網(wǎng):https://docs.conda.io/en/latest/miniconda.html
安裝說(shuō)明:https://conda.io/projects/conda/en/latest/user-guide/install/linux.html#install-linux-silent
安裝步驟
1)下載安裝包。
2)運(yùn)行。注意你所在的服務(wù)器IP必須是聯(lián)網(wǎng)的.
# 默認(rèn)選項(xiàng)
bash Miniconda3-latest-Linux-x86_64.sh
# 如果為了方便份乒,安裝完conda后可以用以下命令,這樣以后每次進(jìn)入linux終端時(shí)會(huì)自動(dòng)進(jìn)入conda 虛擬環(huán)境
conda init fish
# 搜索所需軟件
conda search bedtools
# 安裝所需軟件
# 軟件名可以后面跟version,也可選擇不加version
conda install bedtools=1.2
2.安裝Snakemake
- 保證服務(wù)器上已經(jīng)安裝python
2)利用pip安裝到用戶自己的目錄下或辖。注意你所在的服務(wù)器IP必須是聯(lián)網(wǎng)的.
# target: 指定安裝目錄
/pathon_install_path/python3.6/bin/pip install --target /your_path/Software/snakemake snakemake
# 安裝完后需要將安裝路徑加入到PYTHONPATH
# 注意export時(shí)必須是 export VAR=***:$VAR 的形式瘾英,否則會(huì)將之前的VAR變量值清除
export PYTHONPATH=/pathon_install_path/python3.6/lib/python3.6/site-packages:/your_path/snakemake:$PYTHONPATH
export PATH=/your_path/Software/snakemake/bin:$PATH
3.安裝Bedtools
安裝說(shuō)明:https://bedtools.readthedocs.io/en/latest/content/installation.html
安裝Smatie-sv
1.軟件下載地址
https://github.com/zeeev/smartie-sv
2.安裝前的注意事項(xiàng)
1) src目錄下的 blasr和htslib 目錄 均是鏈接,鏈接到github中的軟件目錄颂暇。所以如果采用download clone的方式缺谴,會(huì)發(fā)現(xiàn)src目錄下的blasr和htslib 目錄是空的,這樣會(huì)導(dǎo)致在make時(shí)出錯(cuò)耳鸯。
2)因此小Q建議使用Clone the repo的方式下載smartie-sv瓣赂。
注意你所在的服務(wù)器IP必須是聯(lián)網(wǎng)的.
git clone --recursive https://github.com/zeeev/smartie-sv.git
# 下載成功后如下:
Cloning into 'smartie-sv'...
remote: Enumerating objects: 180, done.
remote: Total 180 (delta 0), reused 0 (delta 0), pack-reused 180
Receiving objects: 100% (180/180), 1.57 MiB | 206.00 KiB/s, done.
Resolving deltas: 100% (92/92), done.
Checking out files: 100% (16/16), done.
Submodule 'src/blasr' (https://github.com/mchaisso/blasr.git) registered for path 'src/blasr'
Submodule 'src/htslib' (https://github.com/samtools/htslib.git) registered for path 'src/htslib'
Cloning into 'src/blasr'...
remote: Enumerating objects: 24, done.
remote: Counting objects: 100% (24/24), done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 1739 (delta 6), reused 10 (delta 4), pack-reused 1715
Receiving objects: 100% (1739/1739), 1.92 MiB | 288.00 KiB/s, done.
Resolving deltas: 100% (981/981), done.
Submodule path 'src/blasr': checked out '7cc3379a99824f4c3a9a4122f04deadaee50e2f5'
Cloning into 'src/htslib'...
remote: Enumerating objects: 23, done.
remote: Counting objects: 100% (23/23), done.
remote: Compressing objects: 100% (19/19), done.
remote: Total 11655 (delta 6), reused 11 (delta 4), pack-reused 11632
Receiving objects: 100% (11655/11655), 8.57 MiB | 847.00 KiB/s, done.
Resolving deltas: 100% (8241/8241), done.
Submodule path 'src/htslib': checked out '36c5c47e83078014ec62c844e0de5dae95e4a0d6'
3.如果已經(jīng)安裝了blasr和htslib,則跳過(guò)這一步片拍,進(jìn)入第4步
1)安裝blasr
安裝網(wǎng)址:
https://github.com/mchaisso/blasr/tree/7cc3379a99824f4c3a9a4122f04deadaee50e2f5
注意
在bin中將blasr程序鏈接到該目錄下
2)安裝htslib
注意你需要先安裝以下library
libz (required)
libbz2 (required, unless configured with --disable-bz2)
liblzma (required, unless configured with --disable-lzma)
libcurl (optional, but strongly recommended)
libcrypto (optional for Amazon S3 support; not needed on MacOS)
安裝網(wǎng)址:
https://github.com/samtools/htslib/tree/36c5c47e83078014ec62c844e0de5dae95e4a0d6
./configure # Optional, needed for choosing optional functionality
make
make install
3)刪除src中的blasr和htslib煌集,然后安裝目錄鏈接到src里,鏈接名為blasr和htslib
4.安裝print_gaps
首先請(qǐng)確保你安裝了blasr和htslib捌省,并知道安裝目錄苫纤。
# export所需library
export LD_LIBRARY_PATH=/your_path/zlib-1.2.7:/your_path/bzip2-1.0.6:/your_path/lzmalib-0.0.1:/your_path/curl-7.28.1/lib:/your_path/openssl-1.0.1:$LD_LIBRARY_PATH
# 修改src/print_gaps文件夾下的Makefile中的信息,添加-l纲缓,把htslib需要的包都指定好
# 舊的命令是:
g++ main.cpp split.cpp ../htslib/libhts.a -I ../htslib/ -I ../htslib/htslib -lz -lpthread -o ../../bin/printgaps
# 新的命令是:
g++ main.cpp split.cpp ../htslib/libhts.a -I ../htslib/ -I ../htslib/htslib -llzma -lbz2 -lz -lm -lcurl -lcrypto -lpthread -o ../../bin/printgaps
# run完在bin中就會(huì)出現(xiàn)printgaps
5.設(shè)置環(huán)境變量
注意
在使用smartie-sv之前一定要設(shè)置好環(huán)境變量
export HDF5INCLUDEDIR=/your_path/hdf5/include
export HDF5LIBDIR=/your_path/hdf5/lib
export LD_LIBRARY_PATH=/your_path/hdf5/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/your_path/zlib-1.2.7:/your_path/bzip2-1.0.6:/software/biosoft/software/lzmalib-0.0.1:/your_path/curl-7.28.1/lib:/your_path/openssl-1.0.1:$LD_LIBRARY_PATH
export PATH=/your_path/snakemake/bin:$PATH
export PYTHONPATH=/your_path/python3.6/lib/python3.6/site-packages:/your_path/Software/snakemake
撰文 & 編輯:VickieQ
校對(duì):花毛 & HCLO4