ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

实验记录 | samtools的安装

2021-05-06 22:30:47  阅读:339  来源: 互联网

标签:samtools 1.12 configure 记录 make BAM 安装


由于canda直接安装samtools执行失败,本次选择手动编译安装最新版的samtools。

1。下载samtools安装包。

官网下载链接:https://github.com/samtools/samtools/releases/tag/1.12
点击蓝色字体链接,下载tar.bz2格式的文件,源文件并不是很全。
下载完成之后,将其保存在指定目录下,打开目录。
解压缩文件夹。
tar -jxvf samtools-1.12.tar.bz2
cd samtools-1.12/

执行configure这一步的时候报错。
./configure

configure: error: ./configure failed for htslib-1.12

缺少hislib-1.12这个文件,需要事先安装。

2。 安装hislib。

git clone https://github.com/samtools/htslib.git
autoheader
autoconf
./configure

执行到编译的那一步的时候,又是报错。

liblzma development files not found

于是,现在着手安装liblzma。

找到链接:https://www.cnblogs.com/liujiaxin2018/p/13691805.html
但是,在ubuntu系统上yim指令是没啥用的,没啥用。

现在尝试apt-get安装。
参考链接:https://www.liangzl.com/get-article-detail-188600.html

sudo apt-get install liblzma-dev
这一步运行成功,没有报错。
make
sudo make install

不知道现在算不算是把hislib安装完成。

3。编译samtools。

安装好上述的hislib文件之后,回到samtools的文件夹下,继续编译。
依次运行以下指令,没有报错。
./configure
make
sudo make install

make/make install 指令在linux中的区别是什么?感觉很像?

注释:

  • make:make 是 Linux 开发套件里面自动化编译的一个控制程序,他通过借助 Makefile 里面编写的编译规范进行自动化的调用 gcc 、ld 以及运行某些需要的程序进行编译的程序。
  • make install:进行安装的指令,需要root权限(即 sudo make install)。

参考链接:https://github.com/samtools/samtools/blob/develop/INSTALL

在任意路径下输入指令,查看是否出现samtools的指令。
samtools

屏幕显示如下:

Program: samtools (Tools for alignments in the SAM format)
Version: 1.12 (using htslib 1.12)

Usage: samtools [options]

Commands:
– Indexing
dict create a sequence dictionary file
faidx index/extract FASTA
fqidx index/extract FASTQ
index index alignment

– Editing
calmd recalculate MD/NM tags and ‘=’ bases
fixmate fix mate information
reheader replace BAM header
targetcut cut fosmid regions (for fosmid pool only)
addreplacerg adds or replaces RG tags
markdup mark duplicates
ampliconclip clip oligos from the end of reads

– File operations
collate shuffle and group alignments by name
cat concatenate BAMs
merge merge sorted alignments
mpileup multi-way pileup
sort sort alignment file
split splits a file by read group
quickcheck quickly check if SAM/BAM/CRAM file appears intact
fastq converts a BAM to a FASTQ
fasta converts a BAM to a FASTA

– Statistics
bedcov read depth per BED region
coverage alignment depth and percent coverage
depth compute the depth
flagstat simple stats
idxstats BAM index stats
phase phase heterozygotes
stats generate stats (former bamcheck)
ampliconstats generate amplicon specific stats

– Viewing
flags explain BAM flags
tview text alignment viewer
view SAM<->BAM<->CRAM conversion
depad convert padded BAM to unpadded BAM

– Misc
help [cmd] display this help message or help for [cmd]
version detailed version information

至此,安装成功。

标签:samtools,1.12,configure,记录,make,BAM,安装
来源: https://blog.csdn.net/weixin_40640700/article/details/116462615

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有