Bioinformatics

[Bioinformatics] pipeline tool installation

rudgh99_algo 2024. 11. 17. 13:07

1. BWA2 ( reference seq에 mapping)

curl -L https://github.com/bwa-mem2/bwa-mem2/releases/download/v2.0pre2/bwa-mem2-2.0pre2_x64-linux.tar.bz2  | tar jxf -
cd bwa-mem2-2.0pre2_x64-linux
./bwa-mem2

위 코드를 차례대로 실행시키면 된다. 

 

2. GATK4 (variant calling)

wget https://github.com/broadinstitute/gatk/releases/download/4.2.0.0/gatk-4.2.0.0.zip
unzip gatk-4.2.0.0.zip

위 코드를 실행시켜 설치를 진행한다. 

이후, 설치가 제대로 되었는지 확인하기 위해서 아래 코드를 입력해 본다. 

java -jar gatk-package-4.2.0.0-local.jar

 

output : 

USAGE:  <program name> [-h]

Available Programs:
--------------------------------------------------------------------------------------
Base Calling:                                    Tools that process sequencing machine data, e.g. Illumina base calls, and detect sequencing level attributes, e.g. adapters
    CheckIlluminaDirectory (Picard)              Asserts the validity for specified Illumina basecalling data.  
    CollectIlluminaBasecallingMetrics (Picard)   Collects Illumina Basecalling metrics for a sequencing run. 
...

위와 같이 나오면, 제대로 설치된 것이다. 

 

3. samtools (duplicate mark)

http://www.htslib.org/download/

 

SAMtools/BCFtools/HTSlib - Downloads

Current releases SAMtools and BCFtools are distributed as individual packages. The code uses HTSlib internally, but these source packages contain their own copies of htslib so they can be built independently. HTSlib is also distributed as a separate packag

www.htslib.org

위 사이트에 들어가서 , 다운 링크를 복사한다. 이후, 자신의 os 환경에 설치한다. 

나의 os는 linux이기 때문에 아래 코드를 실행시켰다. 

wget https://github.com/samtools/samtools/releases/download/1.21/samtools-1.21.tar.bz2

 

이후, samtools-1.21.tar.bz2를 압축해제하자. 

tar xvf samtools-1.21.tar.bz2

 

이제 , samtools-1.21 폴더가 생성되었다. 

아래 코드를 이용해 설치를 완료하자 

sudo su 
./configure
## ./configure가 실행이 안될 시, error message에 필요한 패키지를 설치해야한다. 
나같은 경우는 5가지정도 추가로 설치했다.

error message가 더 이상 뜨지 않는다면 다음단계로 넘어가자. 

 

make를 설치해야 한다. 

# superuser로 사용중이라고 가정 
apt-get install make
make install
which samtools # 경로 확인 
samtools # 실행되는지 확인

 

실제로 사용해 보면 아래와 같은 이미지가 나온다. 

bam,bam.bai 파일이 있어야 한다. 

samtools tview bam파일

 

 

(선택) 4../bashrc에 추가 

samtools는 경로를 입력하지 않고, samtools만 입력해도 실행된다. 하지만, bwa와 gatk는 경로를 입력해 줘야 실행이 된다. 

경로를 입력하지 않고, 그냥 소프트웨어명만 입력하면 실행되도록 하고자 한다. 

vi ~/.bashrc 
export GATK4=/home/rudlab/projects/GenomeAnalysisTutorial/tool/gatk-4.2.0.0/gatk-package-4.2.0.0-local.jar
export BWA2=/home/rudlab/projects/GenomeAnalysisTutorial/tool/bwa-mem2-2.0pre2_x64-linux/bwa-mem2

. bashrc로 들어가 export~ 문을 작성해 준다. 

 

이후 : 을 누르고 wq를 입력한 다음 빠져나온다. 

source ~/.bashrc

위 코드를 입력해 준다. 

마지막으로, 실행이 되는지 확인해 보기 위해 아래 코드를 입력해 본다. 

echo $BWA2
echo $GATK4
$BWA2 
java -jar $GATK4