【6.1.2.4】sambamba
官网: https://github.com/biod/sambamba
更多使用案例,参见: https://blog.sciencenet.cn/home.php?mod=space&uid=1094241&do=blog&id=1041577
一、安装
1.1 方法1
下载地址: https://github.com/biod/sambamba/releases
cd /data/software
gunzip sambamba-0.8.2-linux-amd64-static.gz
mkdir bin
mv sambamba-0.8.2-linux-amd64-static sambamba
chmod a+x sambamba
sudo vi /etc/profile
export PATH=/data/software/bin:$PATH
1.2 方法2 (未成功)
先提前安装LDC
需要提前安装LDC (The LDC compiler’s github repository provides binary images. The current preferred release for sambamba is LDC - the LLVM D compiler (>= 1.6.1))
最新版本: https://github.com/ldc-developers/ldc/releases/
cd /data/software
wget -c https://github.com/ldc-developers/ldc/releases/download/v1.29.0/ldc2-1.29.0-linux-x86_64.tar.xz
tar xvJf ldc2-1.29.0-linux-x86_64.tar.xz
export PATH=/data/software/ldc2-1.29.0-linux-x86_64/bin:$PATH
export LIBRARY_PATH=/data/software/ldc2-1.29.0-linux-x86_64/lib:$LIBRARY_PATH
另一个版本:
wget -c https://github.com/ldc-developers/ldc/releases/download/v1.7.0/ldc2-1.7.0-linux-x86_64.tar.xz
tar xvJf ldc2-1.7.0-linux-x86_64.tar.xz
export PATH=/data/software/ldc2-1.7.0-linux-x86_64/bin:$PATH
export LIBRARY_PATH=/data/software/ldc2-1.7.0-linux-x86_64/lib:$LIBRARY_PATH
第三个版本
wget -c https://github.com/ldc-developers/ldc/releases/download/v1.15.0/ldc2-1.15.0-linux-x86_64.tar.xz
tar xvJf ldc2-1.15.0-linux-x86_64.tar.xz
export PATH=/data/software/ldc2-1.15.0-linux-x86_64/bin:$PATH
export LIBRARY_PATH=/data/software/ldc2-1.15.0-linux-x86_64/lib:$LIBRARY_PATH
三个版本始终报错报错:
ldc2: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by ldc2)
ldc2: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by ldc2)
需要安装新版的glibc, https://ftp.gnu.org/gnu/glibc/ 。 但没有成功
再安装sambamba
git clone --recursive https://github.com/biod/sambamba.git
cd /data/software/sambamba-master
cd sambamba
make
二、用法
(base) [sam@c01 1.no_trim]$ sambamba --help
sambamba 0.8.2
by Artem Tarasov and Pjotr Prins (C) 2012-2021
LDC 1.27.1 / DMD v2.097.2 / LLVM11.0.0 / bootstrap LDC - the LLVM D compiler (1.27.1)
Usage: sambamba [command] [args...]
Available commands:
view view contents and convert from one format
to another (SAM/BAM/JSON/UNPACK)
index build index (BAI)
merge merge files (BAM)
sort sort file (BAM)
slice slice file (BAM using BED)
markdup mark or remove duplicates (BAM)
subsample subsample (BAM)
flagstat output statistics (BAM)
depth output statistics (BAM)
validate simple validator (BAM)
No longer recommended:
mpileup parallel execution of samtools (BAM)
To get help on a particular command, call it without args.
Global options
-q quiet mode (do not show banner)
For bug reports and feature requests see
https://github.com/biod/
三、我的案例
sam转bam
sambamba view -S -t 100 -f=bam 198p.sam -o 198pr.bam
排序bam
sambamba sort 198pr.bam -o 198pr.sorted.bam -t 150
bam建Index
sambamba index 198pr.sorted.bam -t 150
这里是一个广告位,,感兴趣的都可以发邮件聊聊:tiehan@sina.cn
个人公众号,比较懒,很少更新,可以在上面提问题,如果回复不及时,可发邮件给我: tiehan@sina.cn
个人公众号,比较懒,很少更新,可以在上面提问题,如果回复不及时,可发邮件给我: tiehan@sina.cn