if this.attributes is not null and was created from public VariantContextBuilder(final VariantContext parent) , as far as I can see this.attributes is unmodifieable.
I could write a PR but I don't really understand this attributesCanBeModified.
Thanks @lindenb. I think that this might be related to #1344. I'm adding your usecase as a test to check it. be happy to get your review on that PR if you're interested.
Subject of the issue
I got an exception with
VariantContextBuilder.putAttributes
: UnsupportedOperationExceptionin https://github.com/samtools/htsjdk/blob/master/src/main/java/htsjdk/variant/variantcontext/VariantContextBuilder.java#L273
if
this.attributes
is not null and was created frompublic VariantContextBuilder(final VariantContext parent)
, as far as I can seethis.attributes
is unmodifieable.I could write a PR but I don't really understand this
attributesCanBeModified
.Your environment