探序基因肿瘤研究院 整理
安装bwa:
github地址:https://github.com/lh3/bwa
或者Burrows-Wheeler Aligner
下载页面:https://sourceforge.net/projects/bio-bwa/files/
作者通过下载的方式,下载了bwa-0.7.17
make
发现报错:
/usr/bin/ld: ./libbwa.a(rope.o):/home/dell/software/bwa-0.7.17/rle.h:33: multiple definition of `rle_auxtab'; ./libbwa.a(bwtindex.o):/home/dell/software/bwa-0.7.17/rle.h:33: first defined here
/usr/bin/ld: ./libbwa.a(rle.o):/home/dell/software/bwa-0.7.17/rle.h:33: multiple definition of `rle_auxtab'; ./libbwa.a(bwtindex.o):/home/dell/software/bwa-0.7.17/rle.h:33: first defined here
解决方法:
参考:gcc10环境下bwa安装报错的解决方案_bwa报错make: *** [makefile:30: bwa] error 1-CSDN博客
编辑rle.h文件,将第33行的:const uint8_t rle_auxtab[8];改为
最后make就可以了
cp bwa /usr/local/bin
安装samtools:
方法一:git上的代码安装
samtools下载地址:https://github.com/samtools/samtools
还包括有:htslib,bcftools
安装htslib,要安装好他依赖的库,还要yum install automake
运行:autoreconf -i,./configure,
出现错误:
checking whether htscodecs files are present... no
configure: error: htscodecs submodule files not present.
安装samtools:
autoreconf
提示:
configure.ac:64: warning: AC_CONFIG_SUBDIRS: you should use literals
../../lib/autoconf/status.m4:1097: AC_CONFIG_SUBDIRS is expanded from...
m4/ax_with_htslib.m4:55: AX_WITH_HTSLIB is expanded from...
configure.ac:64: the top level
configure.ac:64: warning: AC_CONFIG_SUBDIRS: you should use literals
../../lib/autoconf/status.m4:1097: AC_CONFIG_SUBDIRS is expanded from...
m4/ax_with_htslib.m4:55: AX_WITH_HTSLIB is expanded from...
configure.ac:64: the top level
configure.ac:64: warning: AC_CONFIG_SUBDIRS: you should use literals
../../lib/autoconf/status.m4:1097: AC_CONFIG_SUBDIRS is expanded from...
m4/ax_with_htslib.m4:55: AX_WITH_HTSLIB is expanded from...
configure.ac:64: the top level
configure.ac:64: warning: AC_CONFIG_SUBDIRS: you should use literals
../../lib/autoconf/status.m4:1097: AC_CONFIG_SUBDIRS is expanded from...
m4/ax_with_htslib.m4:55: AX_WITH_HTSLIB is expanded from...
configure.ac:64: the top level
生成了configure
再./configure
checking for zlib.h... yes
checking for inflate in -lz... yes
checking for library containing regcomp... none required
configure: creating ./config.status
config.status: creating config.mk
config.status: creating config.h
config.status: config.h is unchanged
但是make失败
yum install autoconf automake make gcc perl-Data-Dumper zlib-devel bzip2 bzip2-devel xz-devel curl-devel openssl-devel ncurses
-devel libdeflate-devel
输入:autoheader
configure.ac:64: warning: AC_CONFIG_SUBDIRS: you should use literals
../../lib/autoconf/status.m4:1097: AC_CONFIG_SUBDIRS is expanded from...
m4/ax_with_htslib.m4:55: AX_WITH_HTSLIB is expanded from...
configure.ac:64: the top level
没安装成功,还是换另一种方法
方法二:源代码包去http://www.htslib.org/download/ 下载,然后编译
./configure,make,make install
安装htslib,samtools,bcftools都行了
下载人hg19参考基因组:UCSC版本的
ftp://hgdownload.soe.ucsc.edu/goldenPath/hg19/bigZips/latest/
选择hg19.fa.gz
ftp开头的地址好像用迅雷下不了,改为https的,https://hgdownload.soe.ucsc.edu/goldenPath/hg19/bigZips/latest/hg19.fa.gz,下载速度挺快