由於語法渲染問題而影響閱讀體驗, 請移步博客閱讀~
本文GitPage地址

SNP Calling: GATK

1. build bwa index

  1. bwa index genome.fna
  2. ##Exp:
  3. bwa index Apostichopus_japonicus.fna

2. reads Mapping

  1. bwa mem -t 4 -R '@RG\tID:foo\tPL:illumina\tSM:E.coli_K12' genome.fna reada_1.fq reads_2.fq | samtools view -Sb - > bwa.bam
  2. ##Exp:
  3. bwa mem -t 4 -R '@RG\tID:foo\tPL:illumina\tSM:E.coli_K12' Apostichopus_japonicus.fna SRR771602.fastq | samtools view -Sb - > AJ.bam

3. sort by samtools

  1. samtools sort bwa.bam -o bwa.sorted.bam > bwa.sorted.bam
  2. samtools faidx genome.fna
  3. ##Exp:
  4. samtools sort AJ.bam -o AJ.sorted.bam > AJ.sorted.bam
  5. ##Exp:
  6. samtools faidx Apostichopus_japonicus.fna

4. Maker PCR repeats

  1. gatk MarkDuplicates -I bwa.sorted.bam -O bwa.sorted.markdup.bam -M bwa.sorted.markdup_metrics.txt
  2. ##Exp:
  3. gatk MarkDuplicates -I AJ.sorted.bam -O AJ.sorted.markdup.bam -M AJ.sorted.markdup_metrics.txt
  4. samtools index bwa.sorted.markdup.bam

5. Prepare a dict file

  1. gatk CreateSequenceDictionary -R genome.fna -O genome.dict
  2. ##Exp:
  3. gatk CreateSequenceDictionary -R Apostichopus_japonicus.fna -O Apostichopus_japonicus.dict

6. Build intermidia file, gvcf file

  1. gatk HaplotypeCaller -R genome.fna --emit-ref-confidence GVCF -I bwa.sorted.markdup.bam -O bwa.g.vcf
  2. ##Exp:
  3. gatk HaplotypeCaller -R Apostichopus_japonicus.fna --emit-ref-confidence GVCF -I AJ.sorted.markdup.bam -O AJ.g.vcf

7. Finally

  1. gatk GenotypeGVCFs -R genome.fna -V bwa.g.vcf -O bwa.vcf
  2. ##Exp:
  3. gatk GenotypeGVCFs -R Apostichopus_japonicus.fna -V AJ.g.vcf -O AJ.vcf

Enjoy~

本文由Python腳本GitHub/語雀自動更新

由於語法渲染問題而影響閱讀體驗, 請移步博客閱讀~
本文GitPage地址

GitHub: Karobben
Blog:Karobben
BiliBili:史上最不正經的生物狗