scverse / scverse/PyDESeq2

[Feature request] one vs. all others

Open
#168 8 comments 10 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

I'd like to be able to input a contrast design (or otherwise choose design factors), to do a one vs all comparison within in a particular "condition" that has more than two levels. If my column "condition" has levels A, B, C, and D, do a comparison of A vs B, C, D.

Something like these options in R deseq2:
design <- ~0 + condition
contrast = c(1, -1/3, -1/3, -1/3)
contrast=list(c("conditionA"),
c("conditionB","conditionC","conditionD"))

Would it be possible to do something where if you leave the second option blank in contrast, like:
contrast = ['condition', 'A', '']
it compares A with all other samples?

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 tracing how the existing contrast input is parsed and applied for multi-level conditions. Define the expected behavior for a blank second contrast option, including the A-versus-all-others example, then verify the resulting differential-expression output against the stated contrast semantics.

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.