리눅스 기초 #10 GATK calling을 사용하기 위하여, reference file indexing하는 방법

 

GATK를 이용하여 돌연변이를 callilng하기 위해서는 indexing 작업이 필수적임

(대용량의 데이터를 처리하기 간편하게 위해서라고 생각하면 됨)


#1) .fai파일 형성하기

samtools faidx ~[reference file을 보관한 경로]


예제는 전체 fasta file를 하기에는 시간상, chromosome 1을 대상으로 진행하겠음.

samtools faidx ~/Desktop/demo/supporting_files/hg38_re/chr1.fa


위의 명령어가 제대로 되었다면, chr1.fa.fai 파일이 형성됨.




----------------------------------------------------------------------------------------------------

#2) .dict file 형성하기

GATK를 이용하여 진행할 것이므로 아래와 같이 GATK를 다운 받은 곳을 기반으로 경로 설정이 진행되어야 함.


alias gatk ~[GATK을 다운받아서 unzip한 파일의 경로]


예)

alias gatk="/home/sj/Downloads/gatk-4.3.0.0/gatk"


JAVA 명령어를 이용하여, local.jar file과 spark.jar file를 활성화함.

java -jar ~[GATK보관경로]/gatk-package-[버전이름].local.jar

위와 같이 활성화


아래도 똑같이 진행

java -jar ~[GATK보관경로]/gatk-package-[버전이름].spark.jar


dictionary file 만드는 명령어

gatk CreateSequenceDictionary R=[reference file 경로] O=[.dict 생성될 경로]

(o의 의미는 output)


위와 같이 끝나고 나면 chr1.dict file 생성됨 (생성된 것 확인할 것)




예)

gatk CreateSequenceDictionary R=~/Desktop/demo/supporting_files/hg38_re/chr1.fa O=~/ Desktop/demo/supporting_files/hg38_re/chr1.dict











댓글

이 블로그의 인기 게시물

#single cell sequencing 기초 분석 - #1 R 설치 및 package 설치