willtownes / nsf-paper

Nonnegative spatial factorization for multivariate count data
GNU Lesser General Public License v3.0
51 stars 11 forks source link

Example notebook #1

Open pedrofale opened 2 years ago

pedrofale commented 2 years ago

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

willtownes commented 2 years ago

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

Alea4jacta6est commented 1 year ago

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

willtownes commented 1 year ago

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".

Alea4jacta6est commented 1 year ago

@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?