일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- DataFrame
- js
- EdgeR
- drug development
- CSS
- python matplotlib
- javascript
- Git
- scRNAseq
- HTML
- Batch effect
- PYTHON
- scRNAseq analysis
- Bioinformatics
- cellranger
- github
- 비타민 C
- single cell
- single cell rnaseq
- CUTandRUN
- matplotlib
- ChIPseq
- drug muggers
- 싱글셀 분석
- julia
- CUT&RUN
- MACS2
- pandas
- single cell analysis
- ngs
- Today
- Total
바이오 대표
[ samtools ] fastq --> bam (unaligned) 본문
samtools 는 sequencing data를 다룰 때 흔히 사용되는 software package 이다. 보통 SAM (sequence alignment/map), BAM, CRAM 파일에서 alignments를 다루기 위해 사용된다. 흔히 사용되는 기능은 다음과 같다.
- converting format (파일 형태를 SAM, BAM, CRAM 등으로)
- sorting (순서정렬)
- merging (합치기)
- indexing (인덱싱)
- retrieve reads (검색)
Samtools Install
Homebrew 를 이용해서 쉽게 install 할 수 있다.
$ brew install samtools
!! 만약 당신이 맥북 M1 chip user 이라면 문제가 좀 복잡해진다.
2022.01.22 - [Extra] - [ M1 chip ] Homebrew 설치 (wget)
[ M1 chip ] Homebrew 설치 (wget)
Intel 을 사용할때는 아무 문제가 없었던 brew가 되지 않는다,,, M1 chip으로 바꾸니 역시 생기는 문제들 (부들) $ brew install wget Error: Cannot install in Homebrew on ARM processor in Intel default p..
joyful-ugentstudent-note.tistory.com
해당 게시물처럼 M1 chip 을 위한 Rosetta2 emulator 와 homebrew를 다시 설치해주고 samtools 를 install 해야한다.
$ arch -x86_64 brew install samtools
Samtools (fastq --> bam)
# fastq
해당 파일은 4 lines 으로 [1] sequence identifier [2] sequence (A,C,T,G,(N)) [3] + (seperator) [4] base call quality score (using ASCII characters) 정보를 담고 있다.
# fastq --> bam (unaligned)
$ samtools import input.fastq > output.bam
보통 SAM/ BAM file은 aligned (or mapping) 된 파일을 칭하는데, unaligned bam 파일로 변형하여 header 을 이용해 sample meta-data를 트랙킹하거나, auxiliary tags를 이용해 per-read meta-data를 알아낼 수 있다.
http://www.htslib.org/doc/samtools.html 에서 더 많은 기능들을 쉽게 찾아볼 수 있다.
samtools(1) manual page
Manual page from samtools-1.14 released on 22 October 2021 samtools – Utilities for the Sequence Alignment/Map (SAM) format samtools view -bt ref_list.txt -o aln.bam aln.sam.gz samtools tview aln.sorted.bam ref.fasta samtools quickcheck in1.bam in2.cram
www.htslib.org
'Bioinformatics' 카테고리의 다른 글
[MACS2] Peak calling with MACS2 (1) | 2022.10.03 |
---|---|
[ Bioinformatics ] VCF (variant call format) 파일 (0) | 2022.03.28 |