diff --git a/src/main/java/com/github/discvrseq/walkers/ExtendedFuncotator.java b/src/main/java/com/github/discvrseq/walkers/ExtendedFuncotator.java index 459fcda5..36455792 100644 --- a/src/main/java/com/github/discvrseq/walkers/ExtendedFuncotator.java +++ b/src/main/java/com/github/discvrseq/walkers/ExtendedFuncotator.java @@ -300,7 +300,8 @@ public void write(final VariantContext variant, final FuncotationMap txToFuncota if (toAdd.size() > 1) { throw new GATKException("Expected a one set of values per site for annotation: " + vd.sourceField + ". Problem at site: " + variant.toStringWithoutGenotypes()); } - if (!toAdd.get(0).isEmpty()) { + + if (!toAdd.isEmpty() && !toAdd.get(0).isEmpty()) { String val = toAdd.get(0).stream().filter(x -> !x.isEmpty()).collect(Collectors.joining(",")); if (!val.isEmpty()) { variantContextOutputBuilder.attribute(vd.id, val);