Create the course conda environment

1. Install Mamba

Follow these instructions to install Conda.

After restarting, you can type the command below to install Mamba:

  conda init
  conda install -n base -c conda-forge mamba

 

2. Create a conda environment from file

To download the environment_scRNAseq2021.yml file using the command on Terminal:

curl -o environment_scRNAseq2021.yml https://raw.githubusercontent.com/NBISweden/workshop-scRNAseq/master/labs/environment_scRNAseq2021.yml

After this, you should have a file named environment_scRNAseq2021.yml in your directory (it does not matter where). Next, type:

mamba env create -n scRNAseq2021 -f environment_scRNAseq2021.yml

Several messages will show up on your screen and will tell you about the installation process. This may take a few minutes depending on how many packages are to be installed.

##Collecting package metadata: done
##Solving environment: done
##
##Downloading and Extracting Packages
##libcblas-3.8.0       | 6 KB      | ############################################################################# | 100%
##liblapack-3.8.0      | 6 KB      | ############################################################################# | 100%
##...
##Preparing transaction: done
##Verifying transaction: done
##Executing transaction: done

 

3. Activate the environment

Once the environment is created, we need to activate it in order to use the softwares and packages inside it. To activate an environment type:

conda activate scRNAseq2021

From this point on you can run any of the contents from the workshop. For instance, you can directly launch RStudio by typing rstudio. Here it is important to add the & symbol in the end to be able to use the command line at the same time if needed. You can open other files from Rstudio later as well.

rstudio PATH/my_script.Rmd &

 

4. Deactivate the environment

After you've ran all your analyses, you can deactivate the environment by typing:

conda deactivate