HGMD人类变异数据库ANNOVAR注释使用转换格式

HGMD人类变异数据库ANNOVAR注释使用

官方使用说明:http://resources.qiagenbioinformatics.com/tech-notes/HGMD_Tech_Note.pdf

但是我们需要转换一下,使ANNOVAR能够支持vcf批量注释,转换perl脚本如下:

perl ./prepare_hgmd.pl HGMD_PRO_2016.4_hg19.vcf hg19_HGMD_PRO_2016.4.txt




my ($dbfile) = $ARGV[0];
my ($outfile) = $ARGV[1];
open (FH, "perl /share/work/biosoft/annovar/2018Apr16/annovar/convert2annovar.pl -format vcf4 -include $dbfile |") or die "Error: cannot read from dbfile $dbfile: $!\n";
if ($outfile) {
open (OUT, ">$outfile") or die "Error: cannot write to output file: $!\n";
print OUT "#Chr\tStart\tEnd\tRef\tAlt\tHGMD\n";
}
while (<FH>) {
m/^#/ and next; 
s/[\r\n]+$//;
my @field  = split(/\t/, $_);

my$HGMD="HGMDID=$field[7];";


my$info="$HGMD$field[12]";
#$info=~ s/;/\\x3b/g;
#$info =~ s/,/\\x2c/g;
#$info=~ s/=/\\x3d/g;

print OUT join ("\t", @field[0..4], $info), "\n";
}
close OUT;


  • 发表于 2018-09-27 16:55
  • 阅读 ( 4616 )
  • 分类:软件工具

1 条评论

请先 登录 后评论
omicsgene
omicsgene

生物信息

658 篇文章

作家榜 »

  1. omicsgene 658 文章
  2. 安生水 328 文章
  3. Daitoue 167 文章
  4. 生物女学霸 120 文章
  5. 红橙子 78 文章
  6. CORNERSTONE 72 文章
  7. xun 68 文章
  8. rzx 67 文章