Annovar 对变异检测结果snp vcf文件进行注释
本文最后更新于 508 天前,如有失效请评论区留言。

2024年2月25日

Step0_Annovar_install

##  annovar官方网站的的下载需要使用邮箱注册后才可下载
# http://download.openbioinformatics.org/annovar_download_form.php

## annovar 安装
cd /public1/guop/mawx/software/
wget http://www.openbioinformatics.org/annovar/download/0wgxR2rIVP/annovar.latest.tar.gz
tar -zxvf annovar.latest.tar.gz


## 安装注释文件格式转换工具 gffread gff3ToGenePred gtfToGenePred
conda create -n gffread
conda activate gffread
conda install -c bioconda gffread

conda create -n ucsc
conda activate ucsc
conda install bioconda::ucsc-gff3togenepred
conda install bioconda::ucsc-gtftogenepred

## 添加环境变量 export PATH
vi ~/.bashrc    
export PATH=/public1/guop/mawx/software/annovar:$PATH 
export PATH=~/anaconda2/envs/ucsc/bin/:$PATH
source ~/.bashrc

Step1.Prepare_genome

##  gff格式转gtf格式
gffread  genes.gff  -T -o genes.gtf

gtfToGenePred  -genePredExt genes.gtf genes_refGene.txt

# gff3ToGenePred  Of.genome.gff3  Of.genome_refGene.txt
# gff3文件开头必须是##gff-version 3

retrieve_seq_from_fasta.pl --format refGene --seqfile sequences.fa  genes_refGene.txt --out genes_refGeneMrna.fa

Step2.AllSNP_annovar

## 生成表格格式输入文件
convert2annovar.pl -format vcf4 -allsample -withfreq  Ref.gatk_raw.snp.vqsr.filter.vcf > Ref.gatk_raw.snp.vqsr.filter.vcf.annovar.input

## 删除Contig行(非染色体行)
#grep -v "^Contig"  Ref.gatk_raw.snp.vqsr.filter.vcf.annovar.input > Ref.gatk_raw.snp.vqsr.filter.vcf_noContig.annovar.input

## 进行变异注释 (如果需要所有信息,添加-separate)
annotate_variation.pl -geneanno --neargene 2000 -buildver  genes -dbtype refGene -outfile AllSNP.annovar -exonsort Ref.gatk_raw.snp.vqsr.filter.vcf.annovar.input  ./

Step3.不同变异类型snp位点数量统计

##   统计每种类型(突变位置)SNP的数量
cat AllSNP.annovar.variant_function | cut -f 1 | sed 's/;/\n/g' | sort | uniq -c
 259756 downstream
 162890 exonic
2949809 intergenic
 199151 intronic
   1055 splicing
 306004 upstream
  27386 UTR3
  18644 UTR5


##   统计外显子区域不同突变类型SNP的数量
cat AllSNP.annovar.exonic_variant_function | awk '{print $2}' | sort | uniq -c
  93389 nonsynonymous
   3650 stopgain
    371 stoploss
  65480 synonymous
版权声明:除特殊说明,博客文章均为Vensin原创,依据CC BY-SA 4.0许可证进行授权,转载请附上出处链接及本声明。 如有需要,请至学习地图系统学习本博客的教程。 | 博客订阅:RSS | 广告招租:留言板 | 博客 |

评论

  1. 马文鑫
    1 年前
    2024-2-27 20:44:21

    Hi~我正在使用联想乐云给你分享文件。点击 https://lecloud.lenovo.com/share/5M7gCHUsDgUgNHQhh 即可访问

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇
# # #