Commit aa7253a2 authored by Sarah Peter's avatar Sarah Peter

Open file for different OSs

parent 52098e1b
......@@ -24,6 +24,20 @@ In this tutorial you will learn how to run a [ChIP-seq](https://en.wikipedia.org
## Install conda
For this tutorial we will use the [`conda` package manager](https://www.anaconda.com/) to install the required tools.
> Conda is an open source package management system and environment management system that runs on Windows, macOS and Linux. Conda quickly installs, runs and updates packages and their dependencies. Conda easily creates, saves, loads and switches between environments on your local computer. It was created for Python programs, but it can package and distribute software for any language.
>
> Conda as a package manager helps you find and install packages. If you need a package that requires a different version of Python, you do not need to switch to a different environment manager, because conda is also an environment manager. With just a few commands, you can set up a totally separate environment to run that different version of Python, while continuing to run your usual version of Python in your normal environment.
>
> &mdash; <cite>[Conda manual](https://docs.conda.io/en/latest/index.html)</cite>
It can encapsulate software and packages in environments, so you can have multiple different versions of a software installed at the same time and avoid incompatibilities between different tools. It also has functionality to easily port and replicate environments, which is important to ensure reproducibility of analyses.
**Attention when dealing with sensitive data:** Everyone can very easily contribute installation recipies to the bioconda channel, without verified identity or double-checking from the community. Therefore it's possible to insert malicious software. If you use bioconda when processing sensitive data, you should check the recipes to verify that they install software from the official sources.
We will use conda on two levels in this tutorial. First we use a conda environment to install and run snakemake. Second, inside the snakemake workflow we will define separate conda environments for each step.
### Windows
* Download and run the [Miniconda Windows installer](https://docs.conda.io/en/latest/miniconda.html) in the Python 3.7 version.
......@@ -56,20 +70,6 @@ $ source ~/.bashrc
## Setup the environment
For this tutorial we will use the [`conda` package manager](https://www.anaconda.com/) to install the required tools.
> Conda is an open source package management system and environment management system that runs on Windows, macOS and Linux. Conda quickly installs, runs and updates packages and their dependencies. Conda easily creates, saves, loads and switches between environments on your local computer. It was created for Python programs, but it can package and distribute software for any language.
>
> Conda as a package manager helps you find and install packages. If you need a package that requires a different version of Python, you do not need to switch to a different environment manager, because conda is also an environment manager. With just a few commands, you can set up a totally separate environment to run that different version of Python, while continuing to run your usual version of Python in your normal environment.
>
> &mdash; <cite>[Conda manual](https://docs.conda.io/en/latest/index.html)</cite>
It can encapsulate software and packages in environments, so you can have multiple different versions of a software installed at the same time and avoid incompatibilities between different tools. It also has functionality to easily port and replicate environments, which is important to ensure reproducibility of analyses.
**Attention when dealing with sensitive data:** Everyone can very easily contribute installation recipies to the bioconda channel, without verified identity or double-checking from the community. Therefore it's possible to insert malicious software. If you use bioconda when processing sensitive data, you should check the recipes to verify that they install software from the official sources.
We will use conda on two levels in this tutorial. First we use a conda environment to install and run snakemake. Second, inside the snakemake workflow we will define separate conda environments for each step.
1. Update conda to the latest version:
```bash
$ conda update conda
......@@ -134,14 +134,14 @@ $ mkdir bioinfo_tutorial
and download the necessary data:
* MacOS and Linux:
* Linux:
```bash
$ wget "https://webdav-r3lab.uni.lu/public/biocore/snakemake_tutorial/snakemake_tutorial_data.tar.gz"
$ tar -xzf snakemake_tutorial_data.tar.gz
$ wget "https://webdav-r3lab.uni.lu/public/biocore/snakemake_tutorial/snakemake_tutorial_data.zip"
$ unzip snakemake_tutorial_data.zip
```
* Windows: Download the [zip file](https://webdav-r3lab.uni.lu/public/biocore/snakemake_tutorial/snakemake_tutorial_data.zip) from the WebDAV and unpack it into the directory we created above (normally `C:\Users\<your_username>\bioinfo_tutorial`).
* MacOS and Windows: Download the [zip file](https://webdav-r3lab.uni.lu/public/biocore/snakemake_tutorial/snakemake_tutorial_data.zip) from the WebDAV and unpack it into the directory we created above (normally `C:\Users\<your_username>\bioinfo_tutorial` on Windows and `/Users/<your_username>/bioinfo_tutorial` on MacOS).
Your working directory should have the following layout now:
......@@ -236,9 +236,24 @@ To track resource usage we add the `benchmark` directive, which will write perfo
Create a file called `Snakefile` in the current directory and open it in your favourite editor, e.g.
```bash
$ nano Snakefile
```
* Linux:
```bash
$ nano Snakefile
```
* MacOS:
```bash
$ open -a Textedit Snakefile
```
* Windows:
```bash
$ New-Item Snakefile -type file
$ Notepad Snakefile
```
Add the final rule for the mapping:
......@@ -493,7 +508,7 @@ TC1-ST2-D0.12_peaks.narrowPeak
TC1-ST2-D0.12_treat_pileup.bigwig
```
Snakemake can visualise the dependency graph of the workflow with the following command:
Snakemake can visualise the dependency graph of the workflow with the following command (Linux and MacOS with `dot` installed):
```bash
$ snakemake --dag | dot -Tpdf > dag.pdf
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment