最開始準(zhǔn)備克隆代碼,老是出錯
git clone --recurse-submodules https://github.com/samtools/htslib.gitCloning into 'htslib'...
remote: Enumerating objects: 16587, done.
remote: Counting objects: 100% (864/864), done.
remote: Compressing objects: 100% (378/378), done.
remote: Total 16587 (delta 532), reused 616 (delta 460), pack-reused 15723
Receiving objects: 100% (16587/16587), 12.49 MiB | 151.00 KiB/s, done.
Resolving deltas: 100% (11944/11944), done.
Submodule 'htscodecs' (https://github.com/samtools/htscodecs.git) registered for path 'htscodecs'
Cloning into 'htscodecs'...
remote: Enumerating objects: 2170, done.
remote: Counting objects: 100% (545/545), done.
remote: Compressing objects: 100% (100/100), done.
error: RPC failed; result=18, HTTP code = 200B | 92.00 KiB/s
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
Clone of 'https://github.com/samtools/htscodecs.git' into submodule path 'htscodecs' failed
之后查看教程
wget https://github.com/samtools/htslib/releases/download/1.19/htslib-1.19.tar.bz2
tar -jxvf htslib-1.19.tar.bz2
cd htslib-1.19
./configure? --prefix=/where/to/install ?#配置生成Makefile
make?
make install
對于sh或bash用戶:export PATH=/安裝路徑/bin:$PATH
對于csh用戶:setenv PATH /安裝路徑/bin:$PATH
htsfile --version
結(jié)果:
htsfile (htslib) 1.19
成功!
構(gòu)建和安裝
從源碼構(gòu)建每個需要的軟件包非常簡單:
cd samtools-1.x? ? # 同樣的,對于bcftools和htslib也一樣
./configure --prefix=/安裝路徑
make
make install
可執(zhí)行程序?qū)惭b到指定前綴下的bin子目錄中,因此你可能希望將該目錄添加到你的$PATH環(huán)境變量中:
export PATH=/安裝路徑/bin:PATH? ? # 對于sh或bash用戶
setenv PATH /安裝路徑/bin:PATH? ? # 對于csh用戶
要構(gòu)建和安裝這些軟件包唁毒,你可以按照以下步驟操作:
使用cd命令進(jìn)入每個軟件包的目錄(samtools溪厘、bcftools和htslib)条获。例如饰剥,cd samtools-1.x殊霞。
使用configure腳本以--prefix選項運(yùn)行,指定要安裝軟件包的位置汰蓉。將/安裝路徑替換為所需的安裝目錄绷蹲。例如,./configure --prefix=/安裝路徑顾孽。
使用make命令構(gòu)建軟件包祝钢。
使用make install命令安裝軟件包。
可選地若厚,將安裝路徑的bin目錄添加到你的$PATH環(huán)境變量中拦英。這將允許你在任何地方運(yùn)行可執(zhí)行文件。
對于sh或bash用戶:export PATH=/安裝路徑/bin:$PATH
對于csh用戶:setenv PATH /安裝路徑/bin:$PATH