scverse / scverse/PyDESeq2

Handling NaN counts

Open
#25 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Currently, PyDESeq2 throws an error when trying to initialise a DeseqDataSet with a count matrix that contains NaNs – this is to reproduce DESeq2's behaviour.

As pointed out by @arthurPignetOwkin, it seems like it would make sense to simply raise a warning instead and carry on with the analysis, and return NaNs for dispersions, LFCs, and p-values of genes that have NaN counts (as we already do for genes whose counts are all-zero).

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 DeseqDataSet initialization and trace the existing handling for genes whose counts are all-zero. Follow how dispersions, LFCs, and p-values are produced for those genes, then verify that NaN-count genes emit a warning, analysis continues, and those outputs are NaN.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
bioinformatics
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.