PyDESeq2 icon indicating copy to clipboard operation
PyDESeq2 copied to clipboard

Support for arbitratry design matrices and contrast vectors

Open grst opened this issue 8 months ago • 5 comments

Is your feature request related to a problem? Please describe. Most linear models support passing designs as design matrices and contrasts as contrast vectors. This is the "smallest common denominator" for specifying designs and it's useful

  • for more complex designs and comparisons that aren't covered by a simple [column, baseline, treatment] triplet
  • for writing wrapper functions (e.g. multi-condition-comparisions) that use PyDESeq2 as one of multiple backends and already deal with building model matrices and contrast vectors from more user-friendly input such as formulae.

Describe the solution you'd like

  • DeSeqDataset should take a design matrix
  • DeseqStats should take a contrast vector with one value per fitted coefficient, such as [0, -1, 1].

Additional context discussed on the scverse hackathon in Cambridge

CC @const-ae @emdann

grst avatar Nov 28 '23 11:11 grst