美文网首页
centos7下CNVnator 安装和使用

centos7下CNVnator 安装和使用

作者: 树懒吃糖_ | 来源:发表于2021-10-11 16:23 被阅读0次

    CNVnator
    服务器:centos7

    1. CNVnator 安装过程
      GitHub - abyzovlab/CNVnator: a tool for CNV discovery and genotyping from depth-of-coverage by mapped reads
      从git 上下载源码安装过程中出现各种错误
      samtools 链接整个文件夹,如果缺少sam.h 或者sam.c ,直接去其他路径下拷贝过来,都是能够使用的
      root 下载和安装,这个不容易错
      hstlib 安装后,hstlib文件夹内还有一个htslib文件夹,需要的*.h 文件基本上都在的,可以全部复制过来

    因为后续还是报了找不到各种文件的错误,就放弃用源码安装了。

    conda可以一步安装成功的
    conda install -c bioconda cnvnator
    但是执行过程中ROOT会报错,root导入包报错,修改root 安装包里的<ROOT::Math::FitResult>,依然报错
    在后续的时候了解到是root版本的不匹配,或者多个版本,导致错误

    root各种文件下载:
    ROOT: math/mathcore/inc/Fit/FitResult.h Source File (cern.ch)

    例如错误:

    [dujl@master cnvnator]$ cnvnator -root file.root -call 1000 
    Error in <ROOT::Math::FitResult>: FitConfiguration and Minimizer result are not consistent
    Number of free parameters from FitConfig = 3
    Number of free parameters from Minimizer = 2
    Error in <ROOT::Math::FitResult>: FitConfiguration and Minimizer result are not consistent
    Number of free parameters from FitConfig = 3
    Number of free parameters from Minimizer = 2
    [dujl@master cnvnator]$ 
    
    

    conda 创建虚拟环境,重新下载cnvator,注意root版本为6.20,按照以下顺序安装(测试已经成功)

    安装命令行
    conda create -n cnvnator python=3.8    #创建cnvnator 虚拟环境
    conda install -c conda-forge root_base=6.20   #安装root 指定版本
    conda install -c conda-forge -c bioconda cnvnator   #安装cnvnator
    source activate cnvnator     #进入cnvnator 虚拟环境
    
    
    1. cnvnator分析命令行
    命令行
    cnvnator -root file.root -tree BPX21-023026FFPED750GT1_P750_gDNA.rmdup.sort.bam  -chrom 1  #选择1号染色体测试
    cnvnator -root file.root -his 1000 -fasta 1.fa
    cnvnator -root file.root -stat 1000
    cnvnator -root file.root -partition 1000
    cnvnator -root file.root -call 1000  > cnv.call.txt
    ~/Biosoftware/CNVnator/cnvnator2VCF.pl  cnv.call.txt genome >cnv.call.vcf   #转为vcf格式,这个perl脚本从GitHub上CNVnator下载
    
    分析完成后的文件夹
    (cnvnator) [dujl@master cnvnator]$ ll 
    total 1153448
    -rw-r--r--. 1 dujl samba 253105755 Oct  9 10:00 1.fa
    -rw-r--r--. 1 dujl samba 916953397 Oct  4 16:51 BPX21-023026FFPED750GT1_P750_gDNA.rmdup.sort.bam
    -rw-r--r--. 1 dujl samba   4818872 Oct  4 16:51 BPX21-023026FFPED750GT1_P750_gDNA.rmdup.sort.bam.bai
    -rw-r--r--. 1 dujl samba     41512 Oct 11 11:18 cnv.call.txt
    -rw-r--r--. 1 dujl samba     95360 Oct 11 12:35 cnv.call.vcf
    -rw-r--r--. 1 dujl samba       984 Oct 11 12:18 cnvnator.sh
    
    

    cnv.call.txt文件没有表名,每列依次为:
    CNV_type coordinates CNV_size normalized_RD e-val1 e-val2 e-val3 e-val4 q0

    cnv.call.txt 部分展示
    CNV_type    coordinates CNV_size    normalized_RD   e-val1  e-val2  e-val3  e-val4  q0
    duplication     chr1:5184001-6958000    1.774e+06       1.67425e+06     2.28272e-05     0       2.55988e-05     0       0.0128315
    deletion        chr1:6958001-7068000    110000  990512  0.0356524       2.21302e-24     0.121439        8.85199e-24     0
    duplication     chr1:7134001-7708000    574000  1.09496e+06     0       4.65726e-164    0       1.86289e-163    0.0283401
    deletion        chr1:7769001-7779000    10000   2.09421e+06     9991.85 2.80386e+06     26600.6 1.12153e+07     0
    duplication     chr1:7779001-7800000    21000   1.57455e+06     1399.46 1369.15 3056.16 5476.55 0
    deletion        chr1:7800001-7858000    58000   711020  528.686 9.96383e-09     1745.55 3.98549e-08     0
    duplication     chr1:7858001-7860000    2000    1.48479e+06     281234  7.17758e+08     1       1       0
    deletion        chr1:7860001-8002000    142000  998181  0.0397676       5.15346e-34     0.0833459       2.06136e-33     0
    duplication     chr1:8013001-14379000   6.366e+06       7.05773e+07     1.09653e-11     0       1.3423e-11      0       0.00126562
    deletion        chr1:14379001-14381000  2000    6.99059e+06     125017  0       1       1       0
    duplication     chr1:14381001-14384000  3000    2.17001e+06     165248  3.58881e+08     1       1       0
    
    
    1. 对于结果文件的一些思考
      如上第四列normalize_RD(矫正后的RD)感觉偏大很多
      Samtools depth 计算了chr1:5184001-6958000,平均深度约100左右

    cnvnator 矫正公式:


    image.png

    当样本是panel测序,以及测序深度不高时,normalize_RD异常的离谱。
    这种情况应该如何矫正?

    参考:
    conda三行cmd line极简装cnvnator攻略 – 小花花大世界 (floret.world)

    相关文章

      网友评论

          本文标题:centos7下CNVnator 安装和使用

          本文链接:https://www.haomeiwen.com/subject/ssexoltx.html