AD should be UNBOUNDED, actually

-- Pass in # alt alleles as appropriate for getCount in VCF header line
This commit is contained in:
Mark DePristo 2012-05-16 20:33:46 -04:00
parent ac7460ef8c
commit b5bce8d3f9
2 changed files with 2 additions and 2 deletions

View File

@ -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"));
}

View File

@ -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 {