CellRank requires Python version >= 3.7 to run. We recommend using Miniconda to manage the environments.
CellRank can be installed via:
conda install -c conda-forge -c bioconda cellrank # or with extra libraries, useful for large datasets conda install -c conda-forge -c bioconda cellrank-krylov
If an error occurs during
conda install -c conda-forge -c bioconda cellrank-krylov, please consult the
Dependencies section below.
CellRank is also available on PyPI:
pip install cellrank # or with extra libraries, useful for large datasets pip install 'cellrank[krylov]' # or with external modules, see External API pip install 'cellrank[external]'
If an error occurs during
pip install 'cellrank[krylov]', please consult the Dependencies section below.
To stay up-to-date with the newest version, run:
pip install git+https://github.com/theislab/cellrank@dev
Some of the inference tasks that CellRank performs can be broken down to linear algebra problems. For example, we solve linear systems to compute fate probabilities and we compute partial Schur decompositions and find metastable states. For these computations to be scalable, we rely on highly optimized libraries which make use of sparsity structure, parallel implementations and efficient message passing implemented via PETSc and SLEPc. CellRank works without these as well, however, if you would like to apply it to large (>15k cells) datasets, we recommend you install them.
# note: conda alternatives are denoted by alt. # update sudo apt-get update sudo apt-get upgrade # install a message passing interface and mpi4py sudo apt-get install libopenmpi-dev # alt.: conda install -c conda-forge openmpi pip install --user mpi4py # alt.: conda install -c anaconda mpi4py # install petsc and and petsc4py pip install --user petsc # alt.: conda install -c conda-forge petsc pip install --user petsc4py # alt.: conda install -c conda-forge petsc4py # install slepsc and slepsc4py pip install --user slepc # alt.: conda install -c conda-forge slepc pip install --user slepc4py # alt.: conda install -c conda-forge slepc4py
During installation of petsc, petsc4py, slepc, and slepc4py the following error might appear several times:
ERROR: Failed building wheel for [insert package name here]
but this doesn’t matter if the installer finally tells you:
Successfully installed [insert package name here]
On Mac OS, install MPICH as a message passing interface and then proceed as above, using either pip or the installation instructions given on the PETSc and SLEPc websites. The SLEPc homepage even offers a video tutorial explaining the installation.
If after reading this, you still can’t proceed with the installation, feel free to open a GitHub issue.
To run the tutorials in a notebook locally, please install:
pip install notebook
jupyter notebook in the terminal. If you get the error
Not a directory: 'xdg-settings',
jupyter notebook --no-browser instead and open the url manually (or use this
you can run all tutorials interactively directly in your browser using binder. Just click the
binder button at the top of each tutorial.