linux学习100篇118:samtools源代码安装

root 15:14:17 ~
$ conda activate test
(test) root 15:14:31 ~
$ cd biosoft/
(test) root 15:14:37 ~/biosoft
$ cd samtools-1.12
(test) root 15:14:42 ~/biosoft/samtools-1.12
$ ./configure --prefix="/root/biosoft/samtools-1.12/"
checking for gawk... no
checking for mawk... mawk
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 grep that handles long lines and -e... /bin/grep
checking for C compiler warning flags... -Wall
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking location of HTSlib source tree... htslib-1.12
checking for NcursesW wide-character library... no
checking for Ncurses library... yes
checking for working ncurses/curses.h... no
checking for working ncurses.h... yes
checking for library containing cbreak... none required
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
=== configuring in htslib-1.12 (/root/biosoft/samtools-1.12/htslib-1.12)
configure: running /bin/bash ./configure --disable-option-checking '--prefix=/root/biosoft/samtools-1.12'  --cache-file=/dev/null --srcdir=.
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 grep that handles long lines and -e... /bin/grep
checking for C compiler warning flags... -Wall
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking shared library type for unknown-Linux... plain .so
checking whether the compiler accepts -fvisibility=hidden... yes
checking how to run the C preprocessor... gcc -E
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 fsync... yes
checking for drand48... yes
checking for srand48_deterministic... no
checking whether fdatasync is declared... yes
checking for fdatasync... yes
checking for library containing log... -lm
checking for zlib.h... yes
checking for inflate in -lz... yes
checking for library containing recv... none required
checking for bzlib.h... yes
checking for BZ2_bzBuffToBuffCompress in -lbz2... yes
checking for lzma.h... yes
checking for lzma_easy_buffer_encode in -llzma... yes
checking whether htscodecs files are present... yes
checking for libdeflate.h... no
checking for libdeflate_deflate_compress in -ldeflate... no
checking for curl_easy_pause in -lcurl... yes
checking for CCHmac... no
checking for library containing HMAC... -lcrypto
checking for library containing regcomp... none required
checking whether PTHREAD_MUTEX_RECURSIVE is declared... yes
configure: creating ./config.status
config.status: creating config.mk
config.status: creating htscodecs.mk
config.status: creating htslib.pc.tmp
config.status: creating config.h
(test) root 15:15:51 ~/biosoft/samtools-1.12
$ make
config.mk:46: htslib-1.12/htslib_static.mk: No such file or directory
cd htslib-1.12 && make htslib_static.mk
make[1]: Entering directory '/root/biosoft/samtools-1.12/htslib-1.12'
sed -n '/^static_libs=/s/[^=]*=/HTSLIB_static_LIBS = /p;/^static_ldflags=/s/[^=]*=/HTSLIB_static_LDFLAGS = /p' htslib.pc.tmp > htslib_static.mk
make[1]: Leaving directory '/root/biosoft/samtools-1.12/htslib-1.12'
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bam_index.o bam_index.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bam_plcmd.o bam_plcmd.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o sam_view.o sam_view.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bam_fastq.o bam_fastq.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bam_cat.o bam_cat.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bam_md.o bam_md.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bam_reheader.o bam_reheader.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bam_sort.o bam_sort.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bam_rmdup.o bam_rmdup.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bam_rmdupse.o bam_rmdupse.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bam_mate.o bam_mate.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bam_stat.o bam_stat.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bam_color.o bam_color.c
echo '#define SAMTOOLS_VERSION "1.12"' > version.h
echo '#define SAMTOOLS_CC "gcc"' >> version.h
echo '#define SAMTOOLS_CPPFLAGS ""' >> version.h
echo '#define SAMTOOLS_CFLAGS "-Wall -g -O2"' >> version.h
echo '#define SAMTOOLS_LDFLAGS ""' >> version.h
echo '#define SAMTOOLS_HTSDIR "htslib-1.12"' >> version.h
echo '#define SAMTOOLS_LIBS ""' >> version.h
echo '#define SAMTOOLS_CURSES_LIB "-lncurses"' >> version.h
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bamtk.o bamtk.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bam2bcf.o bam2bcf.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bam2bcf_indel.o bam2bcf_indel.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o sample.o sample.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o cut_target.o cut_target.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o phase.o phase.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bam2depth.o bam2depth.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o coverage.o coverage.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o padding.o padding.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bedcov.o bedcov.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bamshuf.o bamshuf.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o faidx.o faidx.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o dict.o dict.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o stats.o stats.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o stats_isize.o stats_isize.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bam_flags.o bam_flags.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bam_split.o bam_split.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bam_tview.o bam_tview.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bam_tview_curses.o bam_tview_curses.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bam_tview_html.o bam_tview_html.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bam_lpileup.o bam_lpileup.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bam_quickcheck.o bam_quickcheck.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bam_addrprg.o bam_addrprg.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bam_markdup.o bam_markdup.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o tmp_file.o tmp_file.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bam_ampliconclip.o bam_ampliconclip.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o amplicon_stats.o amplicon_stats.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o lz4/lz4.o lz4/lz4.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bam_aux.o bam_aux.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bam.o bam.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o sam.o sam.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bam_plbuf.o bam_plbuf.c
ar -csru libbam.a bam_aux.o bam.o sam.o bam_plbuf.o
ar: `u' modifier ignored since `D' is the default (see `U')
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o sam_opts.o sam_opts.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o sam_utils.o sam_utils.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o bedidx.o bedidx.c
ar -rcs libst.a sam_opts.o sam_utils.o bedidx.o
cd htslib-1.12 && make hts-object-files
make[1]: Entering directory '/root/biosoft/samtools-1.12/htslib-1.12'
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o kfunc.o kfunc.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o kstring.o kstring.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o bcf_sr_sort.o bcf_sr_sort.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o bgzf.o bgzf.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o errmod.o errmod.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o faidx.o faidx.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o header.o header.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o hfile.o hfile.c
echo '#define HTS_VERSION_TEXT "1.12"' > version.h
echo '#define HTS_CC "gcc"' > config_vars.h
echo '#define HTS_CPPFLAGS ""' >> config_vars.h
echo '#define HTS_CFLAGS "-Wall -g -O2 -fvisibility=hidden"' >> config_vars.h
echo '#define HTS_LDFLAGS "-fvisibility=hidden "' >> config_vars.h
echo '#define HTS_LIBS "-llzma -lbz2 -lz -lm   -lcurl -lcrypto"' >> config_vars.h
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o hts.o hts.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o hts_expr.o hts_expr.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o hts_os.o hts_os.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o md5.o md5.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o multipart.o multipart.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o probaln.o probaln.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o realn.o realn.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o regidx.o regidx.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o region.o region.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o sam.o sam.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o synced_bcf_reader.o synced_bcf_reader.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o vcf_sweep.o vcf_sweep.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o tbx.o tbx.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o textutils.o textutils.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o thread_pool.o thread_pool.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o vcf.o vcf.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o vcfutils.o vcfutils.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o cram/cram_codecs.o cram/cram_codecs.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o cram/cram_decode.o cram/cram_decode.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o cram/cram_encode.o cram/cram_encode.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o cram/cram_external.o cram/cram_external.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o cram/cram_index.o cram/cram_index.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o cram/cram_io.o cram/cram_io.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o cram/cram_stats.o cram/cram_stats.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o cram/mFILE.o cram/mFILE.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o cram/open_trace_file.o cram/open_trace_file.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o cram/pooled_alloc.o cram/pooled_alloc.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o cram/string_alloc.o cram/string_alloc.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o htscodecs/htscodecs/arith_dynamic.o htscodecs/htscodecs/arith_dynamic.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o htscodecs/htscodecs/fqzcomp_qual.o htscodecs/htscodecs/fqzcomp_qual.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o htscodecs/htscodecs/htscodecs.o htscodecs/htscodecs/htscodecs.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o htscodecs/htscodecs/pack.o htscodecs/htscodecs/pack.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o htscodecs/htscodecs/rANS_static4x16pr.o htscodecs/htscodecs/rANS_static4x16pr.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o htscodecs/htscodecs/rANS_static.o htscodecs/htscodecs/rANS_static.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o htscodecs/htscodecs/rle.o htscodecs/htscodecs/rle.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o htscodecs/htscodecs/tokenise_name3.o htscodecs/htscodecs/tokenise_name3.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o hfile_libcurl.o hfile_libcurl.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o hfile_gcs.o hfile_gcs.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o hfile_s3.o hfile_s3.c
gcc -Wall -g -O2 -fvisibility=hidden -I.  -c -o hfile_s3_write.o hfile_s3_write.c
touch hts-object-files
make[1]: Leaving directory '/root/biosoft/samtools-1.12/htslib-1.12'
cd htslib-1.12 && make lib-static
make[1]: Entering directory '/root/biosoft/samtools-1.12/htslib-1.12'
ar -rc libhts.a kfunc.o kstring.o bcf_sr_sort.o bgzf.o errmod.o faidx.o header.o hfile.o hts.o hts_expr.o hts_os.o md5.o multipart.o probaln.o realn.o regidx.o region.o sam.o synced_bcf_reader.o vcf_sweep.o tbx.o textutils.o thread_pool.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_stats.o cram/mFILE.o cram/open_trace_file.o cram/pooled_alloc.o cram/string_alloc.o htscodecs/htscodecs/arith_dynamic.o htscodecs/htscodecs/fqzcomp_qual.o htscodecs/htscodecs/htscodecs.o htscodecs/htscodecs/pack.o htscodecs/htscodecs/rANS_static4x16pr.o htscodecs/htscodecs/rANS_static.o htscodecs/htscodecs/rle.o htscodecs/htscodecs/tokenise_name3.o   hfile_libcurl.o hfile_gcs.o hfile_s3.o hfile_s3_write.o
ranlib libhts.a
make[1]: Leaving directory '/root/biosoft/samtools-1.12/htslib-1.12'
gcc  -L./lz4  -o samtools bam_index.o bam_plcmd.o sam_view.o bam_fastq.o bam_cat.o bam_md.o bam_reheader.o bam_sort.o bam_rmdup.o bam_rmdupse.o bam_mate.o bam_stat.o bam_color.o bamtk.o bam2bcf.o bam2bcf_indel.o sample.o cut_target.o phase.o bam2depth.o coverage.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 bam_markdup.o tmp_file.o bam_ampliconclip.o amplicon_stats.o ./lz4/lz4.o libbam.a libst.a htslib-1.12/libhts.a -lpthread -lz -lm -lbz2 -llzma -lcurl -lcrypto -lncurses -lm -lz  -lpthread
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o misc/ace2sam.o misc/ace2sam.c
gcc  -L./lz4  -o misc/ace2sam misc/ace2sam.o htslib-1.12/libhts.a -lpthread -lz -lm -lbz2 -llzma -lcurl -lcrypto -lz 
gcc -Wall -g -O2 -DMAQ_LONGREADS -I. -Ihtslib-1.12 -I./lz4  -c -o misc/maq2sam-long.o misc/maq2sam.c
gcc  -o misc/maq2sam-long misc/maq2sam-long.o -lz 
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o misc/maq2sam-short.o misc/maq2sam.c
gcc  -o misc/maq2sam-short misc/maq2sam-short.o -lz 
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o misc/md5fa.o misc/md5fa.c
gcc  -L./lz4  -o misc/md5fa misc/md5fa.o htslib-1.12/libhts.a -lpthread -lz -lm -lbz2 -llzma -lcurl -lcrypto -lz 
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o misc/md5sum-lite.o misc/md5sum-lite.c
gcc  -L./lz4  -o misc/md5sum-lite misc/md5sum-lite.o htslib-1.12/libhts.a -lpthread -lz -lm -lbz2 -llzma -lcurl -lcrypto -lz 
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o misc/wgsim.o misc/wgsim.c
gcc  -L./lz4  -o misc/wgsim misc/wgsim.o -lm htslib-1.12/libhts.a -lpthread -lz -lm -lbz2 -llzma -lcurl -lcrypto -lz 
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o test/merge/test_bam_translate.o test/merge/test_bam_translate.c
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o test/test.o test/test.c
gcc  -L./lz4  -o test/merge/test_bam_translate test/merge/test_bam_translate.o test/test.o libst.a htslib-1.12/libhts.a -lpthread -lz -lm -lbz2 -llzma -lcurl -lcrypto -lz  -lpthread
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o test/merge/test_rtrans_build.o test/merge/test_rtrans_build.c
gcc  -L./lz4  -o test/merge/test_rtrans_build test/merge/test_rtrans_build.o test/test.o libst.a htslib-1.12/libhts.a -lpthread -lz -lm -lbz2 -llzma -lcurl -lcrypto -lz  -lpthread
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o test/merge/test_trans_tbl_init.o test/merge/test_trans_tbl_init.c
gcc  -L./lz4  -o test/merge/test_trans_tbl_init test/merge/test_trans_tbl_init.o test/test.o libst.a htslib-1.12/libhts.a -lpthread -lz -lm -lbz2 -llzma -lcurl -lcrypto -lz  -lpthread
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o test/split/test_count_rg.o test/split/test_count_rg.c
gcc  -L./lz4  -o test/split/test_count_rg test/split/test_count_rg.o test/test.o libst.a htslib-1.12/libhts.a -lpthread -lz -lm -lbz2 -llzma -lcurl -lcrypto -lz  -lpthread
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o test/split/test_expand_format_string.o test/split/test_expand_format_string.c
gcc  -L./lz4  -o test/split/test_expand_format_string test/split/test_expand_format_string.o test/test.o libst.a htslib-1.12/libhts.a -lpthread -lz -lm -lbz2 -llzma -lcurl -lcrypto -lz  -lpthread
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o test/split/test_filter_header_rg.o test/split/test_filter_header_rg.c
gcc  -L./lz4  -o test/split/test_filter_header_rg test/split/test_filter_header_rg.o test/test.o libst.a htslib-1.12/libhts.a -lpthread -lz -lm -lbz2 -llzma -lcurl -lcrypto -lz  -lpthread
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o test/split/test_parse_args.o test/split/test_parse_args.c
gcc  -L./lz4  -o test/split/test_parse_args test/split/test_parse_args.o test/test.o libst.a htslib-1.12/libhts.a -lpthread -lz -lm -lbz2 -llzma -lcurl -lcrypto -lz  -lpthread
gcc -Wall -g -O2 -I. -Ihtslib-1.12 -I./lz4  -c -o test/vcf-miniview.o test/vcf-miniview.c
gcc  -L./lz4  -o test/vcf-miniview test/vcf-miniview.o htslib-1.12/libhts.a -lpthread -lz -lm -lbz2 -llzma -lcurl -lcrypto -lz  -lpthread
(test) root 15:16:48 ~/biosoft/samtools-1.12
$ make install
mkdir -p -m 755 /root/biosoft/samtools-1.12/bin /root/biosoft/samtools-1.12/bin /root/biosoft/samtools-1.12/share/man/man1
install -p samtools /root/biosoft/samtools-1.12/bin
install -p misc/ace2sam misc/maq2sam-long misc/maq2sam-short misc/md5fa misc/md5sum-lite misc/wgsim /root/biosoft/samtools-1.12/bin
install -p misc/blast2sam.pl misc/bowtie2sam.pl misc/export2sam.pl misc/fasta-sanitize.pl misc/interpolate_sam.pl misc/novo2sam.pl misc/plot-ampliconstats misc/plot-bamstats misc/psl2sam.pl misc/sam2vcf.pl misc/samtools.pl misc/seq_cache_populate.pl misc/soap2sam.pl misc/wgsim_eval.pl misc/zoom2sam.pl /root/biosoft/samtools-1.12/bin
install -p -m 644 doc/samtools*.1 misc/wgsim.1 /root/biosoft/samtools-1.12/share/man/man1
(test) root 15:16:54 ~/biosoft/samtools-1.12
$ ls
amplicon_stats.c    bam_mate.c          bedcov.c       NEWS
amplicon_stats.o    bam_mate.o          bedcov.o       padding.c
AUTHORS             bam_md.c            bedidx.c       padding.o
bam2bcf.c           bam_md.o            bedidx.h       phase.c
bam2bcf.h           bam.o               bedidx.o       phase.o
bam2bcf_indel.c     bam_plbuf.c         bin            README
bam2bcf_indel.o     bam_plbuf.h         ChangeLog.old  sam.c
bam2bcf.o           bam_plbuf.o         config.h       sam.h
bam2depth.c         bam_plcmd.c         config.h.in    sam.o
bam2depth.o         bam_plcmd.o         config.log     sam_opts.c
bam_addrprg.c       bam_quickcheck.c    config.mk      sam_opts.h
bam_addrprg.o       bam_quickcheck.o    config.mk.in   sam_opts.o
bam_ampliconclip.c  bam_reheader.c      config.status  sample.c
bam_ampliconclip.h  bam_reheader.o      configure      sample.h
bam_ampliconclip.o  bam_rmdup.c         configure.ac   sample.o
bam_aux.c           bam_rmdup.o         coverage.c     samtools
bam_aux.o           bam_rmdupse.c       coverage.o     samtools.h
bam.c               bam_rmdupse.o       cut_target.c   sam_utils.c
bam_cat.c           bamshuf.c           cut_target.o   sam_utils.o
bam_cat.o           bamshuf.o           dict.c         sam_view.c
bam_color.c         bam_sort.c          dict.o         sam_view.o
bam_color.o         bam_sort.o          doc            share
bam_endian.h        bam_split.c         examples       stats.c
bam_fastq.c         bam_split.o         faidx.c        stats_isize.c
bam_fastq.o         bam_stat.c          faidx.o        stats_isize.h
bam_flags.c         bam_stat.o          htslib-1.12    stats_isize.o
bam_flags.o         bamtk.c             INSTALL        stats.o
bam.h               bamtk.o             install-sh     test
bam_index.c         bam_tview.c         libbam.a       tmp_file.c
bam_index.o         bam_tview_curses.c  libst.a        tmp_file.h
bam_lpileup.c       bam_tview_curses.o  LICENSE        tmp_file.o
bam_lpileup.h       bam_tview.h         lz4            version.h
bam_lpileup.o       bam_tview_html.c    m4             version.sh
bam_markdup.c       bam_tview_html.o    Makefile
bam_markdup.o       bam_tview.o         misc
(test) root 15:17:19 ~/biosoft/samtools-1.12
$ cd bin/
(test) root 15:17:45 ~/biosoft/samtools-1.12/bin
$ ls
ace2sam             maq2sam-long        plot-bamstats          soap2sam.pl
blast2sam.pl        maq2sam-short       psl2sam.pl             wgsim
bowtie2sam.pl       md5fa               sam2vcf.pl             wgsim_eval.pl
export2sam.pl       md5sum-lite         samtools               zoom2sam.pl
fasta-sanitize.pl   novo2sam.pl         samtools.pl
interpolate_sam.pl  plot-ampliconstats  seq_cache_populate.pl
(test) root 15:17:47 ~/biosoft/samtools-1.12/bin
$ samtools
-bash: samtools: command not found
(test) root 15:18:06 ~/biosoft/samtools-1.12/bin
$ samtools --help
-bash: samtools: command not found
(test) root 15:18:10 ~/biosoft/samtools-1.12/bin
$ ./samtools --help

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

(test) root 15:18:40 ~/biosoft/samtools-1.12/bin
$ echo 'export "PATH=/root/biosoft/samtools-1.12/bin:$PATH"' >> ~/.bashrc
(test) root 15:21:48 ~/biosoft/samtools-1.12/bin
$ source ~/.bashrc
root 15:21:58 ~/biosoft/samtools-1.12/bin
$ samtools --help

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

root 15:22:12 ~/biosoft/samtools-1.12/bin

你可能感兴趣的:(linux学习100篇118:samtools源代码安装)