From 9298e132019b49785ca514ea80916151118bc9c8 Mon Sep 17 00:00:00 2001 From: andrewk Date: Mon, 1 Mar 2010 23:22:41 +0000 Subject: [PATCH] Make annotated VCF not be broken git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2906 348d0f76-0448-11de-a6fe-93d51630548a --- python/AnnotateVCFwithMAF.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/AnnotateVCFwithMAF.py b/python/AnnotateVCFwithMAF.py index 73ed2d52d..5ec01fbe8 100755 --- a/python/AnnotateVCFwithMAF.py +++ b/python/AnnotateVCFwithMAF.py @@ -53,6 +53,8 @@ if not header_fields.startswith("#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\t sys.exit() vcf_out_file.write("##source=AnnotateVCFwithMAF\n") +for header_field in headers: + vcf_out_file.write("##INFO="+header_field+",1,String,"+header_field+"\n") vcf_out_file.write(header_fields) for vcf_line, locus_and_info in zip(vcf_file.readlines(), loci_and_info): @@ -64,6 +66,6 @@ for vcf_line, locus_and_info in zip(vcf_file.readlines(), loci_and_info): print "ERROR: VCF and MAF loci did not match" sys.exit() - vcf_line_fields[7] = vcf_line_fields[7]+","+maf_info + vcf_line_fields[7] = vcf_line_fields[7]+";"+maf_info new_vcf_line = "\t".join(vcf_line_fields) vcf_out_file.write(new_vcf_line)