Hands-on training for analysing Oxford Nanopore Technologies (ONT) sequencing data for microbial pathogen detection
This guide will help you install Miniconda and set up the bioinformatics environment for the training.
Conda is a package and environment management system that makes it easy to install bioinformatics software and manage dependencies.
# Download Miniconda installer
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
# Run the installer
bash Miniconda3-latest-Linux-x86_64.sh
# Follow the prompts:
# - Press Enter to review license
# - Type 'yes' to accept
# - Press Enter to confirm installation location
# - Type 'yes' to initialise Miniconda
# Activate conda
source ~/.bashrc
# Verify installation
conda --version
# Download Miniconda installer
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
# Run the installer
bash Miniconda3-latest-MacOSX-x86_64.sh
# Follow the same prompts as Linux
source ~/.bashrc
conda --version
# Add channels in the correct order
conda config --add channels conda-forge
conda config --add channels bioconda
# Verify channels
conda config --show channels
# Create a new environment with Python
conda create -n pathogen_detection python=3.9 -y
# Activate the environment
conda activate pathogen_detection
# Install bioinformatics tools
conda install -c bioconda fastqc multiqc nanoplot porechop fastp minimap2 samtools kraken2 krona flye medaka quast abritamr -y
# Install additional tools
conda install -c conda-forge wget curl csvtk parallel -y
# Install amrfinderplus separately
conda install -y -c conda-forge -c bioconda --strict-channel-priority ncbi-amrfinderplus
Use the pathogen_detection.yml file provided in the repository to create the environment with all required packages.
# create pathogen_detection.yml
nano pathogen_detection.yml
# Create environment from file
conda env create -f pathogen_detection
# Activate the environment
conda activate pathogen_detection
Solution:
# Re-initialize conda
source ~/miniconda3/bin/activate
conda init bash
source ~/.bashrc
Solution:
# Use mamba (faster alternative to conda)
conda install mamba -c conda-forge -y
mamba install <package-name>
Solution:
# Create clean environment
conda create -n pathogen_detection_clean python=3.9 -y
conda activate pathogen_detection_clean
# Install packages one by one
Solution:
# Don't use sudo with conda
# If you installed Miniconda with sudo, reinstall without it