From 453d13415dab03a66e9f837ab43de55c7c8db196 Mon Sep 17 00:00:00 2001 From: asivache Date: Wed, 8 Apr 2009 01:57:27 +0000 Subject: [PATCH] count variant as biallelic if it's just a non-ref homogeneous site! git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@326 348d0f76-0448-11de-a6fe-93d51630548a --- .../sting/gatk/refdata/rodSAMPileup.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/rodSAMPileup.java b/java/src/org/broadinstitute/sting/gatk/refdata/rodSAMPileup.java index b81919a70..3a6823c19 100644 --- a/java/src/org/broadinstitute/sting/gatk/refdata/rodSAMPileup.java +++ b/java/src/org/broadinstitute/sting/gatk/refdata/rodSAMPileup.java @@ -112,9 +112,15 @@ public class rodSAMPileup extends ReferenceOrderedDatum implements AllelicVarian } if ( observedAlleles.get(0).charAt(0) == refBaseChar && observedAlleles.get(1).charAt(0) == refBaseChar ) varType = NO_VARIANT; else { + // we know that at least one allele is non-ref; + // if one is ref and the other is non-ref, or if both are non ref but they are the same (i.e. + // homozygous non-ref), we still have 2 allelic variants at the site (e.g. one ref and one nonref) varType = SNP_VARIANT; - if ( observedAlleles.get(0).charAt(0) == refBaseChar || observedAlleles.get(1).charAt(0) == refBaseChar ) nNonref = 1; - else nNonref = 2; + if ( observedAlleles.get(0).charAt(0) == refBaseChar || + observedAlleles.get(1).charAt(0) == refBaseChar || + observedAlleles.get(0) == observedAlleles.get(1) + ) nNonref = 1; + else nNonref = 2; // if both observations differ from ref and they are not equal to one another, then we get multiallelic site... } } } catch ( RuntimeException e ) {