brentp / vcfgo

a golang library to read, write and manipulate files in the variant call format.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hidden fields on Variant type

tmc opened this issue · comments

It's not possible to define literals of type *vcfgo.Variant because of the unexported field here:
https://github.com/brentp/vcfgo/blob/master/variant.go#L26

Is this an intentional design decision?

You should still be able to construct a literal with samples by setting the Samples attribute to a slice of your *SampleGenotypes, no?
There should probably be a NewSampleGenotype() constructor, but I think it should be fine.

That said, I only use the variant as constructed via vcfgo.Reader, so I might be missing something.