-
Notifications
You must be signed in to change notification settings - Fork 12
1. Installation
It is optional to install SCARlink in a conda environment that also has R packages Seurat v4 and ArchR installed. If you already have the R packages installed and want to run SCARlink without conda, jump directly to step 2 of installation. For Docker setup, jump directly to step 4.
To install SCARlink within conda, first create a conda environment:
conda create -n scarlink-env python=3.8
conda activate scarlink-envSet the priority of conda channels
conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge
(Optional if inputs are in anndata format) Install essential R packages*
conda install -c conda-forge r-seurat r-devtools r-biocmanager
conda install -c bioconda bioconductor-rhdf5 \
bioconductor-genomeinfodbdata \
bioconductor-chromvar \
bioconductor-motifmatchr \
bioconductor-complexheatmap
(Optional if inputs are in anndata format) Install ArchR in the conda environment inside R. After entering the following command, press Enter at the prompt Enter one or more numbers, or an empty line to skip updates: .
devtools::install_github("GreenleafLab/ArchR", ref="master", repos = BiocManager::repositories())To install SCARlink within conda, first create a conda x86_64 environment:
CONDA_SUBDIR=osx-64 conda create -n scarlink-env python=3.8
conda activate scarlink-env
conda config --env --set subdir osx-64Set the priority of conda channels
conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge
(Optional if inputs are in anndata format) Install essential R packages*
conda install -c conda-forge r-seurat r-devtools r-biocmanager
conda install -c bioconda bioconductor-rhdf5 \
bioconductor-genomeinfodbdata \
bioconductor-chromvar \
bioconductor-motifmatchr \
bioconductor-complexheatmap
(Optional if inputs are in anndata format) Install ArchR in the conda environment inside R. After entering the following command, press Enter at the prompt Enter one or more numbers, or an empty line to skip updates: .
devtools::install_github("GreenleafLab/ArchR", ref="master", repos = BiocManager::repositories())Install tensorflow 2.12
conda install -c conda-forge numpy==1.23.1 tensorflow==2.12
Download SCARlink from GitHub and install#:
git clone https://github.com/snehamitra/SCARlink.git
pip install -e SCARlink
Install Jupyter to run the tutorial notebook or to do any additional analyses inside notebooks.
pip install notebook
Skip steps 1-3 if running SCARlink inside Docker container. First download and install Docker and then run SCARlink inside container as follows:
docker run -it --rm --memory=50g mitrasneha/scarlink:latest
Note that SCARlink will be found in /app/SCARlink inside container.
To run notebooks inside container, run Docker with port forwarding as follows:
docker run -it -p 8899:8888 --rm --memory=50g mitrasneha/scarlink:latest
Then start jupyter-notebook. For example, to run tutorial.ipynb inside container:
cd /app/SCARlink/notebooks
jupyter-notebook --ip 0.0.0.0 --no-browser --allow-root
Running jupyter-notebook will generate URLs. Copy the URL starting with http://127.0.0.0.1:8888/tree?... to the browser and replace port 8888 in the link with 8899: http://127.0.0.0.1:8899/tree?.... Then click on tutorial.ipynb in the opened browser to start the notebook.
* The manuscript version of SCARlink uses Seurat v4 and ArchR 1.0.2. The new Seurat v5 installation is compatible with SCARlink but Seurat v5 objects are not yet supported. We will add it soon!
# If pip installation fails due to rpy2, try installing rpy2 using conda first: conda install -c conda-forge rpy2