Installation Conda - MeryemAk/dRNASeq GitHub Wiki

This guide provides instructions for setting up the necessary environment and tools for your project on a Linux system. It covers both automated and manual installation methods.

Table of Contents

  1. Automated Installation
  2. Manual Installation - Only necessary if automated installation fails
  3. Conda Environment Creation (Detailed) - Detailed explanation of how Conda environment is created (not necessary for installtation)

1. Automated Installation

The 1.linuxsetup.sh script automates the installation of Miniconda and the setup of the Conda environment.

  1. Before running the script, it's recommended to update your system:
sudo apt update
  1. Navigate to the scripts directory in your terminal.
cd $HOME/dRNASeq/scripts
  1. Execute the script:
./1.linuxsetup.sh

image

Error

error: command 'gcc' failed: No such file or directory
  1. Install GCC and Build Dependencies:
sudo apt install build-essential gcc
  1. Activate Conda env and download mappy
conda activate dRNAseq
pip install mappy

Restart your terminal session to apply the changes!!

  1. Initialize Conda and deactivate the base environment. Check whether Conda was installed.
source ~/miniconda3/bin/activate   # Initialize Conda
conda deactivate                   # Deactivate base environment
conda --version                    # Check if Conda was installed properly

image

How to use the environment:

conda activate dRNAseq    # Activate the environment
conda deactivate          # Deactivate the environment
  1. The counting tool bambu is not available through Conda and has to be installed with Docker instead. Execute the first step of the Docker Wiki page to make sure Docker is available on your local machine, afterwards execute the following command:
sudo docker pull mathiasverbeke/bambu_runner:latest

image

2. Manual Installation

This section details the manual steps to install Miniconda and set up the Conda environment.

2.1 Miniconda Installation

  1. Create a directory for Miniconda:
mkdir -p ~/miniconda3
  1. Download the Miniconda installer:
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
  1. Run the installer:
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
  1. Remove the installer script:
rm ~/miniconda3/miniconda.sh
  1. Refresh the terminal:
source ~/miniconda3/bin/activate
  1. Initialize Conda:
conda init --all
  • Verify Installation: To check if Miniconda is installed, run:
conda list

If Miniconda is not installed, you'll see the message bash: conda: command not found.

2.2 Conda Environment Setup

  1. Clone the repository:
git clone https://github.com/MeryemAk/dRNASeq
cd dRNASeq
  1. Check for the environment file:
ls
  1. Create the Conda environment:
conda env create -f environment.yml
  1. Activate the environment:
conda activate dRNAseq

3. Conda Environment Creation (Detailed)

This part provides a detailed breakdown of creating the Conda environment and installing the necessary tools.

  1. Create and activate the environment:
conda create -n dRNAseq
conda activate dRNAseq
conda config --show channels   # Verify channels: bioconda, conda-forge, defaults
  1. Install tools:
pip install nanopack
pip install mmseqs
conda install -c nanoporetech -c conda-forge -c bioconda "nanoporetech::pychopper"
conda install bioconda::minimap2
conda install bioconda::samtools
conda install -c bioconda kraken2
  1. Export the Conda environment and remove the prefix.
conda env export > environment.yml
conda env export | grep -v "^prefix: " > environment.yml

This comprehensive guide should help users set up your project effectively!