scverse / scverse/PyDESeq2

[BUG] Errors saving `DeseqDataSet` to H5AD

Open
#254 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

When I attempt to save my DeseqDataSet AnnData object to H5AD, errors are thrown becuase

  1. dds.varm['replaced']
  2. dds.uns['trend_coeffs']

are stored as a pandas.core.series.Series, which cannot be written to H5AD in those positions. Calling

  1. dds.varm['replaced'] = dds.varm['replaced'].values
  2. dds.uns['trend_coeffs'] = dds.uns['trend_coeffs'].to_dict()

before dds.write_h5ad(<path>) resolved the issue without loss of functionality.

PyDESeq2 version 0.4.7 on CentOS 7.

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 by reproducing the failure with dds.write_h5ad(<path>) using the dds.varm['replaced'] and dds.uns['trend_coeffs'] values described in the report. Inspect the H5AD serialization path for these fields; done means the object saves successfully without manual conversions and retains its functionality.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
bioinformatics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.