저번 포스팅에 이어서 CNVkit 분석에 사용되는 중요 Command 및 option들에 대해 정리해보았다.
tool 설치가 아직 되지 않은 분들이 있다면 이전 포스팅을 참고하길 바란다.
CNVkit의 전체적인 Workflow
CNVkit의 전체적인 Workflow는 다음과 같으며 크게 3단계로 나눌 수 있다.
1. Target bins와 Off-target bins (.bed)를 생성하는 부분
2. normal sample을 이용하여 reference를 생성하는 부분
3. 실제 sample을 분석하여 Copy number를 계산하는 부분
매우 다행히도 우리는 각각의 단계를 실행하기 위해 command를 하나씩 치지 않아도 된다.
CNVkit에서 batch라는 명령어를 통하여서 3단계를 한번에 실행 할 수 있다.
CNVkit 중요 command 3가지
1. batch
CNVkit을 run하기 위해서는 input으로 BAM파일이 필요하다. (BAM파일은 FASTQ파일로 부터 reference에 mapping 하여 만들어진 압축된 바이너리 파일로 NGS데이터 분석에 주로 사용된다.)
위에서부터 차례대로
1) tumor/normal BAM 파일이 있을때, 2) 추가적인 reference sample이 존재할때 (-r 옵션) 3) 새로운 reference를 만들기 위해 사용하는 command이다. 이중에서 필요한 command를 골라서 사용하면 되는데 현재 tumor/normal 샘플이 존재하기 때문에 1번 command를 사용하였다.
# From baits and tumor/normal BAMs
cnvkit.py batch *Tumor.bam --normal *Normal.bam \
--targets my_baits.bed --annotate refFlat.txt \
--fasta hg19.fasta --access data/access-5kb-mappable.hg19.bed \
--output-reference my_reference.cnn --output-dir results/ \
--diagram --scatter
# Reusing a reference for additional samples
cnvkit.py batch *Tumor.bam -r Reference.cnn -d results/
# Reusing targets and antitargets to build a new reference, but no analysis
cnvkit.py batch -n *Normal.bam --output-reference new_reference.cnn \
-t my_targets.bed -a my_antitargets.bed \
-f hg19.fasta -g data/access-5kb-mappable.hg19.bed
위의 command를 좀 더 쉽게 설명하면 다음과 같다.
[python경로] [cnvkit경로] batch [bam파일 경로] --normal [normal.bam 경로] --targets [bed파일 경로] --f [reference 경로] -d [output 위치] --diagram --scatter
추가적인 옵션은 이 두개이며 결과를 그래프로 시각화 해준다. 만일 원하지 않으면 따로 써주지 않아도 된다.
--diagram : diagram을 그려주는 옵션
--scatter : scatter plot을 그려주는 옵션
이렇게 batch 명령어를 통하여 3단계를 거쳐 최종 결과가 -d 옵션에 써준 경로 아래에 결과파일이 생성된다.
2. target
target명령어를 사용하면 baited region의 BED 파일을 CNVkit이 사용할 수 있도록 준비해준다.
cnvkit.py target my_baits.bed --annotate refFlat.txt --split -o my_targets.bed
3. call
call 명령어를 사용하면 output을 다른 형식의 파일로 변환해준다. CNVkit은 .cns 파일을 결과로 출력해주기 때문에 다른 tool과 함께 사용하기 어렵다. 이를 주로 사용하는 형식인 .vcf로 바꿔줄 수 있다.
cnvkit.py call Sample.cns -y -v Sample.vcf -o Sample.call.cns
지금까지 CNVkit 주요 사용법 이었다!!
'Bioinformatics Issue' 카테고리의 다른 글
[BI]GATK HaplotyeCaller 사용해서 germline variant 확인하기 (1) | 2024.02.07 |
---|---|
HLA(Human Leukocyte Antigen)란 무엇인가? (0) | 2022.01.03 |
CNVkit을 이용한 CNV 분석:: 개념 및 설치방법 (0) | 2021.12.27 |
내가보려고하는 BI 개념정리:: Allele이란? (0) | 2021.07.23 |
[Coursera]3. From Implanted Patterns to Regulatory Motifs (0) | 2021.01.22 |