scverse / scvi-tools

Deep probabilistic analysis of single-cell and spatial omics data
http://scvi-tools.org/
BSD 3-Clause "New" or "Revised" License
1.2k stars 344 forks source link

Model request: non-negative spatial factorization (NSF) #1859

Open aribenjamin opened 1 year ago

aribenjamin commented 1 year ago

Is anyone currently working on implementing NSF? It's a nice probabilistic method designed with spatial transcriptomics in mind. https://www.nature.com/articles/s41592-022-01687-w

It'd be nice to work with this here, within scvi-tools. The authors' implementation (@ https://github.com/willtownes/nsf-paper) is a little hard to parse and implemented with Tensorflow as a backend (which I don't work in).

adamgayoso commented 1 year ago

I think this would be a nice addition. It might be easiest to implement using tensorflow probability and jax as the kernel functions should be the same; unless of course it's also straightforward in pytorch. Are you willing to contribute this?

aribenjamin commented 1 year ago

Yes, I'm happy to go for it. It'd be good practice contributing. I can't guarantee any timeline, though, so if someone wants this sooner please ping me.

adamgayoso commented 1 year ago

Looking into this more, it should be possible with just PyTorch, or just jax+numpyro (which we already depend on), without the introduction of tensorflow probability. @martinkim0 do you want to try this model? It looks both fairly straightforward and fun.

aribenjamin commented 1 year ago

fyi I have back-burnered this to the point of inaction. If you want to work on this, know that I'm not working in parallel. I'll update this when and if I begin.