We will first install miniforge which is itself an installer for mamba which is an installer for python packages (kind of like a kinase kinase kinase).
curl followed by the command starting with bash. Please ask an instructor for help if you are using this workflow.To verify miniforge is installed correctly:
conda --version and press Enterconda init zsh to initialize your shells for conda/mamba use.The package installers mamba and conda allow you to create separate analysis environments into which you can install required software for data analysis. The advantage of this approach is that different projects, which might require different versions of the same software package, are kept separate and cannot interfere negatively with one another. Here, we use mamba for package installation, because it is faster.
conda create -n scrnaseq python=3.10(this creates an analysis environment called scrnaseq)conda activate scrnaseq(this activates the environment, which should become evident by the environment name now preceding the prompt)mamba install -c conda-forge -c bioconda scanpy pandas numpy matplotlib seaborn jupyter notebook scikit-learn scipy h5py openpyxl leidenalg python-igraph -y
This does not work if you are behind Charité’s proxy server. “Charité Gast” WiFi and eduroam (without using Charité VPN!) should work.
Not all packages are available via conda/mamba, so sometimes we need to use the more general python package manager pip. Here, we use it to install decoupler, which comes with many useful functions for single cell analysis, and PyDESeq2 for differential expression testing. Please run the following commands inside your scrnaseq environment:
pip install decoupler
pip install pydeseq2
We will use jupyter notebooks as our code editor for this course. The notebook is served in a web browser after a call from the terminal.
mamba activate scrnaseqscrnaseq environment, type the following command and hit enter
jupyter notebooklocalhost will be displayed - copy this link into the address line of a web browser of your choice and hit enter import matplotlib.pyplot as plt
import numpy as np
x = np.arange(10)
y = np.arange(10)**2
plt.plot(x, y, '-o')
plt.show()
If everything worked correctly, you should see a quadratic curve. You are ready to move on to the data science intro.