constantAmateur / SoupX

R package to quantify and remove cell free mRNAs from droplet based scRNA-seq data
255 stars 34 forks source link

Problem running on jupyter notebook #30

Closed alexmascension closed 4 years ago

alexmascension commented 4 years ago

Hi!

I am running a pipeline in a Jupyter notebook, and I would like to use SoupX inside a R cell. However, each time I run a cell with library(SoupX), the kernel dies.

My installation script is as follows:

conda create -n myenv python==3.7.*
conda activate myenv 

conda install pip
conda install -c conda-forge r-base==3.6.2

conda install nb_conda # install jupyter by default
pip install jupyter_contrib_nbextensions

pip install scanpy
pip install leidenalg
pip install OpenTSNE
pip install rpy2
pip install anndata2ri

conda install pandas==0.25.*

conda install -c conda-forge r-curl==4.3
conda install -c conda-forge r-matrix.utils
conda install -c conda-forge r-sf  # installs hdf5 also

Once in R:

install.packages('usethis')
install.packages('covr')
install.packages('httr')
install.packages('rversions')
install.packages('devtools')

if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")

BiocManager::install("multtest")

devtools::install_github('constantAmateur/SoupX',ref='devel')

I use anaconda R to run it in jupyter and I am almost sure that there must be some library or package that breaks the kernel when loading the library, because when running R in the console the package loads correctly.

I know the issue is quite odd for the types of issues that should be received here, but I post it so that you know about it. I will post it in https://github.com/ipython/ipython/issues, so that they can try to solve it.

Thanks!

constantAmateur commented 4 years ago

This sounds more like a notebook issue than something wrong with SoupX. Does SoupX install and load properly if you run the same commands inside R launched from the terminal? If not, what error does it report?

alexmascension commented 4 years ago

Yeap, it is most surely something from the notebook, because in console it goes fine. In the notebook, unfortunately, it does not produce any error, so I can't backtrack where the issue is.

constantAmateur commented 4 years ago

OK, this sounds like it's an issue with ipython/jupyter so I'm going to close the issue.