Skip to content

Commit 771ea2e

Browse files
committed
Only turn lists into lists
1 parent 0908a75 commit 771ea2e

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/main/java/org/broadinstitute/hellbender/tools/walkers/GenotypeGVCFs.java

+9-2
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,15 @@ private GenotypesContext subsetAlleleSpecificFormatFields(final VCFHeader output
406406
Set<String> keys = g.getExtendedAttributes().keySet();
407407
for (final String key : keys) {
408408
final VCFFormatHeaderLine headerLine = outputHeader.getFormatHeaderLine(key);
409-
gb.attribute(key, ReferenceConfidenceVariantContextMerger.generateAnnotationValueVector(headerLine.getCountType(),
410-
GATKProtectedVariantContextUtils.attributeToList(g.getAnyAttribute(key)), relevantIndices));
409+
final Object attribute;
410+
if (headerLine.getCountType().equals(VCFHeaderLineCount.INTEGER) && headerLine.getCount() == 1) {
411+
attribute = g.getAnyAttribute(key);
412+
}
413+
else {
414+
attribute = ReferenceConfidenceVariantContextMerger.generateAnnotationValueVector(headerLine.getCountType(),
415+
GATKProtectedVariantContextUtils.attributeToList(g.getAnyAttribute(key)), relevantIndices);
416+
}
417+
gb.attribute(key, attribute);
411418
}
412419
newGTs.add(gb.make());
413420
}

0 commit comments

Comments
 (0)