1. 安装
git clone https://github.com/samtools/samtools.git
git clone https://github.com/samtools/htslib.git
先下载子模块
$ cd htslib
$ git submodule update --init --recursive
$ make #编译库
开始编译主程序
$ cd ../samtools
$ autoheader # Build config.h.in (this may generate a warning about
# AC_CONFIG_SUBDIRS - please ignore it).
$ autoconf -Wno-syntax
新建文件夹: $ mkdir ~/bin/
$ ./configure prefix=/home/userName/
注意: 这里需要高版本gcc,centOS7.9自带的4.8版本太古老!安装方法见下文链接。
$ make
$ make install
C++ | 无root权限在centOS7.9上安装新版本gcc编译器
检查版本号
$ samtools --version
samtools 1.16.1-18-g410d910
Using htslib 1.16-10-g6366029
Copyright (C) 2022 Genome Research Ltd.
2. 功能
按照标签筛选序列,标签在文件中
$ samtools view -D BC:barcodes.txt -o /data_folder/data.barcodes.bam /data_folder/data.bam
Ref
- http://www.htslib.org/doc/samtools-sort.html
本文档详细介绍了如何在CentOS 7.9环境下安装samtools及其依赖htslib,并提供了解决旧版本gcc的问题方案。同时,给出了使用samtools进行序列筛选的具体命令示例。
1893

被折叠的 条评论
为什么被折叠?



