varscan2体细胞突变模块详解

varscan2 是我见过最好懂的找突变软件,官网的基本原理写的十分清晰,软件参数也很好懂,对我这种菜鸟选手十分友好。

简单使用

java -jar  VarScan.v2.3.9.jar somatic  normal_pileup  tumor_pileup  output
#会生成output.snp  output.indel两个文件,分布存储snp和indel

#如果要指定两个输出文件位置,不按照默认命名
java -jar  VarScan.v2.3.9.jar somatic  normal_pileup  tumor_pileup --output-snp  snp_file  --output-indel indel_file

具体流程

varscan呼叫体细胞突变过程中,是先分别对turm和norm样本,运行germline consensus calling,然后对两结果进行比较,因此首先得了解下germline consensus calling的流程

image.png

germline consensus calling中

一次解析一个碱基的堆积输入,统计最低映射质量(mapping quality)为1(此参数2.39版本已移除)的所有reads中,最低基本质量为(--min-avg-qual)的所有碱基。统计的合格碱基数大于等于(--min-coverage)时,VarScan 将检查观察到的每个等位基因,查看它是否:
满足最少数量的reads支持 [--min-reads2]
满足最小等位基因频率阈值 [--min-var-freq]
传递一个基本的链偏置过滤器(如果 --strand-filter 1)
费雪精确检验 p 值低于阈值(如果指定了 --p-value)
变异体被报告为杂合子,除非变异等位基因频率超过[--min-freq-for-hom]

相关参数
    --min-coverage  Minimum read depth at a position to make a call [8]
    --min-reads2    Minimum supporting reads at a position to call variants [2]
    --min-avg-qual  Minimum base quality at a position to count a read [15]
    --min-var-freq  Minimum variant allele frequency threshold [0.01]
    --min-freq-for-hom  Minimum frequency to call homozygote [0.75]
    --p-value   Default p-value threshold for calling variants [99e-02]
    --strand-filter Ignore variants with >90% support on one strand [1]
    --output-vcf    If set to 1, outputs in VCF format
    --vcf-sample-list   For VCF output, a list of sample names in order, one per line
    --variants  Report only variant (SNP/indel) positions [0]

再来看varscan的somatic参数

相关参数:
    --output-snp - Output file for SNP calls [output.snp]
    --output-indel - Output file for indel calls [output.indel]
    --min-coverage - Minimum coverage in normal and tumor to call variant [8]
    --min-coverage-normal - Minimum coverage in normal to call somatic [8]
    --min-coverage-tumor - Minimum coverage in tumor to call somatic [6]
    --min-var-freq - Minimum variant frequency to call a heterozygote [0.10]
    --min-freq-for-hom  Minimum frequency to call homozygote [0.75]
    --normal-purity - Estimated purity (non-tumor content) of normal sample [1.00]
    --tumor-purity - Estimated purity (tumor content) of tumor sample [1.00]
    --p-value - P-value threshold to call a heterozygote [0.99]
    --somatic-p-value - P-value threshold to call a somatic site [0.05]
    --strand-filter - If set to 1, removes variants with >90% strand bias [0]
    --validation - If set to 1, outputs all compared positions even if non-variant
    --output-vcf - If set to 1, output VCF instead of VarScan native format

实际上比起germline consensus calling的参数,只是多了一个--somatic-p-value,作为肿瘤样本与普通样本之间视作差异显著的阈值。再回头看varscan的somatic流程,就很好理解。

再简单说说Fisher's 精确检验

假设norm样本与tum样本,在某位点不存在有显著区别,给定数据集



计算公式为



p≈0.001346(<0.05),拒绝零假设,即这两个位点存在显著差异。
总的来说,当p阈值(一般0.05)越大,零假设越容易被拒绝,灵敏度越高,越容易出现假阳性。

一些贴士与胡思乱想

varscan需要配合samtools使用,先用samtool做堆积文件,或者用官网的bash -c 整文件流, samtool一些参数可见samtools mpileup使用
varscan 官网建议使用 -B disable BAQ (per-Base Alignment Quality)


按照维基百科的说法,Fisher's 精确检验并不局限与2*2列联表,而可以扩展到m*n列,只是没法手工计算(我也不知道怎么算...)。不会java,没看varscan源码,我推测其内部用Fisher's 精确检验时,可能是4*2列联表,比如:

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容