Open carreter opened 11 months ago
I think I talked to @TimothyStiles about this one, and basically - yea its both a problem here AND in genbank
. It'd probably be easiest to fix from #339 branch, so the merge will be easier. 100% we should make this better!
I'll wait until you merge #339 then do this.
This comment was automatically written by the Blocking Issues bot, and this PR will be monitored for further progress.
This issue has had no activity in the past 2 months. Marking as stale
.
This issue has had no activity in the past 2 months. Marking as stale
.
Gff.AddFeature()
seems to intend to create a copy of theFeature
it is provided. Dereferencing the pointer is not sufficient to do this, asFeature
structs contain mutable fields (e.g.Feature.Attribtues
is amap[string]string
, andFeature.Location
is a struct that has a slice field in it).https://github.com/TimothyStiles/poly/blob/ad662c741528bbb5bcaa7a3107991a86426c1e55/io/gff/gff.go#L78-L84
IMO, the
Feature.ParentSequence
field should be dropped entirely. Currently, it is only used bygetFeatureSequence
, which could easily be modified to be a method of theGff
struct. This makes more sense asFeature
s andLocation
s only exist in the context of aGff
anyway.This also means that the
Gff.AddFeature()
method can be entirely dropped in favor of directly appending it toGff.Features
.It's a small change, so I'm more than happy to do this once given the go-ahead!
Blocked by #339 .