# 首先確定流程: # *.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啦:)