aertslab / scenicplus

SCENIC+ is a python package to build gene regulatory networks (GRNs) using combined or separate single-cell gene expression (scRNA-seq) and single-cell chromatin accessibility (scATAC-seq) data.
Other
178 stars 28 forks source link

juypt notebooks and python scripts that use scenicplus on linux systems #208

Closed crossworlds423 closed 1 year ago

crossworlds423 commented 1 year ago

I think I succesfully installed scenicplus on my linux computer. The following is the end part after running pip install -e

Using cached google_api_core-2.11.1-py3-none-any.whl (120 kB)
Using cached nvidia_ml_py-12.535.77-py3-none-any.whl (36 kB)
Using cached google_auth-2.22.0-py2.py3-none-any.whl (181 kB)
Using cached urllib3-1.26.16-py2.py3-none-any.whl (143 kB)
Using cached googleapis_common_protos-1.60.0-py2.py3-none-any.whl (227 kB)
Using cached xyzservices-2023.7.0-py3-none-any.whl (56 kB)
Using cached cachetools-5.3.1-py3-none-any.whl (9.3 kB)
Building wheels for collected packages: gpustat
  Building wheel for gpustat (pyproject.toml) ... done
  Created wheel for gpustat: filename=gpustat-1.1-py3-none-any.whl size=26274 sha256=fef3ff2d1b1f4a537a7b7545308165ee7969fd840b41b87367dd062cec22196b
  Stored in directory: /home/arya/.cache/pip/wheels/34/95/93/01152442cc2e1e7c8914873995eed0756f4e5529926bbc5f50
Successfully built gpustat
Installing collected packages: py-spy, opencensus-context, nvidia-ml-py, distlib, colorful, appdirs, zope.interface, xyzservices, urllib3, six, pyyaml, pydantic, pyasn1, pexpect, idna, googleapis-common-protos, filelock, entrypoints, docutils, cython, colorama, click, certifi, cachetools, virtualenv, rsa, pyasn1-modules, cryptography, blessed, sphinx, pyopenssl, gpustat, google-auth, pyranges, google-api-core, bokeh, aiohttp-cors, opencensus, scenicplus
  Attempting uninstall: docutils
    Found existing installation: docutils 0.20.1
    Uninstalling docutils-0.20.1:
      Successfully uninstalled docutils-0.20.1
  Attempting uninstall: cython
    Found existing installation: Cython 3.0.0
    Uninstalling Cython-3.0.0:
      Successfully uninstalled Cython-3.0.0
  Attempting uninstall: sphinx
    Found existing installation: Sphinx 7.1.2
    Uninstalling Sphinx-7.1.2:
      Successfully uninstalled Sphinx-7.1.2
  Attempting uninstall: pyranges
    Found existing installation: pyranges 0.0.129
    Uninstalling pyranges-0.0.129:
      Successfully uninstalled pyranges-0.0.129
  Running setup.py develop for scenicplus
Successfully installed aiohttp-cors-0.7.0 appdirs-1.4.4 blessed-1.20.0 bokeh-3.1.1 cachetools-5.3.1 certifi-2023.7.22 click-8.1.7 colorama-0.4.6 colorful-0.5.5 cryptography-41.0.3 cython-0.29.36 distlib-0.3.7 docutils-0.18.1 entrypoints-0.4 filelock-3.12.2 google-api-core-2.11.1 google-auth-2.22.0 googleapis-common-protos-1.60.0 gpustat-1.1 idna-3.4 nvidia-ml-py-12.535.77 opencensus-0.11.2 opencensus-context-0.1.3 pexpect-4.8.0 py-spy-0.3.14 pyasn1-0.5.0 pyasn1-modules-0.3.0 pydantic-1.10.12 pyopenssl-23.2.0 pyranges-0.0.127 pyyaml-6.0.1 rsa-4.9 scenicplus six-1.16.0 sphinx-6.2.1 urllib3-1.26.16 virtualenv-20.21.0 xyzservices-2023.7.0 zope.interface-6.0

I see a folder called scenicplus in my current directory. I tried running a simple python script from the tutorial page by trying to import some of the packages from scenicplus but I was thrown an error. Can someone help me understand how to address and error and how to use scenicplus?

import os
import scenicplus
import scanpy as sc
import warnings
import pandas as pd
import matplotlib as mpl
import pickle
import dill
import sys
from scenicplus.scenicplus_class import SCENICPLUS, create_SCENICPLUS_object
from scenicplus.preprocessing.filtering import *
import numpy as np

Error:

Traceback (most recent call last):
  File "example.py", line 10, in <module>
    from scenicplus.scenicplus_class import create_SCENICPLUS_object
ModuleNotFoundError: No module named 'scenicplus.scenicplus_class'
SeppeDeWinter commented 1 year ago

Hi @crossworlds423

Thank you for using SCENIC+/

Can you show how you installed SCENIC+? And the output? Also which version of python are you using?

Best,

Seppe

crossworlds423 commented 1 year ago

I fixed it, I need to run export PYTHONPATH=$PYTHONPATH:/home/userlab/pycistarget/ in the terminal

The following were needed as well

pip install PyYAML
pip install click Cython pyopenssl pyranges entrypoints urllib3
pip install certifi idna
pip install Cython~=0.29
pip install "pyranges<0.0.128"
pip install pycisTopic
pip install pyranges
conda install pyrle