annovar简介
在我们做重测序,或者比较基因组学分析的时候,我们往往在call snp或者indel的时候,需要对我们的变异位点进行注释,而annovar官网提供的注释库往往是人类的居多,但是我们所研究的物种却不仅限于人类。那么annovar就不可以使用了吗?,显然不是,我们可以利用annovar进行自建库注释。个人感觉GATK自建数据库比snpEff要容易上手一些。
ANNOVAR
│ annotate_variation.pl #主程序,功能包括下载数据库,三种不同的注释
│ coding_change.pl #可用来推断蛋白质序列
│ convert2annovar.pl #将多种格式转为.avinput的程序
│ retrieve_seq_from_fasta.pl #用于自行建立其他物种的转录本
│ table_annovar.pl #注释程序,可一次性完成三种类型的注释
│ variants_reduction.pl #可用来更灵活地定制过滤注释流程
├─example #存放示例文件
└─humandb #人类注释数据库
流程
1、构建自定义数据库
gffread #gff3 to gtf
gtfToGenePred #gtf to genePred
#转换gff3 2 gtf
gffread genome.gff -T -o genome.gtf
# -o write the output records into <outfile> instead of stdout
#-T main output will be GTF instead of GFF3
#转换gtf 2 GenePred
gtfToGenePred -genePredExt genome.gtf genome_refGene.txt
#建立注释库
perl annovar/retrieve_seq_from_fasta.pl --format refGene --seqfile genome.fa genome_refGene.txt --out genome_refGeneMrna.fa
完成上述三部获得两个重要的文件
genome_refGeneMrna.fa
genome_refGene.txt
注意:这两个文件肯定不能随便命名,不然annovar无法识别!
把这两个文件放到一起,命名文件夹为genome,后面会用到
前缀genome就是下面build参数使用的名字,下面注释就要使用“-build geonme”这个参数。
2.转换需要注释的vcf文件
DL_1.vcf是HaplotypeCaller得到的vcf文件,需要转换成适用annovar的文件格式,执行命令
perl ../convert2annovar.pl -format vcf4 DL_1.vcf > DL_1.avinput
那么DL_1.avinput就是我们需要注释的文件
3. annotate_variation注释
用annotate_variation.pl进行基于基因(gene-based annotation)的注释,
perl ~/bio_software/annovar/annotate_variation.pl -geneanno -dbtype refGene -out GG_1.avinput -build genome GG_1.avinput ./genome
# -geneanno 表示使用基于基因的注释
# -dbtype refGene 表示使用"refGene"类型的数据库
# -out DL_1 表示输出以DL_1为前缀的结果文件
得到结果文件:
DL_1.exonic_variant_function #外显子区域突变的功能、类型等
DL_1.variant_function#突变的基因及位置
DL_1.log#日志文件
感谢!!!
https://www.baishujun.com/archives/7476.html
https://www.jianshu.com/p/0a334228377c
https://www.jianshu.com/p/469199f523ee