pollen
pollen copied to clipboard
Tracker: FlatGFA Python bindings
trafficstars
Here's just a snapshot of some next steps for the Python bindings.
Project infrastructure:
- [x] CI. #178 added some tests; they should run in GitHub actions. Maturin has a
generate-cicommand that should help with this. #180 - [x] Build docs. Just like we have auto-published Sphinx docs for mygfa, let's do the same for the FlatGFA module. https://github.com/cucapra/pollen/pull/181
- [x] Expand/improve docs: at least divide into a few top-level sections. #182
- [x] Publish on PyPI. I believe Maturin/Actions can help with this too.
API "surface area":
- [ ] Mutation. Let's make it possible to build up a graph from scratch.
- [ ] Expose the ops. Things that are currently CLI subcommands (in
cmds.rs) should be put into a library of useful "ops" on the GFA data structure. This way, you can string together multiple operations in a Python invocation. In the limit, maybe we can reproduce odgi pipelines from our collaborators as Python scripts.
Python niceties:
- [x] The various objects should probably be made equatable/hashable. #183
- [x] Use
str(obj)on paths, links, steps, etc. to produce GFA string fragments. #183 - [x] Names (of paths) should probably by
strand notbytes? Seems fine to assume these are UTF-8. Nucleotide sequences can stay bytes. #183 - [x] Add typing hints. These would be especially helpful for the docs. #182
It's on PyPI (and therefore pip installable) now: https://pypi.org/project/flatgfa/