Skip to content

feat!: rebuild py-ft as a pure-python toolkit over pysam + pyMA#119

Open
cademirch wants to merge 2 commits into
sync-ma-python-rustfrom
pyft-pure-python
Open

feat!: rebuild py-ft as a pure-python toolkit over pysam + pyMA#119
cademirch wants to merge 2 commits into
sync-ma-python-rustfrom
pyft-pure-python

Conversation

@cademirch

Copy link
Copy Markdown
Contributor

Drops the Rust/pyo3 bindings (Fiberbam, Fiberdata, Fiberwriter, center) and the maturin build. py-ft is now plain Python: Fiberdata wraps a pysam record's molecular_annotation and exposes the fiber-seq accessors (m6a, cpg, nuc, msp, fire) over iter_type. Plotting moves to an optional [viz] extra.

region_to_* and the fiberplot CLI are gone now. These are not currently implemented but can be if we decide this is the right direction for py-ft.

This depends on #118

@cademirch
cademirch requested a review from mrvollger July 21, 2026 19:56
Drops the Rust/pyo3 bindings (Fiberbam, Fiberdata, Fiberwriter, center) and the
maturin build. py-ft is now plain Python: Fiberdata wraps a pysam record's
molecular_annotation and exposes the fiber-seq accessors (m6a, cpg, nuc, msp,
fire) over iter_type. fetch() iterates mapped and unmapped reads (so unaligned
fiber-seq BAMs work), and Fiberdata.is_mapped lets callers filter. Plotting
moves to an optional [viz] extra.

region_to_* and the fiberplot CLI, which drove the old Rust Fiberbam, are
stubbed with NotImplementedError until they're ported to fetch(); plot.py is
unchanged. Adds a root release workflow for py-ft (py-ft-v* tags) using PyPI
trusted publishing; the pyMA release workflow lives with the pyMA changes.
The docs still built the old Rust/maturin package (rust toolchain + compiling
the crate), which is why the Read the Docs build failed. py-ft is pure Python
now, so:

- .readthedocs.yaml drops rust/cmake; installing the package just pulls pysam +
  molecular-annotation from PyPI so autodoc can import pyft.
- conf.py builds without nbsphinx; api.rst documents pyft.fiberdata via autodoc
  (Napoleon for the Google-style docstrings).
- add __version__ to the package (conf.py reads it).
- replace the old Fiberbam notebooks with a quickstart vignette on fetch() and
  the Fiberdata accessors; refresh index.rst.
@mrvollger

Copy link
Copy Markdown
Member

Lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants