From b5bce8d3f9daebef2567f44257102c7eb6aaaa74 Mon Sep 17 00:00:00 2001 From: Mark DePristo Date: Wed, 16 May 2012 20:33:46 -0400 Subject: [PATCH] AD should be UNBOUNDED, actually -- Pass in # alt alleles as appropriate for getCount in VCF header line --- .../sting/gatk/walkers/annotator/DepthPerAlleleBySample.java | 2 +- .../sting/utils/variantcontext/writer/BCF2Writer.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/DepthPerAlleleBySample.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/DepthPerAlleleBySample.java index 6b6648a98..4f4608a36 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/DepthPerAlleleBySample.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/annotator/DepthPerAlleleBySample.java @@ -151,7 +151,7 @@ public class DepthPerAlleleBySample extends GenotypeAnnotation implements Standa return Arrays.asList( new VCFFormatHeaderLine( getKeyNames().get(0), - VCFHeaderLineCount.A, + VCFHeaderLineCount.UNBOUNDED, VCFHeaderLineType.Integer, "Allelic depths for the ref and alt alleles in the order listed")); } diff --git a/public/java/src/org/broadinstitute/sting/utils/variantcontext/writer/BCF2Writer.java b/public/java/src/org/broadinstitute/sting/utils/variantcontext/writer/BCF2Writer.java index 7e0a2f524..adc6c5bad 100644 --- a/public/java/src/org/broadinstitute/sting/utils/variantcontext/writer/BCF2Writer.java +++ b/public/java/src/org/broadinstitute/sting/utils/variantcontext/writer/BCF2Writer.java @@ -221,7 +221,7 @@ class BCF2Writer extends IndexingVariantContextWriter { private final int getNGenotypeFieldValues(final String field, final VariantContext vc) { final VCFCompoundHeaderLine metaData = VariantContext.getMetaDataForField(header, field); - int nFields = metaData.getCount(vc.getNAlleles()); + int nFields = metaData.getCount(vc.getNAlleles() - 1); if ( nFields == -1 ) { // unbounded, need to look at values return computeMaxSizeOfGenotypeFieldFromValues(field, vc); } else {