zoukankan      html  css  js  c++  java
  • manta生成的包含structural variants(SV)结构变异的注释vcf文件,通过染色体位置获得基因symbol名称

    
    # 首先确定流程:
    # *.vcf(包含起始位点,染色体)----> *.annotated.vcf(包含基因名称)
    
    # 通过流程可知:
    # 我们需要bed文件。因为bed文件包含:
    # 染色体序号,起,止位点,基因的symbol
    
    # 确定好流程之后,我们开始搜寻需要的资料。
    # 一个忠告:一定去Google上面搜索资料,百度经常搜不出来,也有不少错误
    
    # 创建虚拟环境
    conda create -n bcftools
    conda activate bcftools
    
    # 安装软件tabix和bcftools:
    conda install -c bioconda bcftools
    conda install -c bioconda tabix
    # 这时候直接敲bcftools,出现报错,说明还不能正常使用bcftools:
    # error while loading shared libraries: libbz2.so.1.0: cannot open shared object file: No such file or directory
    # .so文件是动态库文件,库包含的是程序运行需要的函数库,libbz2.so是bzip2的库文件,那么下载一个bzip不就有了嘛
    conda install -c conda-forge bzip2
    # 安装完成之后再敲bcftools,出现了该软件的说明文档
    # 解决!
    
    # 数据准备:
    bgzip /biodata/pipeline/TUMOR/yln-test/hg19.refGene.edited.bed    # tabix前的必须步骤
    tabix -pbed hg19.refGene.edited.bed.gz    # tabix为bed文件建立索引,搜寻更快
    bed=/biodata/pipeline/TUMOR/yln-test/hg19.refGene.edited.bed.gz        # 赋值
    bgzip /biodata/pipeline/TUMOR/yln-test/manta/results/variants/candidateSV.vcf    # bcftools要求是.vcf.gz文件
    vcf=/biodata/pipeline/TUMOR/yln-test/manta/results/variants/candidateSV.vcf.gz        # 赋值
    
    # 注释:
    bcftools annotate 
      -a ${bed} 
      -c CHROM,FROM,TO,GENE         # bed文件没有列名,要手动输入定义
      -h <(echo '##INFO=<ID=GENE,Number=1,Type=String,Description="Gene name">')         # 设置注释信息
      ${vcf}
    
    # 此时看看vcf文件info那一列是不是有基因的symbol啦:)
    May we all proceed with wisdom and grace. https://www.cnblogs.com/YlnChen/
  • 相关阅读:
    axis2的wsdl无法使用eclipse axis1插件来生成client--解决方法
    引用的存在价值
    阿里亲心小号实測
    UVA 1328
    XMPP 协议工作流程具体解释
    10g异机恢复后EM无法启动故障处理一例
    JVM 内存
    abstract class和interface有什么区别?
    ArrayList 如何增加大小
    IndexOutOfBoundsException ArrayList 访问越界
  • 原文地址:https://www.cnblogs.com/YlnChen/p/12712525.html
Copyright © 2011-2022 走看看