Skip to content

Saving setup_reference output as h5ad file #4

Description

@robinfallegger

Hi @earmingol !

It's awesome to have a fast implementation of DOT in python!

I'm running the deconvolution in parallel across many samples, and needed a way to save the output of setup_reference across different runs (and projects!). While building that I ended up with a small bundle of related changes:

  • A dot.io module with save_reference/load_reference (plus the underlying dict↔AnnData conversion helpers), so setup_reference()'s output can be written to .h5ad and reloaded.
  • DOT() now also accepts that AnnData directly for ref, not just the dict
  • Along the way I reorganized the public API into dot.pp/dot.tl/dot.pl namespaces, matching the scanpy/scverse convention (e.g. dot.pp.setup_reference, dot.tl.DOT). The old flat imports (from dotpy import DOT) still work too — no breaking changes here, just a DeprecationWarning nudging toward the namespaced form

Let me know if this sounds useful and I'll open a PR. I am also happy to adjust direction on any of it first.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions