pollen icon indicating copy to clipboard operation
pollen copied to clipboard

Tracker: FlatGFA Python bindings

Open sampsyo opened this issue 1 year ago • 1 comments
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-ci command 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 str and not bytes? 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

sampsyo avatar May 14 '24 18:05 sampsyo

It's on PyPI (and therefore pip installable) now: https://pypi.org/project/flatgfa/

sampsyo avatar May 16 '24 16:05 sampsyo