cyvcf2
cyvcf2 copied to clipboard
Writing new values for FILTER field
Hi there,
I'd like to be able to write new values to the filter field as part of writing out a new VCF. But I get the following issue:
> vcf = cyvcf2.VCF("...")
> var = next(vcf)
> var.FILTER
'SOMECONTENT'
> var.FILTER = 'foo'
> var.FILTER
Segmentation fault
Any easy fix for this?
If it matters, I'm on version 0.20.4 .
Thanks!
did you add that filter to the header? (it still shouldn't segfault, but that might be a problem)
Ah, yep, that's the issue. No longer seg faults after adding the filter to the header.
Just to be clear, is the proper way to overwrite the filter var.FILTER = "filter_name"
and the proper way to add another filter var.FILTER += ";filter_name"
?