scanpy-tutorials icon indicating copy to clipboard operation
scanpy-tutorials copied to clipboard

pseudobulking + DE tutorial

Open ilan-gold opened this issue 6 months ago • 3 comments

See https://decoupler.readthedocs.io/en/latest/notebooks/scell/rna_psbk.html for a starting point, but some questions/TODOs remain:

  1. decoupler has some nice plotting functionality for filter_samples, filter_by_prop etc - do we want to keep that? Migrate to scanpy?
Image
  1. We need to output some sort of n_obs from scanpy.aggregate.get to be able to to filter properly based on number of replicates. I will open an issue there
  2. What should happen to the decoupler notebook and/or pseudobulk function? I like the API but I would assume at first pass that the scanpy implementation is a bit faster/more efficient (not sure though)

ilan-gold avatar Sep 30 '25 09:09 ilan-gold

Is the idea to use decoupler for the computation or just scanpy?

Because if we’re using decoupler, this would be more a candidate for scverse-tutorials, no?

flying-sheep avatar Sep 30 '25 11:09 flying-sheep

The idea is to show off scanpy's pseudobulking capability via get.aggregate (which is pretty optimized) and then do DESeq2 on the result. My point is more that the current decoupler one is very comprehensive and good save for the fact that (a) it isn't on the scanpy home page and (b) doesn't use our optimized pseudobulker

ilan-gold avatar Sep 30 '25 15:09 ilan-gold

Ah, so this is about https://scverse.zulipchat.com/#narrow/channel/316218-repo-management/topic/scanpy.20vs.20decoupler.20pseudobulking/with/542229960

And from there I infer you mean PyDESeq? OK, makes sense to have that here as a showcase for the pseudobulking!

flying-sheep avatar Oct 02 '25 09:10 flying-sheep