reference genome 설정
bowtie2-build reference_genome.fasta reference
reference genome의 fasta file을 넣고 변수명을 reference라고 지정
(변수명은 자유로 변경 가능)
aligniing reads(paired-end)
bowtie2 -x reference -1 fastq_file_1.fq -2 fastq_file_2.fq -S mapping_output.sam
-x: reference genome file
-1: first fastq file
-2: second fastq file
-S: output file을 sam file로 지정
paired-end면 보통 다운로드 받을 때 split된 형태로 _1.fq _2.fq 형태로 다운로드 되는데
그것을 순서대로 넣어주면 된다.
다양한 많은 parameter가 있지만 여기선 꼭 설정해줘야하는 기본만 서술하였다.
sam to bam
samtools view -bS output.sam > output.bam
align하는 코드와 함께 쓸 수도 있다.
sam file로 놔둬도 되지만 용량이 큰 관계로 binary file인 bam파일로 변환을 많이 한다.
sam은 우리가 읽을 수 있지만 bam은 읽을 수 없다는 큰 차이가 있다.
'Bioinformatics' 카테고리의 다른 글
[featureCounts] transcripts read counting 하기 (0) | 2022.10.02 |
---|---|
[Trim Galore] RNA-Seq data trimming (default option) (0) | 2022.10.02 |
bowtie2, trim_galore 반복문 (trimming & mapping for multiple sequence) (0) | 2022.09.27 |
RSeQC 설치 오류: pysam install error (python 3.8) (0) | 2022.09.22 |
[Linux] (ERR): Expected bowtie2 to be in same directory with bowtie2-align:/usr/local/bin/ 에러 (0) | 2022.09.19 |