annovar 注释除人类以外的SNP


1. 准备文件:

  • ref.fa
  • ref.gtf或者gff3,最好是gtf3,可将gff3转化为gtf
  • sample.vcf

2. 用gff3ToGenePred与gtfToGenePred工具将gtf或gff3文件转化为reference_refGene.txt (软件来自http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/)

      gtfToGenePred.dms -genePredExt  ref.gtf SP_refGene.txt &

 

gtf:

SpoScf_00032 maker exon 12508 13665 . + . transcript_id "Spo06120"; gene_id "Spo06120";
SpoScf_00032 maker exon 14070 17062 . + . transcript_id "Spo06120"; gene_id "Spo06120";
SpoScf_00032 maker exon 17626 17899 . + . transcript_id "Spo06120"; gene_id "Spo06120";
SpoScf_00032 maker exon 17979 18066 . + . transcript_id "Spo06120"; gene_id "Spo06120";

 

3. 将ref.fa文件转化为SP_refGeneMrna.fa 

1 perl retrieve_seq_from_fasta.pl --format refGene --seqfile ref.fa SP_refGene.txt Sp_refGeneMrna.fa

4. 再将vcf文件转化为annovar格式

 1 perl convert2annovar.pl -includeinfo -allsample -withfreq -format vcf4 sample.VCF >sample.avinput
 2 
 3 
 4 
 5 
 6 ##
 7 --includeinfo: 输出文件含有特定额外的信息
 8 --allsample: 多样本的vcf,输出多个样本的结果
 9 --withfreq: 输出文件包含频率信息
10 --format: 输入文件格式

 

5. 用table_annovar.pl进行注释(可一次性完成三种类型的注释, 本次只有基于基因)

1 perl ../table_annovar.pl  test.avinput sp/ --buildver SP --outfile myanno --protocol refGene --operation g 
2 
3 ##参数
4 sp:    含有SP_refGeneMrna.fa和SP_refGene.txt文件夹
5 --buildver: 基因组建立的版本
6 --outfile: 输出文件前缀
7 --protocol: 逗号分隔的注释流程,代表库的名字
8 --operation: g(gene),r(region),f(filter)

最终得到两个注释文件文件和一个log文件exonic_variant_functionvariant_function

关注下方公众号可获得更多精彩

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM