ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • [etc] BWA single end mapping (old fashioned)
    Bioinformatics solution/NGS GATK HaplotypeCaller 2018. 12. 1. 21:45
    728x90
    반응형
    SMALL

    우선 참조유전체(reference genome)이 있어야 하며, 이 fasta 파일의 indexing을 진행하여야 한다.


    준비물: reference fasta

    bwa index -a bwtsw [Ref fasta]


    한번 돌린적 있는 참조유전체는 아마 이미 indexing이 되어 있을 것이다.


    그럼 나의 FASTQ 종류를 보고 이제 맵핑 알고리즘을 정하자.!!!!!!


    BWA is a software package for mapping low-divergent sequences against a large reference genome, such as the human genome. It consists of three algorithms: BWA-backtrack, BWA-SW and BWA-MEM. The first algorithm is designed for Illumina sequence reads up to 100bp, while the rest two for longer sequences ranged from 70bp to 1Mbp. BWA-MEM and BWA-SW share similar features such as long-read support and split alignment, but BWA-MEM, which is the latest, is generally recommended for high-quality queries as it is faster and more accurate. BWA-MEM also has better performance than BWA-backtrack for 70-100bp Illumina reads.


    For all the algorithms, BWA first needs to construct the FM-index for the reference genome (theindex command). Alignment algorithms are invoked with different sub-commands: aln/samse/sampe for BWA-backtrack, bwasw for BWA-SW and mem for the BWA-MEM algorithm.


    위의 글은 BWA 홈페이지에 있는 내용이다.



    BWA MEM이 현대에 와서 가장 많이 쓰이게 된다. 주로 100 bp 이상의 FASTQ 분석에 유리하다. BWA ALN의 경우 single end 분석이 가능하다. 그래서 이번에는 single end mapping을 알려드리게 되었다.


    DDBJ나 EBI, SRA에서 fastq 받아서 분석해보면 100 bp single end의 경우에는 확실히 BWA ALN과 SAMSE를 이용해야 맵핑이 잘 된다. 하지만, 요즈음의 paired end의 경우에는 BWA MEM을 써야 GAP에 잘 대응할 수 있다. 


    논문을 보면 더 자세하게 파악 할 수 있다. 


    http://bio-bwa.sourceforge.net/bwa.shtml


    여기서 설명 봐도 되며, 다운 받아서 설치하자.


    설치 방법은 매우 단순하다.

    준비물
    fastq 파일 준비, 참조유전체(FASTA) 준비

    bwa aln -t [쓰레드] [참조유전체 fasta] [FASTQgz; 압축파일] > [sample name].sai

    bwa samse -r "@RG\tID:HWI\tSM:[샘플이름]\tPL:ILLUMINA\tLB:[기계]" [sample name].sai [참조유전체 fasta] [FASTQ.gz; 압축형태 이용가능] > [sample name].sam

    해당 실행은 매우 쉽다. 


    2줄 들어간다. 특색있는 sai 파일을 먼저 만든다.


    FASTQ의 경우에는 txt, gz 모두 다 가능하다.


    CPU가 충분하다면 thread를 10 줘라. BWA는 cpu 하나에 RAM을 많이 먹지는 않는다. 그래서 CPU 크기에 맞게 가득 thread를 주어라.


    그리고 -r 뒤에 read group 정보를 잘 주어라. 이게 Samtools 돌릴 때 많이 물어본다. 이거 안 넣으면 추후 과정에서 좀 뭔가 문제가 많아 GOOGLE에게 물어볼 일이 많아 진다.


    728x90
    반응형
    LIST

    댓글

Designed by Tistory.