htslib和Samtool安装步骤
(一)htslib安装:参考【1】
1.下载:
git clone https://github.com/samtools/htslib.git
2.安装指令:
autoconf # Generate the configure script, if needed
./configure # Optional, needed for choosing optional functionality
make
make install
make install的时候我需要sudo
3.记录:
hadoop@Mcnode1:~/cloud/adam/xubo/code/htslib$ autoconf
hadoop@Mcnode1:~/cloud/adam/xubo/code/htslib$ ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for ranlib... ranlib
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for getpagesize... yes
checking for working mmap... yes
checking for gmtime_r... yes
checking for zlib.h... yes
checking for inflate in -lz... yes
configure: creating ./config.status
config.status: creating config.mk
config.status: creating config.h
hadoop@Mcnode1:~/cloud/adam/xubo/code/htslib$ make
gcc -g -O2 -I. -c -o kfunc.o kfunc.c
gcc -g -O2 -I. -c -o knetfile.o knetfile.c
gcc -g -O2 -I. -c -o kstring.o kstring.c
gcc -g -O2 -I. -c -o bgzf.o bgzf.c
gcc -g -O2 -I. -c -o faidx.o faidx.c
gcc -g -O2 -I. -c -o hfile.o hfile.c
gcc -g -O2 -I. -c -o hfile_net.o hfile_net.c
echo '#define HTS_VERSION "1.3-35-g26b3085"' > version.h
gcc -g -O2 -I. -c -o hts.o hts.c
gcc -g -O2 -I. -c -o md5.o md5.c
gcc -g -O2 -I. -c -o regidx.o regidx.c
gcc -g -O2 -I. -c -o sam.o sam.c
gcc -g -O2 -I. -c -o synced_bcf_reader.o synced_bcf_reader.c
gcc -g -O2 -I. -c -o vcf_sweep.o vcf_sweep.c
gcc -g -O2 -I. -c -o tbx.o tbx.c
gcc -g -O2 -I. -c -o vcf.o vcf.c
gcc -g -O2 -I. -c -o vcfutils.o vcfutils.c
gcc -g -O2 -I. -c -o cram/cram_codecs.o cram/cram_codecs.c
gcc -g -O2 -I. -c -o cram/cram_decode.o cram/cram_decode.c
gcc -g -O2 -I. -c -o cram/cram_encode.o cram/cram_encode.c
gcc -g -O2 -I. -c -o cram/cram_external.o cram/cram_external.c
gcc -g -O2 -I. -c -o cram/cram_index.o cram/cram_index.c
gcc -g -O2 -I. -c -o cram/cram_io.o cram/cram_io.c
gcc -g -O2 -I. -c -o cram/cram_samtools.o cram/cram_samtools.c
gcc -g -O2 -I. -c -o cram/cram_stats.o cram/cram_stats.c
gcc -g -O2 -I. -c -o cram/files.o cram/files.c
gcc -g -O2 -I. -c -o cram/mFILE.o cram/mFILE.c
gcc -g -O2 -I. -c -o cram/open_trace_file.o cram/open_trace_file.c
gcc -g -O2 -I. -c -o cram/pooled_alloc.o cram/pooled_alloc.c
gcc -g -O2 -I. -c -o cram/rANS_static.o cram/rANS_static.c
gcc -g -O2 -I. -c -o cram/sam_header.o cram/sam_header.c
gcc -g -O2 -I. -c -o cram/string_alloc.o cram/string_alloc.c
gcc -g -O2 -I. -c -o cram/thread_pool.o cram/thread_pool.c
gcc -g -O2 -I. -c -o cram/vlen.o cram/vlen.c
gcc -g -O2 -I. -c -o cram/zfio.o cram/zfio.c
ar -rc libhts.a kfunc.o knetfile.o kstring.o bgzf.o faidx.o hfile.o hfile_net.o hts.o md5.o regidx.o sam.o synced_bcf_reader.o vcf_sweep.o tbx.o vcf.o vcfutils.o cram/cram_codecs.o cram/cram_decode.o cram/cram_encode.o cram/cram_external.o cram/cram_index.o cram/cram_io.o cram/cram_samtools.o cram/cram_stats.o cram/files.o cram/mFILE.o cram/open_trace_file.o cram/pooled_alloc.o cram/rANS_static.o cram/sam_header.o cram/string_alloc.o cram/thread_pool.o cram/vlen.o cram/zfio.o
ranlib libhts.a
gcc -g -O2 -I. -fpic -c -o kfunc.pico kfunc.c
gcc -g -O2 -I. -fpic -c -o knetfile.pico knetfile.c
gcc -g -O2 -I. -fpic -c -o kstring.pico kstring.c
gcc -g -O2 -I. -fpic -c -o bgzf.pico bgzf.c
gcc -g -O2 -I. -fpic -c -o faidx.pico faidx.c
gcc -g -O2 -I. -fpic -c -o hfile.pico hfile.c
gcc -g -O2 -I. -fpic -c -o hfile_net.pico hfile_net.c
gcc -g -O2 -I. -fpic -c -o hts.pico hts.c
gcc -g -O2 -I. -fpic -c -o md5.pico md5.c
gcc -g -O2 -I. -fpic -c -o regidx.pico regidx.c
gcc -g -O2 -I. -fpic -c -o sam.pico sam.c
gcc -g -O2 -I. -fpic -c -o synced_bcf_reader.pico synced_bcf_reader.c
gcc -g -O2 -I. -fpic -c -o vcf_sweep.pico vcf_sweep.c
gcc -g -O2 -I. -fpic -c -o tbx.pico tbx.c
gcc -g -O2 -I. -fpic -c -o vcf.pico vcf.c
gcc -g -O2 -I. -fpic -c -o vcfutils.pico vcfutils.c
gcc -g -O2 -I. -fpic -c -o cram/cram_codecs.pico cram/cram_codecs.c
gcc -g -O2 -I. -fpic -c -o cram/cram_decode.pico cram/cram_decode.c
gcc -g -O2 -I. -fpic -c -o cram/cram_encode.pico cram/cram_encode.c
gcc -g -O2 -I. -fpic -c -o cram/cram_external.pico cram/cram_external.c
gcc -g -O2 -I. -fpic -c -o cram/cram_index.pico cram/cram_index.c
gcc -g -O2 -I. -fpic -c -o cram/cram_io.pico cram/cram_io.c
gcc -g -O2 -I. -fpic -c -o cram/cram_samtools.pico cram/cram_samtools.c
gcc -g -O2 -I. -fpic -c -o cram/cram_stats.pico cram/cram_stats.c
gcc -g -O2 -I. -fpic -c -o cram/files.pico cram/files.c
gcc -g -O2 -I. -fpic -c -o cram/mFILE.pico cram/mFILE.c
gcc -g -O2 -I. -fpic -c -o cram/open_trace_file.pico cram/open_trace_file.c
gcc -g -O2 -I. -fpic -c -o cram/pooled_alloc.pico cram/pooled_alloc.c
gcc -g -O2 -I. -fpic -c -o cram/rANS_static.pico cram/rANS_static.c
gcc -g -O2 -I. -fpic -c -o cram/sam_header.pico cram/sam_header.c
gcc -g -O2 -I. -fpic -c -o cram/string_alloc.pico cram/string_alloc.c
gcc -g -O2 -I. -fpic -c -o cram/thread_pool.pico cram/thread_pool.c
gcc -g -O2 -I. -fpic -c -o cram/vlen.pico cram/vlen.c
gcc -g -O2 -I. -fpic -c -o cram/zfio.pico cram/zfio.c
gcc -shared -Wl,-soname,libhts.so.1 -pthread -o libhts.so kfunc.pico knetfile.pico kstring.pico bgzf.pico faidx.pico hfile.pico hfile_net.pico hts.pico md5.pico regidx.pico sam.pico synced_bcf_reader.pico vcf_sweep.pico tbx.pico vcf.pico vcfutils.pico cram/cram_codecs.pico cram/cram_decode.pico cram/cram_encode.pico cram/cram_external.pico cram/cram_index.pico cram/cram_io.pico cram/cram_samtools.pico cram/cram_stats.pico cram/files.pico cram/mFILE.pico cram/open_trace_file.pico cram/pooled_alloc.pico cram/rANS_static.pico cram/sam_header.pico cram/string_alloc.pico cram/thread_pool.pico cram/vlen.pico cram/zfio.pico -lz -lm
ln -sf libhts.so libhts.so.1
gcc -g -O2 -I. -c -o bgzip.o bgzip.c
gcc -pthread -o bgzip bgzip.o libhts.a -lz
gcc -g -O2 -I. -c -o htsfile.o htsfile.c
gcc -pthread -o htsfile htsfile.o libhts.a -lz
gcc -g -O2 -I. -c -o tabix.o tabix.c
gcc -pthread -o tabix tabix.o libhts.a -lz
gcc -g -O2 -I. -c -o test/fieldarith.o test/fieldarith.c
gcc -pthread -o test/fieldarith test/fieldarith.o libhts.a -lz
gcc -g -O2 -I. -c -o test/hfile.o test/hfile.c
gcc -pthread -o test/hfile test/hfile.o libhts.a -lz
gcc -g -O2 -I. -c -o test/sam.o test/sam.c
gcc -pthread -o test/sam test/sam.o libhts.a -lz
gcc -g -O2 -I. -c -o test/test-regidx.o test/test-regidx.c
gcc -pthread -o test/test-regidx test/test-regidx.o libhts.a -lz
gcc -g -O2 -I. -c -o test/test_view.o test/test_view.c
gcc -pthread -o test/test_view test/test_view.o libhts.a -lz
gcc -g -O2 -I. -c -o test/test-vcf-api.o test/test-vcf-api.c
gcc -pthread -o test/test-vcf-api test/test-vcf-api.o libhts.a -lz
gcc -g -O2 -I. -c -o test/test-vcf-sweep.o test/test-vcf-sweep.c
gcc -pthread -o test/test-vcf-sweep test/test-vcf-sweep.o libhts.a -lz
hadoop@Mcnode1:~/cloud/adam/xubo/code/htslib$ install
install: missing file operand
Try 'install --help' for more information.
hadoop@Mcnode1:~/cloud/adam/xubo/code/htslib$ make install
mkdir -p -m 755 /usr/local/bin /usr/local/include /usr/local/include/htslib /usr/local/lib /usr/local/share/man/man1 /usr/local/share/man/man5 /usr/local/lib/pkgconfig
mkdir: cannot create directory ‘/usr/local/include/htslib’: Permission denied
mkdir: cannot create directory ‘/usr/local/share/man/man1’: Permission denied
mkdir: cannot create directory ‘/usr/local/share/man/man5’: Permission denied
mkdir: cannot create directory ‘/usr/local/lib/pkgconfig’: Permission denied
make: *** [installdirs] Error 1
hadoop@Mcnode1:~/cloud/adam/xubo/code/htslib$ sudo make install
[sudo] password for hadoop:
mkdir -p -m 755 /usr/local/bin /usr/local/include /usr/local/include/htslib /usr/local/lib /usr/local/share/man/man1 /usr/local/share/man/man5 /usr/local/lib/pkgconfig
if test -n ""; then mkdir -p -m 755 ; fi
install -p -m 644 libhts.so /usr/local/lib/libhts.so.1.3-35-g26b3085
ln -sf libhts.so.1.3-35-g26b3085 /usr/local/lib/libhts.so
ln -sf libhts.so.1.3-35-g26b3085 /usr/local/lib/libhts.so.1
sed -e 's#@includedir@#/usr/local/include#g;s#@libdir@#/usr/local/lib#g;s#@PACKAGE_VERSION@#1.3-35-g26b3085#g' htslib.pc.in > /usr/local/lib/pkgconfig/htslib.pc
chmod 644 /usr/local/lib/pkgconfig/htslib.pc
install -p bgzip htsfile tabix /usr/local/bin
if test -n ""; then install -p ; fi
install -p -m 644 htslib/*.h /usr/local/include/htslib
install -p -m 644 libhts.a /usr/local/lib/libhts.a
install -p -m 644 htsfile.1 tabix.1 /usr/local/share/man/man1
install -p -m 644 faidx.5 sam.5 vcf.5 /usr/local/share/man/man5
hadoop@Mcnode1:~/cloud/adam/xubo/code/htslib$
(二)SAMtool下载安装:参考【2】
1.下载地址:
2.安装指令:
aclocal -I.../autoconf-archive/m4 # Cache configure subroutines
autoconf # Generate the configure script, if needed
./configure # Optional, needed for choosing optional functionality
make
make install
上诉指令不正确
</pre><p></p><p>遇到的问题:</p><p></p><pre name="code" class="plain" style="font-size: 13.3333px;">aclocal -I.../autoconf-archive/m4 # Cache configure subroutines
地址就不对,应该是:
aclocal -I ../autoconf-archive/m4 # Cache configure subroutines
aclocal也没有
则安装automake:
sudo apt-get install automake
但是
autoconf-archive没有:
hadoop@Mcnode1:~/cloud/adam/xubo/code/samtools$ aclocal -I.../autoconf-archive/m4
aclocal: warning: couldn't open directory '.../autoconf-archive/m4': No such file or directory
config.mk:33: ../htslib/htslib.mk: No such file or directory
make: *** No rule to make target `../htslib/htslib.mk'. Stop.
下载
autoconf-archive:
hadoop@Mcnode1:~/cloud/adam/xubo/code$ git clone git://git.sv.gnu.org/autoconf-archive.git
Cloning into 'autoconf-archive'...
remote: Counting objects: 11458, done.
remote: Compressing objects: 100% (2162/2162), done.
remote: Total 11458 (delta 9257), reused 11420 (delta 9233)
Receiving objects: 100% (11458/11458), 2.61 MiB | 29.00 KiB/s, done.
Resolving deltas: 100% (9257/9257), done.
Checking connectivity... done.
再运行还是有问题:
hadoop@Mcnode1:~/cloud/adam/xubo$ aclocal -I ../autoconf-archive/m4
aclocal: error: 'configure.ac' is required
则先装了1中的htslib,然后再运行这一步就没问题了
不过make的时候又有新问题:
hadoop@Mcnode1:~/cloud/adam/xubo/code/samtools$ make
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_index.o bam_index.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_plcmd.o bam_plcmd.c
gcc -g -Wall -O2 -I. -I../htslib -c -o sam_view.o sam_view.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_cat.o bam_cat.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_md.o bam_md.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_reheader.o bam_reheader.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_sort.o bam_sort.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bedidx.o bedidx.c
gcc -g -Wall -O2 -I. -I../htslib -c -o kprobaln.o kprobaln.c
kprobaln.c: In function ‘kpa_glocal’:
kprobaln.c:80:21: warning: variable ‘is_diff’ set but not used [-Wunused-but-set-variable]int bw, bw2, i, k, is_diff = 0, is_backward = 1, Pr;^
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_rmdup.o bam_rmdup.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_rmdupse.o bam_rmdupse.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_mate.o bam_mate.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_stat.o bam_stat.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_color.o bam_color.c
echo '#define SAMTOOLS_VERSION "1.3-20-gd49c73b"' > version.h
gcc -g -Wall -O2 -I. -I../htslib -c -o bamtk.o bamtk.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam2bcf.o bam2bcf.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam2bcf_indel.o bam2bcf_indel.c
gcc -g -Wall -O2 -I. -I../htslib -c -o errmod.o errmod.c
gcc -g -Wall -O2 -I. -I../htslib -c -o sample.o sample.c
gcc -g -Wall -O2 -I. -I../htslib -c -o sam_opts.o sam_opts.c
gcc -g -Wall -O2 -I. -I../htslib -c -o cut_target.o cut_target.c
gcc -g -Wall -O2 -I. -I../htslib -c -o phase.o phase.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam2depth.o bam2depth.c
gcc -g -Wall -O2 -I. -I../htslib -c -o padding.o padding.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bedcov.o bedcov.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bamshuf.o bamshuf.c
gcc -g -Wall -O2 -I. -I../htslib -c -o faidx.o faidx.c
gcc -g -Wall -O2 -I. -I../htslib -c -o dict.o dict.c
gcc -g -Wall -O2 -I. -I../htslib -c -o stats.o stats.c
gcc -g -Wall -O2 -I. -I../htslib -c -o stats_isize.o stats_isize.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_flags.o bam_flags.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_split.o bam_split.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_tview.o bam_tview.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_tview_curses.o bam_tview_curses.c
bam_tview_curses.c:41:20: fatal error: curses.h: No such file or directory#include <curses.h>^
compilation terminated.
make: *** [bam_tview_curses.o] Error 1
解决办法:参考【3】
sudo apt-get install libncurses5-dev
之后就可以了。
正确安装指令:
(1).正确安装(一)htslib并make install、
(2).安装配置:
在samtool同级目录:
git clone git://git.sv.gnu.org/autoconf-archive.git
(3) 安装automake和libncurses5-dev:
sudo apt-get install automake
sudo apt-get install libncurses5-dev
(4) 运行参考指令:
aclocal -I ../autoconf-archive/m4 # Cache configure subroutines
autoconf # Generate the configure script, if needed
./configure # Optional, needed for choosing optional functionalitymake
sudo make install
3.安装记录:
hadoop@Mcnode1:~/cloud/adam/xubo/code/samtools$ aclocal -I.../autoconf-archive/m4
aclocal: warning: couldn't open directory '.../autoconf-archive/m4': No such file or directory
hadoop@Mcnode1:~/cloud/adam/xubo/code/samtools$ aclocal -I ../autoconf-archive/m4
hadoop@Mcnode1:~/cloud/adam/xubo/code/samtools$ autoconf
hadoop@Mcnode1:~/cloud/adam/xubo/code/samtools$ make
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_index.o bam_index.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_plcmd.o bam_plcmd.c
gcc -g -Wall -O2 -I. -I../htslib -c -o sam_view.o sam_view.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_cat.o bam_cat.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_md.o bam_md.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_reheader.o bam_reheader.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_sort.o bam_sort.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bedidx.o bedidx.c
gcc -g -Wall -O2 -I. -I../htslib -c -o kprobaln.o kprobaln.c
kprobaln.c: In function ‘kpa_glocal’:
kprobaln.c:80:21: warning: variable ‘is_diff’ set but not used [-Wunused-but-set-variable]int bw, bw2, i, k, is_diff = 0, is_backward = 1, Pr;^
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_rmdup.o bam_rmdup.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_rmdupse.o bam_rmdupse.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_mate.o bam_mate.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_stat.o bam_stat.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_color.o bam_color.c
echo '#define SAMTOOLS_VERSION "1.3-20-gd49c73b"' > version.h
gcc -g -Wall -O2 -I. -I../htslib -c -o bamtk.o bamtk.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam2bcf.o bam2bcf.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam2bcf_indel.o bam2bcf_indel.c
gcc -g -Wall -O2 -I. -I../htslib -c -o errmod.o errmod.c
gcc -g -Wall -O2 -I. -I../htslib -c -o sample.o sample.c
gcc -g -Wall -O2 -I. -I../htslib -c -o sam_opts.o sam_opts.c
gcc -g -Wall -O2 -I. -I../htslib -c -o cut_target.o cut_target.c
gcc -g -Wall -O2 -I. -I../htslib -c -o phase.o phase.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam2depth.o bam2depth.c
gcc -g -Wall -O2 -I. -I../htslib -c -o padding.o padding.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bedcov.o bedcov.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bamshuf.o bamshuf.c
gcc -g -Wall -O2 -I. -I../htslib -c -o faidx.o faidx.c
gcc -g -Wall -O2 -I. -I../htslib -c -o dict.o dict.c
gcc -g -Wall -O2 -I. -I../htslib -c -o stats.o stats.c
gcc -g -Wall -O2 -I. -I../htslib -c -o stats_isize.o stats_isize.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_flags.o bam_flags.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_split.o bam_split.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_tview.o bam_tview.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_tview_curses.o bam_tview_curses.c
bam_tview_curses.c:41:20: fatal error: curses.h: No such file or directory#include <curses.h>^
compilation terminated.
make: *** [bam_tview_curses.o] Error 1
hadoop@Mcnode1:~/cloud/adam/xubo/code/samtools$ apt-get install libncurses5-dev
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
hadoop@Mcnode1:~/cloud/adam/xubo/code/samtools$ sudo apt-get install libncurses5-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:libtinfo-dev
Suggested packages:ncurses-doc
The following NEW packages will be installed:libncurses5-dev libtinfo-dev
0 upgraded, 2 newly installed, 0 to remove and 484 not upgraded.
Need to get 246 kB of archives.
After this operation, 1,479 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.ustc.edu.cn/ubuntu/ trusty/main libtinfo-dev amd64 5.9+20140118-1ubuntu1 [76.3 kB]
Get:2 http://mirrors.ustc.edu.cn/ubuntu/ trusty/main libncurses5-dev amd64 5.9+20140118-1ubuntu1 [170 kB]
Fetched 246 kB in 0s (1,004 kB/s)
Selecting previously unselected package libtinfo-dev:amd64.
(Reading database ... 176054 files and directories currently installed.)
Preparing to unpack .../libtinfo-dev_5.9+20140118-1ubuntu1_amd64.deb ...
Unpacking libtinfo-dev:amd64 (5.9+20140118-1ubuntu1) ...
Selecting previously unselected package libncurses5-dev:amd64.
Preparing to unpack .../libncurses5-dev_5.9+20140118-1ubuntu1_amd64.deb ...
Unpacking libncurses5-dev:amd64 (5.9+20140118-1ubuntu1) ...
Setting up libtinfo-dev:amd64 (5.9+20140118-1ubuntu1) ...
Setting up libncurses5-dev:amd64 (5.9+20140118-1ubuntu1) ...
hadoop@Mcnode1:~/cloud/adam/xubo/code/samtools$ make
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_tview_curses.o bam_tview_curses.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_tview_html.o bam_tview_html.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_lpileup.o bam_lpileup.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_quickcheck.o bam_quickcheck.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_addrprg.o bam_addrprg.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_aux.o bam_aux.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam.o bam.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_import.o bam_import.c
gcc -g -Wall -O2 -I. -I../htslib -c -o sam.o sam.c
gcc -g -Wall -O2 -I. -I../htslib -c -o sam_header.o sam_header.c
gcc -g -Wall -O2 -I. -I../htslib -c -o bam_plbuf.o bam_plbuf.c
ar -csru libbam.a bam_aux.o bam.o bam_import.o sam.o sam_header.o bam_plbuf.o
gcc -pthread -rdynamic -o samtools bam_index.o bam_plcmd.o sam_view.o bam_cat.o bam_md.o bam_reheader.o bam_sort.o bedidx.o kprobaln.o bam_rmdup.o bam_rmdupse.o bam_mate.o bam_stat.o bam_color.o bamtk.o bam2bcf.o bam2bcf_indel.o errmod.o sample.o sam_opts.o cut_target.o phase.o bam2depth.o padding.o bedcov.o bamshuf.o faidx.o dict.o stats.o stats_isize.o bam_flags.o bam_split.o bam_tview.o bam_tview_curses.o bam_tview_html.o bam_lpileup.o bam_quickcheck.o bam_addrprg.o libbam.a ../htslib/libhts.a -lcurses -lm -lz -ldl
gcc -g -Wall -O2 -I. -I../htslib -c -o misc/ace2sam.o misc/ace2sam.c
gcc -o misc/ace2sam misc/ace2sam.o -lz -ldl
gcc -g -Wall -O2 -DMAQ_LONGREADS -I. -I../htslib -c -o misc/maq2sam-long.o misc/maq2sam.c
gcc -o misc/maq2sam-long misc/maq2sam-long.o -lz -ldl
gcc -g -Wall -O2 -I. -I../htslib -c -o misc/maq2sam-short.o misc/maq2sam.c
gcc -o misc/maq2sam-short misc/maq2sam-short.o -lz -ldl
gcc -g -Wall -O2 -I. -I../htslib -c -o misc/md5fa.o misc/md5fa.c
gcc -rdynamic -o misc/md5fa misc/md5fa.o ../htslib/libhts.a -lz -ldl
gcc -g -Wall -O2 -I. -I../htslib -c -o misc/md5sum-lite.o misc/md5sum-lite.c
gcc -rdynamic -o misc/md5sum-lite misc/md5sum-lite.o ../htslib/libhts.a -lz -ldl
gcc -g -Wall -O2 -I. -I../htslib -c -o misc/wgsim.o misc/wgsim.c
gcc -o misc/wgsim misc/wgsim.o -lm -lz -ldl
gcc -g -Wall -O2 -I. -I../htslib -c -o test/merge/test_bam_translate.o test/merge/test_bam_translate.c
gcc -g -Wall -O2 -I. -I../htslib -c -o test/test.o test/test.c
gcc -pthread -rdynamic -o test/merge/test_bam_translate test/merge/test_bam_translate.o test/test.o sam_opts.o ../htslib/libhts.a -lz -ldl
gcc -g -Wall -O2 -I. -I../htslib -c -o test/merge/test_rtrans_build.o test/merge/test_rtrans_build.c
gcc -pthread -rdynamic -o test/merge/test_rtrans_build test/merge/test_rtrans_build.o sam_opts.o ../htslib/libhts.a -lz -ldl
gcc -g -Wall -O2 -I. -I../htslib -c -o test/merge/test_trans_tbl_init.o test/merge/test_trans_tbl_init.c
gcc -pthread -rdynamic -o test/merge/test_trans_tbl_init test/merge/test_trans_tbl_init.o sam_opts.o ../htslib/libhts.a -lz -ldl
gcc -g -Wall -O2 -I. -I../htslib -c -o test/split/test_count_rg.o test/split/test_count_rg.c
gcc -pthread -rdynamic -o test/split/test_count_rg test/split/test_count_rg.o test/test.o sam_opts.o ../htslib/libhts.a -lz -ldl
gcc -g -Wall -O2 -I. -I../htslib -c -o test/split/test_expand_format_string.o test/split/test_expand_format_string.c
gcc -pthread -rdynamic -o test/split/test_expand_format_string test/split/test_expand_format_string.o test/test.o sam_opts.o ../htslib/libhts.a -lz -ldl
gcc -g -Wall -O2 -I. -I../htslib -c -o test/split/test_filter_header_rg.o test/split/test_filter_header_rg.c
gcc -pthread -rdynamic -o test/split/test_filter_header_rg test/split/test_filter_header_rg.o test/test.o sam_opts.o ../htslib/libhts.a -lz -ldl
gcc -g -Wall -O2 -I. -I../htslib -c -o test/split/test_parse_args.o test/split/test_parse_args.c
gcc -pthread -rdynamic -o test/split/test_parse_args test/split/test_parse_args.o test/test.o sam_opts.o ../htslib/libhts.a -lz -ldl
gcc -g -Wall -O2 -I. -I../htslib -c -o test/vcf-miniview.o test/vcf-miniview.c
gcc -pthread -rdynamic -o test/vcf-miniview test/vcf-miniview.o ../htslib/libhts.a -lz -ldl
hadoop@Mcnode1:~/cloud/adam/xubo/code/samtools$ make install
mkdir -p -m 755 /usr/local/bin /usr/local/share/man/man1
install -p samtools misc/ace2sam misc/maq2sam-long misc/maq2sam-short misc/md5fa misc/md5sum-lite misc/wgsim misc/blast2sam.pl misc/bowtie2sam.pl misc/export2sam.pl misc/interpolate_sam.pl misc/novo2sam.pl misc/plot-bamstats misc/psl2sam.pl misc/sam2vcf.pl misc/samtools.pl misc/seq_cache_populate.pl misc/soap2sam.pl misc/varfilter.py misc/wgsim_eval.pl misc/zoom2sam.pl /usr/local/bin
install: cannot create regular file ‘/usr/local/bin/samtools’: Permission denied
install: cannot create regular file ‘/usr/local/bin/ace2sam’: Permission denied
install: cannot create regular file ‘/usr/local/bin/maq2sam-long’: Permission denied
install: cannot create regular file ‘/usr/local/bin/maq2sam-short’: Permission denied
install: cannot create regular file ‘/usr/local/bin/md5fa’: Permission denied
install: cannot create regular file ‘/usr/local/bin/md5sum-lite’: Permission denied
install: cannot create regular file ‘/usr/local/bin/wgsim’: Permission denied
install: cannot create regular file ‘/usr/local/bin/blast2sam.pl’: Permission denied
install: cannot create regular file ‘/usr/local/bin/bowtie2sam.pl’: Permission denied
install: cannot create regular file ‘/usr/local/bin/export2sam.pl’: Permission denied
install: cannot create regular file ‘/usr/local/bin/interpolate_sam.pl’: Permission denied
install: cannot create regular file ‘/usr/local/bin/novo2sam.pl’: Permission denied
install: cannot create regular file ‘/usr/local/bin/plot-bamstats’: Permission denied
install: cannot create regular file ‘/usr/local/bin/psl2sam.pl’: Permission denied
install: cannot create regular file ‘/usr/local/bin/sam2vcf.pl’: Permission denied
install: cannot create regular file ‘/usr/local/bin/samtools.pl’: Permission denied
install: cannot create regular file ‘/usr/local/bin/seq_cache_populate.pl’: Permission denied
install: cannot create regular file ‘/usr/local/bin/soap2sam.pl’: Permission denied
install: cannot create regular file ‘/usr/local/bin/varfilter.py’: Permission denied
install: cannot create regular file ‘/usr/local/bin/wgsim_eval.pl’: Permission denied
install: cannot create regular file ‘/usr/local/bin/zoom2sam.pl’: Permission denied
make: *** [install] Error 1
hadoop@Mcnode1:~/cloud/adam/xubo/code/samtools$ sudo make install
mkdir -p -m 755 /usr/local/bin /usr/local/share/man/man1
install -p samtools misc/ace2sam misc/maq2sam-long misc/maq2sam-short misc/md5fa misc/md5sum-lite misc/wgsim misc/blast2sam.pl misc/bowtie2sam.pl misc/export2sam.pl misc/interpolate_sam.pl misc/novo2sam.pl misc/plot-bamstats misc/psl2sam.pl misc/sam2vcf.pl misc/samtools.pl misc/seq_cache_populate.pl misc/soap2sam.pl misc/varfilter.py misc/wgsim_eval.pl misc/zoom2sam.pl /usr/local/bin
install -p -m 644 samtools.1 misc/wgsim.1 /usr/local/share/man/man1
hadoop@Mcnode1:~/cloud/adam/xubo/code/samtools$
make install成功:
hadoop@Mcnode1:~/cloud/adam/xubo/code/samtools$ ls
aclocal.m4 bam_addrprg.o bam.h bam_md.o bam_rmdup.c bam_stat.o bedcov.o cut_target.o kprobaln.c phase.c sam_opts.h stats_isize.c
AUTHORS bam_aux.c bam_import.c bam.o bam_rmdup.o bamtk.c bedidx.c dict.c kprobaln.h phase.o sam_opts.o stats_isize.h
autom4te.cache bam_aux.o bam_import.o bam_plbuf.c bam_rmdupse.c bamtk.o bedidx.o dict.o kprobaln.o README sample.c stats_isize.o
bam2bcf.c bam.c bam_index.c bam_plbuf.h bam_rmdupse.o bam_tview.c ChangeLog.old errmod.c libbam.a README.md sample.h stats.o
bam2bcf.h bam_cat.c bam_index.o bam_plbuf.o bamshuf.c bam_tview_curses.c config.h errmod.h LICENSE sam.c sample.o test
bam2bcf_indel.c bam_cat.o bam_lpileup.c bam_plcmd.c bamshuf.o bam_tview_curses.o config.h.in errmod.o Makefile sam.h samtools version.h
bam2bcf_indel.o bam_color.c bam_lpileup.h bam_plcmd.o bam_sort.c bam_tview.h config.mk examples Makefile.mingw sam_header.c samtools.1 win32
bam2bcf.o bam_color.o bam_lpileup.o bam_quickcheck.c bam_sort.o bam_tview_html.c config.mk.in faidx.c misc sam_header.h samtools.h
bam2depth.c bam_endian.h bam_mate.c bam_quickcheck.o bam_split.c bam_tview_html.o configure faidx.o NEWS sam_header.o sam_view.c
bam2depth.o bam_flags.c bam_mate.o bam_reheader.c bam_split.o bam_tview.o configure.ac INSTALL padding.c sam.o sam_view.o
bam_addrprg.c bam_flags.o bam_md.c bam_reheader.o bam_stat.c bedcov.c cut_target.c install-sh padding.o sam_opts.c stats.c
hadoop@Mcnode1:~/cloud/adam/xubo/code/samtools$ sam
sam2vcf.pl samba_kcc samba-regedit samba-tool samtools samtools.pl
参考:
【1】 https://github.com/samtools/htslib
【2】 https://github.com/samtools/samtools
【3】 http://blog.csdn.net/ustcxjt/article/details/7326512