From 8fb37f5f7a67d203bd3adb2ac2c00c4fd0e74d0f Mon Sep 17 00:00:00 2001 From: ebanks Date: Wed, 30 Jun 2010 13:56:16 +0000 Subject: [PATCH] For Kiran: warn the user when the actual and vcf ref bases differ so that if an exception is generated later, he knows why. All: should we generate the actual exception here? Is there any reason to allow cases where the vcf record has a different ref base than the actual reference? I'd vote that we die here. Thoughts? git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3680 348d0f76-0448-11de-a6fe-93d51630548a --- .../sting/gatk/refdata/VariantContextAdaptors.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/VariantContextAdaptors.java b/java/src/org/broadinstitute/sting/gatk/refdata/VariantContextAdaptors.java index dace443ad..2deb6b8e5 100755 --- a/java/src/org/broadinstitute/sting/gatk/refdata/VariantContextAdaptors.java +++ b/java/src/org/broadinstitute/sting/gatk/refdata/VariantContextAdaptors.java @@ -214,6 +214,8 @@ public class VariantContextAdaptors { // refAllele = Allele.create(vcf.getReference(), true); } else if ( !vcf.isIndel() ) { refAllele = Allele.create(ref.getBase(), true); + if ( (char)ref.getBase() != vcf.getReference().charAt(0) ) + System.err.println("\n*** WARN: The VCF reference base (" + vcf.getReference().charAt(0) + ") doesn't match the actual reference base (" + (char)ref.getBase() + "); there is a good chance this will generate an exception!"); } else if ( vcf.isDeletion() ) { int start = vcf.getPosition() - (int)ref.getWindow().getStart() + 1; int delLength = 0;