【Workflows】 WGS/WES Mapping to Variant Calls
阅读原文时间:2023年07月10日阅读:2

htslib官网上给的一个WGS/WES的流程。关于htslib、samtools和bcftools之间的关系,可以在sanger官网查看其解释:

HTSlib is a software library for manipulating various sequencing and variant file formats: SAM, BAM, CRAM, VCF, and BCF. SAMtools and BCFtools are applications built around HTSlib, performing format conversion, file merging and splitting, sorting, variant calling, and much more.

workflow主要三步骤:

  • Mapping

  • Improvement

  • Variant Calling

    bwa index
    bwa mem -R '@RG\tID:foo\tSM:bar\tLB:library1' > lane.sam #官方给的,我认为是read1.fq和read2.fq
    samtools fixmate -O bam
    samtools sort -O bam -o -T

    realign gapped alignment

    java -Xmx2g -jar GenomeAnalysisTK.jar -T RealignerTargetCreator -R -I -o --known
    java -Xmx4g -jar GenomeAnalysisTK.jar -T IndelRealigner -R -I -targetIntervals --known -o

    BQSR

    ava -Xmx4g -jar GenomeAnalysisTK.jar -T BaseRecalibrator -R -knownSites >bundle/b38/dbsnp_142.b38.vcf> -I -o
    java -Xmx2g -jar GenomeAnalysisTK.jar -T PrintReads -R -I --BSQR -o

    #MarkDuplicates
    java -Xmx2g -jar MarkDuplicates.jar VALIDATION_STRINGENCY=LENIENT INPUT= INPUT= INPUT= OUTPUT=

    samtools merge
    samtools index

    realign your INDELS(可选)

    java -Xmx2g -jar GenomeAnalysisTK.jar -T RealignerTargetCreator -R -I -o --known >bundle/b38/Mills1000G.b38.vcf>
    java -Xmx4g -jar GenomeAnalysisTK.jar -T IndelRealigner -R -I -targetIntervals --known >bundle/b38/Mills1000G.b38.vcf> -o

    samtools index

    bcftools mpileup -Ou -f | bcftools call -vmO z -o

    exam bcf(可选)

    bcftools mpileup -Ob -o -f
    bcftools call -vmO z -o

    tabix -p vcf

    bcftools stats -F -s - >
    mkdir plots
    plot-vcfstats -p plots/

    bcftools filter -O z -o -s LOWQUAL -i'%QUAL>10'

手机扫一扫

移动阅读更方便

阿里云服务器
腾讯云服务器
七牛云服务器

你可能感兴趣的文章