最近在做個乳腺癌的項目,用GATK call 變異后得到vcf店茶,需要做一些注釋鲫咽,就要用到annovar,
ANNOVAR支持三種不同形式的注釋: gene-based, region-based 和filter-based. 這三種注釋分別針對于每一個variant的不同方面:基于基因的注釋(gene-based annotation)揭示variant與已知基因直接的關(guān)系以及對其產(chǎn)生的功能性影響溃斋;基于區(qū)域的注釋(region-based annotation)揭示variant 與不同基因組特定段的關(guān)系界拦,例如:它是否落在已知的保守基因組區(qū)域;基于過濾子的注釋( filter-based annotation )則給出這個variant的一系列信息梗劫,如: population frequency in different populations 和various types of variant-deleteriousness prediction scores, 這些可被用來過濾掉一些公共的及 probably(大概,肯定的成分較大,是most likely) nondeleterious variants享甸。
1,annovar下載梳侨,http://www.openbioinformatics.org/annovar/annovar_download_form.php
還要注冊蛉威,填了郵箱,最新版的下載地址就會發(fā)送到郵箱走哺,就幾個perl程序和自帶的幾個簡單的database蚯嫌,下載很快的。
不過現(xiàn)在填寫的郵箱如果是以.com/.co 結(jié)尾的丙躏,都會被要求購買license后才能使用择示。sad!
ANNOVAR │ annotate_variation.pl #主程序,功能包括下載數(shù)據(jù)庫晒旅,三種不同的注釋
│ coding_change.pl #可用來推斷蛋白質(zhì)序列
│ convert2annovar.pl #將多種格式轉(zhuǎn)為.avinput的程序
│ retrieve_seq_from_fasta.pl #用于自行建立其他物種的轉(zhuǎn)錄本
│ table_annovar.pl #注釋程序栅盲,可一次性完成三種類型的注釋
│ variants_reduction.pl #可用來更靈活地定制過濾注釋流程
| ─example #存放示例文件
│─humandb #人類注釋數(shù)據(jù)庫
2,開始先將vcf文件轉(zhuǎn)化成avinput格式废恋,
perl convert2annovar.pl -format vcf4 example.vcf > example.avinput
3谈秫,用table_annovar.pl注釋'example.avinput'得到注釋文件 'example.hg19_multianno.txt',為什么用table_annovar?用the ‘table_annovar.pl’ 來注釋variants(可一次性完成三種類型的注釋)鱼鼓。允許在同一命令中用輸出的特定順序來對多個注釋類型進行自定義選擇(custom selection)拟烫。
輸入下列命令,用之前下載好的注釋數(shù)據(jù)庫來注釋vcf格式文件中的variants:
perl table_annovar.pl example.avinput humandb/ -buildver hg19 -out example -remove -protocol refGene,cytoBand,popfreq_all_20150413,dbnsfp33a,dbscsnv11,clinvar_20170905,intervar_20170202,cosmic82_coding,cosmic82_noncoding,icgc21,avsnp147 -operation g,r,f,f,f,f,f,f,f,f,f -nastring . -polish
# example.avinput 參考(refers to )輸入的vcf文件的名稱
# humandb/ 表示你前面下載的數(shù)據(jù)庫的絕對路徑(完整路徑)蚓哩、
# -buildver 后面接數(shù)據(jù)庫的bulid构灸,比如hg19/hg18/hg38
# -remove 表示把注釋過程中產(chǎn)生的中間文件在結(jié)束時刪除掉、
# -nastring . 表示沒有值的項用點來代替
# -out 選項是指定輸出文件的前綴,輸出到指定目錄時可以跟路徑+前綴。
# -vcfinput 表明輸入的是vcf文件喜颁,那么輸出文件也是vcf文件稠氮,否則只會生成一個txt文件
# -protocol 表示注釋使用的數(shù)據(jù)庫的準確名稱,多個用逗號隔開半开,且要注意順序
# -operation 表示對應(yīng)順序的數(shù)據(jù)庫的類型(g代表gene-based隔披、r代表region-based、f代表filter-based)寂拆,用逗號隔開奢米,注意順序
# -csvout 表示最后輸出.csv文件
關(guān)鍵步驟( CR ITICAL STEP):
1、確保注釋數(shù)據(jù)庫的名稱正確并且是按你想要在輸出文件中顯示的順序排列的纠永;
2鬓长、確保 ‘-operation’指定的注釋類型順序和‘-protocol’指定的數(shù)據(jù)庫順序是一致的;
3尝江、確保每個protocal名稱或注釋類型之間只有一個逗號涉波,并且沒有空白。
‘final.hg19_multianno.vcf’.輸出文件應(yīng)該是以個VCF格式文件炭序,INFO那列以 ‘key=value’ 形式啤覆、 ‘;’分割成幾個小區(qū)域. eg:‘Func.refGene=intronic;Gene.refGene=SAMD11’. 每個鍵值對代表一個ANNOVAR注釋信息。輸出文件可以用為VCF格式文件設(shè)計的基因分析軟件進一步處理惭聂。
‘final.hg19_multianno.txt’. 每一行代表一個variant 窗声。用tab分隔,多余列為加上的注釋信息辜纲,順序按 ‘--protocol’ 選項所設(shè)定的注釋類型argument笨觅。
這個時候發(fā)現(xiàn)命令里面的數(shù)據(jù)庫沒有下載下來,那就一一下載一下:
缺少的數(shù)據(jù)庫有:cytoBand侨歉,popfreq_all_20150413屋摇,dbnsfp33a,dbscsnv11,clinvar_20170905,intervar_20170202,cosmic82_coding,cosmic82_noncoding,icgc21,avsnp147,
下載使用的是annovar 的命令行方法:
perl annotate_variation.pl -buildver hg19 -downdb -webfrom annovar clinvar_20170905 humandb/
這里列出了如下命令可供下載的database:http://annovar.openbioinformatics.org/en/latest/user-guide/download/
也可以用avdblist參數(shù)查看幽邓,perl annotate_variation.pl -buildver hg19 -downdb avdblist -webfrom annovar ./
沒有的數(shù)據(jù)庫可以更換webfrom參數(shù):比如cytoBand炮温,就可以不用加 -webfrom 參數(shù),
perl annotate_variation.pl -buildver hg19 -downdb clinvar_20170905 humandb/
--downdb
download annotation databases from UCSC Genome Browser, Ensembl,
1000 Genomes Project, ANNOVAR website or other resources. The
annotation databases are required for functional annotation of
genetic variants.
--webfrom
specify the source of database (ucsc or annovar or URL) in the
downdb operation. By default, files from UCSC Genome Browser
annotation database will be downloaded.
也可以提供url下載牵舵,只要將網(wǎng)頁鏈接提供在-webfrom 參數(shù)后即可柒啤。
我覺得不好用的一點是,它沒有將下載失敗的原因告訴我們畸颅,我猜測是因為文件太大了担巩,5.3G,只好在瀏覽器上下載没炒。http://www.openbioinformatics.org/annovar/download/hg19_dbnsfp33a.txt.gz
公司網(wǎng)速受限涛癌,也下載了大半天,下載后解壓,將文件上傳到humandb中拳话。
還有個頭疼的數(shù)據(jù)庫:
http://annovar.openbioinformatics.org/en/latest/user-guide/filter/#cosmic-annotations
報錯:
Can't exec "annotate_variation.pl": Permission denied at $path/table_annovar.pl line 391.
還要改一下權(quán)限:
chmod 755 *.pl
最后重新注釋:
perl table_annovar.pl example.avinput humandb/ -buildver hg19 -out example -remove -protocol refGene,cytoBand,popfreq_all_20150413,dbnsfp33a,dbscsnv11,clinvar_20170905,intervar_20170202,cosmic82_coding,cosmic82_noncoding,icgc21,avsnp147 -operation g,r,f,f,f,f,f,f,f,f,f -nastring . -polish
比較大的幾個數(shù)據(jù)庫跑起來還挺慢的先匪。一天左右,全部跑完弃衍,
使用另外一個腳本variant_classifier1.0.py 得到變異的具體分類信息'result.txt'呀非,這個腳本也用到了一些數(shù)據(jù)庫:domain_brca.txt iso_brca.txt lof.genes mis_brca.txt nifty_brca.txt pathogenic_brca.txt,這些是自己準備的镜盯。將結(jié)果整合到一起:
python variant_classifier1.0.py example.hg19_multianno.txt pathogenic_brca.txt iso_brca.txt mis_brca.txt domain_brca.txt nifty_brca.txt lof.genes result.txt
最后岸裙,就算注釋了這么多的數(shù)據(jù)庫,到最后速缆,能看懂數(shù)據(jù)庫的又有誰呢降允,應(yīng)該寫一篇關(guān)于各種數(shù)據(jù)庫的文章。
使用annotate_variation.pl進行注釋:
Gene-based Annotation(基于基因的注釋)
基于基因的注釋(gene-based annotation)揭示variant與已知基因直接的關(guān)系以及對其產(chǎn)生的功能性影響激涤,需要使用 for gene-based 的數(shù)據(jù)庫拟糕。
perl annotate_variation.pl -geneanno -dbtype refGene -out ex1 -buildver hg19 ex1.avinput humandb/
geneanno 表示使用基于基因的注釋
# -dbtype refGene 表示使用"refGene"數(shù)據(jù)庫
# -out ex1 表示輸出文件以ex1為前綴
Region-based Annotation(基于區(qū)域的注釋)
基于過濾的注釋精確匹配查詢變異與數(shù)據(jù)庫中的記錄:如果它們有相同的染色體判呕,起始位置倦踢,結(jié)束位置,REF的等位基因和ALT的等位基因侠草,才能認為匹配辱挥。基于區(qū)域的注釋看起來更像一個區(qū)域的查詢(這個區(qū)域也可以是一個單一的位點)边涕,在一個數(shù)據(jù)庫中晤碘,它不在乎位置的精確匹配,它不在乎核苷酸的識別功蜓。
基于區(qū)域的注釋(region-based annotation)揭示variant與不同基因組特定段的關(guān)系园爷,例如:它是否落在已知的保守基因組區(qū)域∈胶常基于區(qū)域的注釋的數(shù)據(jù)庫一般由UCSC提供童社。
perl annotate_variation.pl -regionanno -buildver hg19 -dbtype cytoBand ex1.avinput humandb/
perl annotate_variation.pl -regionanno -buildver hg19 -dbtype gff3 -gff3dbfile tfbs.gff3 ex1.avinput humandb/
Filter-based Annotation(基于過濾的注釋)
filter-based和region-based主要的區(qū)別是,filter-based針對mutation(核苷酸的變化)而region-based針對染色體上的位置著隆。例如region-based比對chr1:1000-1000而filter-based比對chr1:1000-1000上的A->G扰楼。
基于過濾的注釋,使用不同的過濾數(shù)據(jù)庫美浦,可以給出這個variant的一系列信息弦赖。如在全基因組數(shù)據(jù)中的變異頻率,可使用1000g2015aug浦辨、kaviar_20150923等數(shù)據(jù)庫蹬竖;在全外顯組數(shù)據(jù)中的變異頻率,可使用exac03、esp6500siv2等币厕;在孤立的或者低代表人群中的變異頻率庆冕,可使用ajews等數(shù)據(jù)庫。(在ANNOVAR官方文檔中也有 詳細的介紹 )
最近持續(xù)修改更新中劈榨,有沒有什么問題呀访递?