반응형
지난 포스팅에 인간의 DNA 분석을 위한 데이터를 정리하였다.
간단히 정리하자면
- FASTQ : DNA를 한 가닥씩 분석하여 4줄씩 저장한 파일
- BAM : FASTQ파일을 인간표준유전체와 비교하여 매핑/정렬한 바이너리 파일
- SAM : BAM파일을 아스키코드로 변환한 파일
이제 이 파일들을 핸들링하기 위해 samtools를 사용할 것이다.
먼저 samtools란 SAM, BAM 및 CRAM 형식의 짧은 DNA 서열 판독 정렬과
상호작용하고 사후 처리하기위한 유틸리티 세트이다.
samtools 설치(ubuntu)
아래 사이트에서 다운로드하면 된다.
$ wget https://github.com/samtools/samtools/releases/download/1.16/samtools-1.16.tar.bz2
다운이 되었다면 압축을 풀어주자
$ tar -xvf samtools-1.16.tar.bz2
컴파일을 해야하기 때문에 패키지를 다운한다
$ sudo apt-get update
$ sudo apt-get install zlib1g-dev libbz2-dev liblzma-dev libncurses-dev -y
$ sudo apt install make gcc -y
설치경로를 지정하여 컴파일한다.
$ ./configure --prefix=/home/joon95/macrozen/install/
더보기
checking for gawk... gawk 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... /usr/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.16 checking for NcursesW wide-character library... yes checking for working ncursesw/curses.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 config.status: config.h is unchanged === configuring in htslib-1.16 (/home/joon95/macrozen/samtools-1.16/htslib-1.16) configure: running /bin/bash ./configure --disable-option-checking '--prefix=/home/joon95/macrozen/install' --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... /usr/bin/grep checking for C compiler warning flags... -Wall checking whether C compiler accepts -mssse3 -mpopcnt -msse4.1... yes checking whether C compiler accepts -mavx2... yes checking whether C compiler accepts -mavx512f... yes checking whether C compiler supports ARM Neon... no checking for pkg-config... no 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... /usr/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/curl.h... no checking for curl_easy_pause in -lcurl... no checking for curl_easy_init in -lcurl... no configure: WARNING: libcurl not enabled: library not found configure: WARNING: GCS support not enabled: requires libcurl support configure: WARNING: S3 support not enabled: requires libcurl support 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 htslib.pc.tmp config.status: creating config.h config.status: linking htscodecs_bundled.mk to htscodecs.mk |
$ make
더보기
cd htslib-1.16 && make htslib_static.mk make[1]: Entering directory '/home/joon95/macrozen/samtools-1.16/htslib-1.16' 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 '/home/joon95/macrozen/samtools-1.16/htslib-1.16' gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bam_aux.o bam_aux.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bam_index.o bam_index.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bam_plcmd.o bam_plcmd.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o sam_view.o sam_view.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bam_fastq.o bam_fastq.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bam_cat.o bam_cat.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bam_md.o bam_md.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bam_plbuf.o bam_plbuf.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bam_reheader.o bam_reheader.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bam_sort.o bam_sort.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bam_rmdup.o bam_rmdup.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bam_rmdupse.o bam_rmdupse.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bam_mate.o bam_mate.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bam_stat.o bam_stat.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bam_color.o bam_color.c echo '#define SAMTOOLS_VERSION "1.16"' > 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.16"' >> version.h echo '#define SAMTOOLS_LIBS ""' >> version.h echo '#define SAMTOOLS_CURSES_LIB "-lncursesw"' >> version.h gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bamtk.o bamtk.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bam2bcf.o bam2bcf.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o sample.o sample.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o cut_target.o cut_target.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o phase.o phase.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bam2depth.o bam2depth.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o coverage.o coverage.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o padding.o padding.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bedcov.o bedcov.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bamshuf.o bamshuf.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o faidx.o faidx.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o dict.o dict.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o stats.o stats.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o stats_isize.o stats_isize.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bam_flags.o bam_flags.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bam_split.o bam_split.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bam_tview.o bam_tview.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bam_tview_curses.o bam_tview_curses.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bam_tview_html.o bam_tview_html.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bam_lpileup.o bam_lpileup.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bam_quickcheck.o bam_quickcheck.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bam_addrprg.o bam_addrprg.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bam_markdup.o bam_markdup.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o tmp_file.o tmp_file.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bam_ampliconclip.o bam_ampliconclip.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o amplicon_stats.o amplicon_stats.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bam_import.o bam_import.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bam_samples.o bam_samples.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bam_consensus.o bam_consensus.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o consensus_pileup.o consensus_pileup.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o reference.o reference.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o lz4/lz4.o lz4/lz4.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o sam_opts.o sam_opts.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o sam_utils.o sam_utils.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bedidx.o bedidx.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o bam.o bam.c ar -rcs libst.a sam_opts.o sam_utils.o bedidx.o bam.o cd htslib-1.16 && make hts-object-files make[1]: Entering directory '/home/joon95/macrozen/samtools-1.16/htslib-1.16' 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.16"' > 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 "' >> 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 -mavx2 -I. -c -o htscodecs/htscodecs/rANS_static32x16pr_avx2.o htscodecs/htscodecs/rANS_static32x16pr_avx2.c gcc -Wall -g -O2 -fvisibility=hidden -mavx512f -I. -c -o htscodecs/htscodecs/rANS_static32x16pr_avx512.o htscodecs/htscodecs/rANS_static32x16pr_avx512.c gcc -Wall -g -O2 -fvisibility=hidden -mssse3 -mpopcnt -msse4.1 -I. -c -o htscodecs/htscodecs/rANS_static32x16pr_sse4.o htscodecs/htscodecs/rANS_static32x16pr_sse4.c gcc -Wall -g -O2 -fvisibility=hidden -I. -c -o htscodecs/htscodecs/rANS_static32x16pr.o htscodecs/htscodecs/rANS_static32x16pr.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 htscodecs/htscodecs/utils.o htscodecs/htscodecs/utils.c touch hts-object-files make[1]: Leaving directory '/home/joon95/macrozen/samtools-1.16/htslib-1.16' cd htslib-1.16 && make lib-static make[1]: Entering directory '/home/joon95/macrozen/samtools-1.16/htslib-1.16' 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_static32x16pr_avx2.o htscodecs/htscodecs/rANS_static32x16pr_avx512.o htscodecs/htscodecs/rANS_static32x16pr_sse4.o htscodecs/htscodecs/rANS_static32x16pr.o htscodecs/htscodecs/rANS_static.o htscodecs/htscodecs/rle.o htscodecs/htscodecs/tokenise_name3.o htscodecs/htscodecs/utils.o ranlib libhts.a make[1]: Leaving directory '/home/joon95/macrozen/samtools-1.16/htslib-1.16' gcc -L./lz4 -o samtools bam_aux.o bam_index.o bam_plcmd.o sam_view.o bam_fastq.o bam_cat.o bam_md.o bam_plbuf.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 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 bam_import.o bam_samples.o bam_consensus.o consensus_pileup.o reference.o ./lz4/lz4.o libst.a htslib-1.16/libhts.a -lpthread -lz -lm -lbz2 -llzma -lncursesw -lm -lz -lpthread gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o misc/ace2sam.o misc/ace2sam.c gcc -L./lz4 -o misc/ace2sam misc/ace2sam.o htslib-1.16/libhts.a -lpthread -lz -lm -lbz2 -llzma -lz gcc -Wall -g -O2 -DMAQ_LONGREADS -I. -Ihtslib-1.16 -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.16 -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.16 -I./lz4 -c -o misc/md5fa.o misc/md5fa.c gcc -L./lz4 -o misc/md5fa misc/md5fa.o htslib-1.16/libhts.a -lpthread -lz -lm -lbz2 -llzma -lz gcc -Wall -g -O2 -I. -Ihtslib-1.16 -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.16/libhts.a -lpthread -lz -lm -lbz2 -llzma -lz gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o misc/wgsim.o misc/wgsim.c gcc -L./lz4 -o misc/wgsim misc/wgsim.o -lm htslib-1.16/libhts.a -lpthread -lz -lm -lbz2 -llzma -lz gcc -Wall -g -O2 -I. -Ihtslib-1.16 -I./lz4 -c -o test/merge/test_bam_translate.o test/merge/test_bam_translate.c gcc -Wall -g -O2 -I. -Ihtslib-1.16 -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.16/libhts.a -lpthread -lz -lm -lbz2 -llzma -lz -lpthread gcc -Wall -g -O2 -I. -Ihtslib-1.16 -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.16/libhts.a -lpthread -lz -lm -lbz2 -llzma -lz -lpthread gcc -Wall -g -O2 -I. -Ihtslib-1.16 -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.16/libhts.a -lpthread -lz -lm -lbz2 -llzma -lz -lpthread gcc -Wall -g -O2 -I. -Ihtslib-1.16 -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.16/libhts.a -lpthread -lz -lm -lbz2 -llzma -lz -lpthread gcc -Wall -g -O2 -I. -Ihtslib-1.16 -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.16/libhts.a -lpthread -lz -lm -lbz2 -llzma -lz -lpthread gcc -Wall -g -O2 -I. -Ihtslib-1.16 -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.16/libhts.a -lpthread -lz -lm -lbz2 -llzma -lz -lpthread gcc -Wall -g -O2 -I. -Ihtslib-1.16 -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.16/libhts.a -lpthread -lz -lm -lbz2 -llzma -lz -lpthread gcc -Wall -g -O2 -I. -Ihtslib-1.16 -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.16/libhts.a -lpthread -lz -lm -lbz2 -llzma -lz -lpthread |
$ make install
더보기
mkdir -p -m 755 /home/joon95/macrozen/install/bin /home/joon95/macrozen/install/bin /home/joon95/macrozen/install/share/man/man1 install -p samtools /home/joon95/macrozen/install/bin install -p misc/ace2sam misc/maq2sam-long misc/maq2sam-short misc/md5fa misc/md5sum-lite misc/wgsim /home/joon95/macrozen/install/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 /home/joon95/macrozen/install/bin install -p -m 644 doc/samtools*.1 misc/wgsim.1 /home/joon95/macrozen/install/share/man/man1 |
실행파일 PATH를 설정해주자.
$ export PATH=/home/joon95/macrozen/install/bin:$PATH
명령어 실행
$ samtools
Program: samtools (Tools for alignments in the SAM format)
Version: 1.16 (using htslib 1.16)
Usage: samtools <command> [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
consensus produce a consensus Pileup/FASTA/FASTQ
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
import Converts FASTA or FASTQ files to SAM/BAM/CRAM
reference Generates a reference from aligned data
-- 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
head header viewer
tview text alignment viewer
view SAM<->BAM<->CRAM conversion
depad convert padded BAM to unpadded BAM
samples list the samples in a set of SAM/BAM/CRAM files
-- Misc
help [cmd] display this help message or help for [cmd]
version detailed version information
이제 samtools 명령어를 통해 유전자 데이터를 분석할 수 있다.
참고사이트
반응형
'엔지니어링 > 유전자' 카테고리의 다른 글
[유전자분석] samtools 유전자 데이터 컨트롤하기 (0) | 2022.09.05 |
---|---|
[유전자분석] bam 파일 (0) | 2022.09.05 |