nsf-paper icon indicating copy to clipboard operation
nsf-paper copied to clipboard

Example notebook

Open pedrofale opened this issue 3 years ago • 4 comments

Dear @willtownes,

Thanks for making the code for Nonnegative Spatial Factorization available! I really want to start playing with this. Would it be possible for you to create a Jupyter/Colab Notebook so make it easier to start?

Best, Pedro

pedrofale avatar Oct 13 '21 16:10 pedrofale

Great idea! I'll try to put something together. In the meantime, you can convert any of the .ipy files into .ipynb using jupytext. For example, here is where we fit the NSF model to the Visium data: https://github.com/willtownes/nsf-paper/blob/main/scrna/visium_brain_sagittal/02_exploratory.ipy#L58

willtownes avatar Oct 13 '21 18:10 willtownes

Dependencies to run demo notebook:

I used Python 3.10.8

!pip install scanpy !pip install --upgrade tensorflow-probability !pip install tensorflow !pip install squidpy !pip install llvmlite==0.39.0. !pip install matplotlib !pip install pandas

Alea4jacta6est avatar Feb 23 '23 16:02 Alea4jacta6est

Thanks @Alea4jacta6est ! For what it's worth, I was running everything in python 3.8.10 when I created the code originally. You can see all the detailed dependencies in the methods section of the paper under "Software versions".

willtownes avatar Feb 23 '23 17:02 willtownes

@willtownes wow, now I see, could you add requirements.txt file to the repository for the users to easily set up the environment to run your code?

Alea4jacta6est avatar Feb 23 '23 17:02 Alea4jacta6est