Genbank improvements
- Dominant language
- Go
- Stars
- 38
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Referencing https://github.com/bebop/poly/issues/434
@carreter is asking for a full rewrite there, but I think I disagree. Useful link to the [spec](https://www.ncbi.nlm.nih.gov/genbank/release/current/).
- Feature.GetSequence() always returns a nil error value [link](https://github.com/bebop/poly/issues/352) This should be fairly easy to fix, it is only referenced [once](https://github.com/Koeng101/dnadesign/blob/e16fc8e07f92eed82ff09bcd3d6edaddb1662bf8/lib/bio/genbank/genbank.go#L186-L211).
- Gff.AddFeature() code is misleading and mutates Feature state [link](https://github.com/bebop/poly/issues/342) This doesn't seem like that big of an issue. We can just do a deep copy of the feature and it should be fine.
- Common Genbank Feature.Type values should be enumerated [link](https://github.com/bebop/poly/issues/351) This should be pretty easy, just adding strings enums in a few places.
These are all nice improvements, but are all are actually kinda simple to implement. The first will take just a couple lines of changes with zero impact on functionality, the second just takes a copy, and the third is just adding some enums.
I do think a refactor could be in place: In particular, it might be easy to split the parseChecks into functions. I think there is MASSIVE room for improvement in the test suite as well - but honestly, the genbank parser works pretty darn good right now, so I am hesitant to spend the time on the 4th refactor when I could be using my time on better things. Will implement fixes to those 3 things though.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with lib/bio/genbank/genbank.go, especially the Feature.GetSequence() code around lines 186-211, then review the linked issues and GenBank specification. The work is done when GetSequence reports errors appropriately, Gff.AddFeature avoids mutating Feature state, and common Feature.Type values are represented by string enums; consider parseChecks splitting separately only if that refactor is still wanted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- bioinformatics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100