scverse / scverse/PyDESeq2

Save / load `DeseqDataSet` states and write anndata to disk as h5ad

Open
#330 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
761
Forks
90
Avg merge
25m
Merged PRs (30d)
10

Description

Is your feature request related to a problem? Please describe.
#328 makes the DeseqDataSet class unpicklable due to decorated methods. This makes it harder to save results on disk.

Describe the solution you'd like
As suggested by @grst:

implement a .save() and (static) .load() method that saves the anndata as h5ad and the state of the model as pickle or any other > suited format.

The .load() should be able to restore the full state of the dds object, including the formulaic metadata ideally

Describe alternatives you've considered

Use the to_picklable_anndata() method introduced in #328, but this loses the dds state.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the DeseqDataSet save/load entry points and review the existing to_picklable_anndata() method from #328. Define how the AnnData is written as h5ad and how the model state is serialized; done means load() restores the full dds state, including formulaic metadata.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
bioinformatics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.