Skip to content

Instantly share code, notes, and snippets.

@beardymcjohnface
Created May 22, 2024 07:06
Show Gist options
  • Save beardymcjohnface/afebbebcdc1d64423870d6a3ee93d432 to your computer and use it in GitHub Desktop.
Save beardymcjohnface/afebbebcdc1d64423870d6a3ee93d432 to your computer and use it in GitHub Desktop.
Set up environment for Snakemake tutorial

Setup for Snakemake Tutorial

IDE

I recommend downloading and installing PyCharm. The community edition is free and excellent. If you have an academic email address you can obtain a licence for the full version for free. Alternatively, Visual studio is also popular.

You can also just use notepad, vim, nano etc but everything will be pointlessly harder.

Project and Environment

Create a new project, and create a conda environment when prompted. If you want to do it the hard way you'll have to install Miniconda, then open a terminal and run:

# use conda
conda create -n snakemake python=3.12
conda activate snakemake

Dependencies

Open the terminal tab in your IDE and check that the correct conda env is activated. For this tutorial we need to install a couple of dependencies:

# install
conda install -c conda-forge -c bioconda snakemake minimap2 samtools

# check
snakemake --help
minimap2 --help
samtools --help

Files

Grab the files from the official tutorial git:

# pull the files
git clone https://github.com/snakemake/snakemake-tutorial-data.git

# move the data directory
mv snakemake-tutorial-data/data .

# cleanup
rm -r snakemake-tutorial-data/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment