broadinstitute / CellBender

CellBender is a software package for eliminating technical artifacts from high-throughput single-cell RNA sequencing (scRNA-seq) data.
https://cellbender.rtfd.io
BSD 3-Clause "New" or "Revised" License
289 stars 52 forks source link

Implementation in scvi-tools #155

Open adamgayoso opened 2 years ago

adamgayoso commented 2 years ago

Hi cellbender team,

I'm reaching out to gauge interest in having a mirror implementation in scvi-tools for cellbender. @ricomnl has offered to make the port, which seems relatively straightforward given our Pyro infrastructure. I was even thinking we can try numpyro which should result in a speedup of at least 2x (and 4x on cpu in our experience with these kinds of vaes).

Please let us know what you think!

sjfleming commented 2 years ago

Interesting proposition! Let me tag in @mbabadi

adamgayoso commented 2 years ago

An alternative is to refactor this codebase to depend on scvi-tools, which would create an interactive API and remove a lot of data code.

sjfleming commented 2 years ago

That is also an interesting proposition, and something I've wondered about as well.

And it's interesting that you mention that about numpyro: I had always wondered if there might be a speedup, but I've not yet tried any numpyro.

adamgayoso commented 2 years ago

I can say that for scVI, the speedup is significant. We see about 4x faster runtimes consistently. I have a rough implementation of scVI in numpyro here.

We also have regular scVI coded without numpyro but using jax here.

A downside is that jax can be tricky to install for windows.