Skip to content

Lesson 5: Building a Bioinformatics Environment

This command creates a new environment called bioinfo with Python 3.9.

Terminal window
conda create -n bioinfo python=3.9

This command activates the environment so all installs go into bioinfo.

Terminal window
conda activate bioinfo

This command installs a standard set of tools used in many workflows. Here is a quick summary of what each tool is used for:

  • samtools: Manipulates SAM/BAM/CRAM alignment files (view, sort, index)
  • seqkit: Fast toolkit for inspecting and transforming FASTA/FASTQ files
  • fastqc: Quality control reports for raw sequencing reads
  • multiqc: Aggregates QC reports from many samples into one summary
  • minimap2: Aligns long reads or assemblies to a reference genome
  • blast: Finds sequence similarity against reference databases
  • bowtie2: Aligns short reads to a reference genome
Terminal window
conda install samtools seqkit fastqc multiqc minimap2 blast bowtie2

Note: If you have not configured channels yet, complete Lesson 4 first to ensure reliable installs.

alternatively, you can specify channels directly:

Terminal window
conda install -c conda-forge -c bioconda samtools seqkit fastqc multiqc minimap2 blast bowtie2

Remember we said many of the packages in the bioconda channel depend on packages in conda-forge. This is why the order of channels matters.

These commands check that each tool runs and reports a version.

Terminal window
samtools --version
seqkit version
fastqc --version
multiqc --version
minimap2 --version
blastn -version
bowtie2 --version

If each command prints a version number, the installation succeeded.

This command writes the environment specification to a file that can be shared or reused.

Terminal window
conda env export -n bioinfo > bioinfo.yml

Note: Keep this YAML file with your project to ensure reproducibility.

This command creates a new environment from the exported file.

Terminal window
conda env create -f bioinfo.yml

After recreation, you can activate it the same way:

Terminal window
conda activate bioinfo

This command returns you to the base environment.

Terminal window
conda deactivate