Commit 52098e1b authored by Sarah Peter's avatar Sarah Peter

Use miniconda windows installer

parent 231a1565
......@@ -8,7 +8,7 @@ In this tutorial you will learn how to run a [ChIP-seq](https://en.wikipedia.org
## Table of contents
1. [Open a terminal](#term)
1. [Install conda](#conda)
2. [Setup the environment](#env)
3. [Create snakemake workflow](#snakemake)
1. [Mapping](#mapping)
......@@ -20,28 +20,38 @@ In this tutorial you will learn how to run a [ChIP-seq](https://en.wikipedia.org
6. [References](#references)
7. [Acknowledgements](#acknowledgements)
<a name="term"></a>
<a name="conda"></a>
## Open a terminal
## Install conda
### Windows 10
### Windows
Please install the [Ubuntu app](https://www.microsoft.com/de-de/p/ubuntu/9nblggh4msv6?activetab=pivot:overviewtab) from the Microsoft Store.
### Other Windows versions
* Install VirtualBox
* Download image from WebDAV
* Start VM
* Download and run the [Miniconda Windows installer](https://docs.conda.io/en/latest/miniconda.html) in the Python 3.7 version.
* Start "Anaconda Power Shell".
### MacOS
Start the "Terminal" app or [iTerm2](https://www.iterm2.com/).
* Download and run the [Miniconda .pkg installer](https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.pkg) in the Python 3.7 version.
* Start the "Terminal" app or [iTerm2](https://www.iterm2.com/).
### Linux
Start the respective terminal/console app.
```bash
$ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
$ chmod u+x Miniconda3-latest-Linux-x86_64.sh
$ ./Miniconda3-latest-Linux-x86_64.sh
```
You need to specify your installation destination, e.g. `/home/<your_username>/tools/miniconda3`. You must use the **full** path and can**not** use `$HOME/tools/miniconda3`. Answer `yes` to initialize Miniconda3.
The installation will modify your `.bashrc` to make conda directly available after each login. To activate the changes now, run
```bash
$ source ~/.bashrc
```
<a name="env"></a>
## Setup the environment
......@@ -60,29 +70,12 @@ It can encapsulate software and packages in environments, so you can have multip
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. Install conda:
```bash
$ mkdir -p $SCRATCH/downloads
$ cd $SCRATCH/downloads
$ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
$ chmod u+x Miniconda3-latest-Linux-x86_64.sh
$ ./Miniconda3-latest-Linux-x86_64.sh
```
You need to specify your installation destination, e.g. `/home/users/<your_username>/tools/miniconda3`. You must use the **full** path and can**not** use `$HOME/tools/miniconda3`. Answer `yes` to initialize Miniconda3.
The installation will modify your `.bashrc` to make conda directly available after each login. To activate the changes now, run
```bash
$ source ~/.bashrc
```
Update conda to the latest version:
1. Update conda to the latest version:
```bash
$ conda update conda
```
4. Create a new conda environment and activate it:
2. Create a new conda environment and activate it:
```bash
$ conda create -n bioinfo_tutorial
......@@ -90,13 +83,13 @@ We will use conda on two levels in this tutorial. First we use a conda environme
```
After validation of the creation step and once activated, you can see that your prompt will now be prefixed with `(bioinfo_tutorial)` to show which environment is active. For the rest of the tutorial make sure that you always have this environment active.
5. Make sure Python does not pick up packages in your home directory:
3. (MacOS and Linux only) Make sure Python does not pick up packages in your home directory:
```bash
(bioinfo_tutorial) $ export PYTHONNOUSERSITE=True
```
6. Install snakemake:
4. Install snakemake:
```bash
(bioinfo_tutorial) $ conda install -c bioconda -c conda-forge snakemake-minimal
......@@ -133,14 +126,46 @@ We will set up the following workflow:
To speed up computing time we use source files that only contain sequencing reads that map to chromosome 12. The files for input (control) and H3K4me3 (ChIP) are available on our [WebDAV](https://webdav-r3lab.uni.lu/public/biocore/snakemake_tutorial/) server.
Create a working directory and download the necessary data:
Create a working directory:
```bash
$ mkdir bioinfo_tutorial
$ wget "https://webdav-r3lab.uni.lu/public/biocore/snakemake_tutorial/snakemake_tutorial_data.tar.gz"
$ tar -xzf snakemake_tutorial_data.tar.gz
```
and download the necessary data:
* MacOS and Linux:
```bash
$ wget "https://webdav-r3lab.uni.lu/public/biocore/snakemake_tutorial/snakemake_tutorial_data.tar.gz"
$ tar -xzf snakemake_tutorial_data.tar.gz
```
* 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`).
Your working directory should have the following layout now:
```
.
|-- chip-seq
|   |-- H3K4-TC1-ST2-D0.12.fastq.gz
|   `-- INPUT-TC1-ST2-D0.12.fastq.gz
|-- envs
|   |-- bowtie2.yaml
|   |-- macs2.yaml
|   `-- ucsc.yaml
`-- reference
|-- Mus_musculus.GRCm38.dna_sm.chromosome.12.1.bt2
|-- Mus_musculus.GRCm38.dna_sm.chromosome.12.2.bt2
|-- Mus_musculus.GRCm38.dna_sm.chromosome.12.3.bt2
|-- Mus_musculus.GRCm38.dna_sm.chromosome.12.4.bt2
|-- Mus_musculus.GRCm38.dna_sm.chromosome.12.fa
|-- Mus_musculus.GRCm38.dna_sm.chromosome.12.fa.fai
|-- Mus_musculus.GRCm38.dna_sm.chromosome.12.rev.1.bt2
`-- Mus_musculus.GRCm38.dna_sm.chromosome.12.rev.2.bt2
```
<a name="mapping"></a>
### Mapping
......@@ -274,12 +299,25 @@ After this step your working directory should contain the following files (using
|-- bowtie2
| |-- INPUT-TC1-ST2-D0.12.bam
| `-- INPUT-TC1-ST2-D0.12.bam.bai
|-- chip-seq -> /work/projects/ulhpc-tutorials/bio/snakemake/chip-seq
|-- envs -> /work/projects/ulhpc-tutorials/bio/snakemake/envs
|-- chip-seq
|   |-- H3K4-TC1-ST2-D0.12.fastq.gz
|   `-- INPUT-TC1-ST2-D0.12.fastq.gz
|-- envs
|   |-- bowtie2.yaml
|   |-- macs2.yaml
|   `-- ucsc.yaml
|-- logs
| `-- bowtie2_INPUT-TC1-ST2-D0.12.log
|-- reference -> /work/projects/ulhpc-tutorials/bio/snakemake/reference/
|-- Snakefile
|-- reference
| |-- Mus_musculus.GRCm38.dna_sm.chromosome.12.1.bt2
| |-- Mus_musculus.GRCm38.dna_sm.chromosome.12.2.bt2
| |-- Mus_musculus.GRCm38.dna_sm.chromosome.12.3.bt2
| |-- Mus_musculus.GRCm38.dna_sm.chromosome.12.4.bt2
| |-- Mus_musculus.GRCm38.dna_sm.chromosome.12.fa
| |-- Mus_musculus.GRCm38.dna_sm.chromosome.12.fa.fai
| |-- Mus_musculus.GRCm38.dna_sm.chromosome.12.rev.1.bt2
| `-- Mus_musculus.GRCm38.dna_sm.chromosome.12.rev.2.bt2
`-- Snakefile
```
<a name="peaks"></a>
......@@ -343,8 +381,13 @@ After this step your working directory should contain the following files:
| |-- H3K4-TC1-ST2-D0.12.bam.bai
| |-- INPUT-TC1-ST2-D0.12.bam
| `-- INPUT-TC1-ST2-D0.12.bam.bai
|-- chip-seq -> /work/projects/ulhpc-tutorials/bio/snakemake/chip-seq
|-- envs -> /work/projects/ulhpc-tutorials/bio/snakemake/envs
|-- chip-seq
|   |-- H3K4-TC1-ST2-D0.12.fastq.gz
|   `-- INPUT-TC1-ST2-D0.12.fastq.gz
|-- envs
|   |-- bowtie2.yaml
|   |-- macs2.yaml
|   `-- ucsc.yaml
|-- logs
| |-- bowtie2_H3K4-TC1-ST2-D0.12.log
| `-- bowtie2_INPUT-TC1-ST2-D0.12.log
......@@ -357,8 +400,16 @@ After this step your working directory should contain the following files:
| `-- TC1-ST2-D0.12_treat_pileup.bdg
|-- output
| `-- TC1-ST2-D0.12_peaks.narrowPeak
|-- reference -> /work/projects/ulhpc-tutorials/bio/snakemake/reference/
|-- Snakefile
|-- reference
| |-- Mus_musculus.GRCm38.dna_sm.chromosome.12.1.bt2
| |-- Mus_musculus.GRCm38.dna_sm.chromosome.12.2.bt2
| |-- Mus_musculus.GRCm38.dna_sm.chromosome.12.3.bt2
| |-- Mus_musculus.GRCm38.dna_sm.chromosome.12.4.bt2
| |-- Mus_musculus.GRCm38.dna_sm.chromosome.12.fa
| |-- Mus_musculus.GRCm38.dna_sm.chromosome.12.fa.fai
| |-- Mus_musculus.GRCm38.dna_sm.chromosome.12.rev.1.bt2
| `-- Mus_musculus.GRCm38.dna_sm.chromosome.12.rev.2.bt2
`-- Snakefile
```
<a name="bigwig"></a>
......
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