Skip to content

Commit

Permalink
update setup, authors, slides
Browse files Browse the repository at this point in the history
  • Loading branch information
tavareshugo committed Jul 26, 2023
1 parent 5f069ff commit 421e117
Show file tree
Hide file tree
Showing 3 changed files with 161 additions and 36 deletions.
5 changes: 4 additions & 1 deletion _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@ book:
navbar:
pinned: true
logo: "_extensions/cambiotraining/courseformat/img/university_crest_reversed.png"
left:
- text: Slides
href: https://docs.google.com/presentation/d/1IuEuwLe7TFbn1kYQmHtsRXvFleSVq2wpaYsymMOEatA/edit?usp=sharing
right:
- icon: github
href: https://github.com/cambiotraining/
href: https://github.com/cambiotraining/chipseq
aria-label: Bioinformatics Training Facility GitHub
- icon: twitter
href: https://twitter.com/bioinfocambs
Expand Down
54 changes: 41 additions & 13 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,37 @@ The listing below shows an example of how you can give more details about yourse
These examples include icons with links to GitHub and Orcid.
-->

About the authors:

About the authors (alphabetical by surname):

- **Sandra Cortijo**
<a href="https://orcid.org/0000-0003-3291-6729" target="_blank"><i class="fa-brands fa-orcid" style="color:#a6ce39"></i></a>
<a href="https://github.com/scortijo" target="_blank"><i class="fa-brands fa-github" style="color:#4078c0"></i></a>
_Affiliation_: Centre National de la Recherche Scientifique: Montpellier
_Roles_: writing; conceptualisation; coding
- **Sergio Martinez Cuesta**
<a href="https://orcid.org/0000-0001-9806-2805" target="_blank"><i class="fa-brands fa-orcid" style="color:#a6ce39"></i></a>
<a href="https://github.com/semacu" target="_blank"><i class="fa-brands fa-github" style="color:#4078c0"></i></a>
_Affiliation_: AstraZeneca, Cambridge
_Roles_: writing; conceptualisation; coding
- **Sankari Nagarajan**
<a href="https://orcid.org/0000-0001-8748-6223" target="_blank"><i class="fa-brands fa-orcid" style="color:#a6ce39"></i></a>
_Affiliation_: University of Manchester
_Roles_: writing; conceptualisation
- **Ashley Sawle**
<a href="https://orcid.org/0000-0002-2985-5059" target="_blank"><i class="fa-brands fa-orcid" style="color:#a6ce39"></i></a>
<a href="https://github.com/AshKernow" target="_blank"><i class="fa-brands fa-github" style="color:#4078c0"></i></a>
_Affiliation_: Cancer Research UK, Cambridge Institute
_Roles_: writing; conceptualisation; coding
- **Denis Seyres**
<a href="https://orcid.org/0000-0002-2066-6980" target="_blank"><i class="fa-brands fa-orcid" style="color:#a6ce39"></i></a>
_Affiliation_: Universitätsspital Basel: Basel
_Roles_: writing; conceptualisation; coding
- **Hugo Tavares**
<a href="https://orcid.org/0000-0001-9373-2726" target="_blank"><i class="fa-brands fa-orcid" style="color:#a6ce39"></i></a>
<a href="https://github.com/tavareshugo" target="_blank"><i class="fa-brands fa-github" style="color:#4078c0"></i></a>
_Affiliation_: Bioinformatics Training Facility, University of Cambridge
_Roles_: writing - original draft; conceptualisation; coding
- **TODO**
_Roles_: writing; conceptualisation; coding



## Citation
Expand All @@ -76,22 +99,21 @@ About the authors:
Please cite these materials if:

- You adapted or used any of them in your own teaching.
- These materials were useful for your research work. For example, you can cite us in the methods section of your paper: "We carried our analyses based on the recommendations in _TODO_.".
- These materials were useful for your research work. For example, you can cite us in the methods section of your paper: "We carried our analyses based on the recommendations in _Cortijo S et al. (2023)_.".

You can cite these materials as:

> TODO
> Cortijo S, Martinez Cuesta S, Nagarajan S, Sawle A, Seyres D, Tavares H (2023) "cambiotraining/chipseq: Analysis of ChIP-seq Data", https://cambiotraining.github.io/chipseq/
Or in BibTeX format:

```
@Misc{,
author = {},
title = {},
month = {},
year = {},
url = {},
doi = {}
author = {Cortijo, Sandra AND Martinez Cuesta, Sergio AND Nagarajan, Sankari AND Sawle, Ashley AND Seyres, Denis AND Tavares, Hugo},
title = {cambiotraining/chipseq: Analysis of ChIP-seq Data},
month = {July},
year = {2023},
url = {https://cambiotraining.github.io/chipseq/}
}
```

Expand All @@ -100,4 +122,10 @@ Or in BibTeX format:

<!-- if there are no acknowledgements we can delete this section -->

- TODO
There are many online resources that inspired our own materials (e.g. package vignettes) and we cite them where relevant.

We also recommend the following training materials:

- [Understanding chromatin biology using high throughput sequencing](https://hbctraining.github.io/Intro-to-ChIPseq/schedule/2-day.html) from the Harvard Chan Bioinformatics Core
- [Introduction to ChIPseq using HPC](https://hbctraining.github.io/Intro-to-ChIPseq/schedule/2-day.html) from the Harvard Chan Bioinformatics Core
- [ChIP-seq analysis](https://www.bioinformatics.babraham.ac.uk/training.html#chip) from the Babraham Institute
138 changes: 116 additions & 22 deletions setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,24 @@ The data used in these materials is provided as a zip file.
Download and unzip the folder to your Desktop to follow along with the materials.

<!-- Note for Training Developers: add the link to 'href' -->
<a href="">
<a href="https://www.dropbox.com/sh/0obk40tzxscqdez/AADJVWnZd3h8UoHlbYRq64wVa?dl=1">
<button class="btn"><i class="fa fa-download"></i> Download</button>
</a>

## Setup

If you want to run some of this analysis on your own computer, you can follow these instructions.
To run the analysis covered in this workshop, you will broadly need two things:

- **R/RStudio** for all the downstream analysis (i.e. after peak calling using the `nf-core/chipseq` workflow).
These analyses can typically be run on your local computer and on any OS (macOS, Windows, Linux).
- A **Linux environment** to run the pre-processing steps and peak calling (i.e. running the `nf-core/chipseq` workflow).
We highly recommend using a dedicated server (typically a HPC) for this step.
Technically, you can also run this workflow on Windows via _WSL2_ (we provide instructions below), but we do not recommend it for production runs.


### R and RStudio

::: {.tabset group="os"}
::: {.panel-tabset group="os"}

#### Windows

Expand All @@ -43,7 +50,7 @@ Download and install all these using default options:
- [RTools](https://cran.r-project.org/bin/windows/Rtools/)
- [RStudio](https://www.rstudio.com/products/rstudio/download/#download)

#### Mac OS
#### macOS

Download and install all these using default options:

Expand All @@ -58,37 +65,124 @@ Download and install all these using default options:
:::


### R Packages

Open RStudio and run the following:

```r
# install BiocManager if not installed already
if (!require("BiocManager", quietly = TRUE)){
install.packages("BiocManager")
}

<!--
### Conda
# Install all packages used
BiocManager::install(c("GenomicRanges", "rtracklayer", "plyranges", "ChIPseeker", "profileplyr", "ggplot2", "DiffBind"))
```


### Conda/Mamba

Open a terminal and run:
For the command-line tools covered in the course you will need a Linux machine (or _WSL2_, if you are on Windows - see @sec-wsl).

If you are an experienced Linux user, you can install/compile each tool individually using your preferred method.
Otherwise, we recommend doing it via the [Mamba package manager](https://mamba.readthedocs.io/en/latest/installation.html).
If you already use Conda/Mamba you can skip this step.

To make a fresh install of Mamba, you can run:

```bash
wget -q -O - https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b
rm Miniconda3-latest-Linux-x86_64.sh
conda init
conda config --add channels defaults; conda config --add channels bioconda; conda config --add channels conda-forge; conda config --set channel_priority strict
conda install -y mamba
wget "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh"
bash Mambaforge-$(uname)-$(uname -m).sh
```

Note: Windows users can use WSL2 (see @wsl).
-->
And follow the instructions on the terminal, accepting the defaults.
Make sure to restart your terminal after the installation completes.

These instructions also work if you're using a HPC server.


### Nextflow

We recommend having a dedicated environment for _Nextflow_, which you can use across multiple pipelines you use in the future.
Assuming you've already installed Conda/Mamba, open your terminal and run:

```bash
mamba create --name nextflow nextflow
```

Whenever you want to use nextflow, you need to activate your environment with `conda activate nextflow`.


### ChIP-seq tools

For other command-line tools that we covered in the workshop, you can install them in their own conda environment:

```bash
mamba create --name chipseq
mamba install --name chipseq idr deeptools meme homer
```

When you want to use any of them, make sure to activate your environment first with `conda activate chipseq`.


### Windows WSL2 {#sec-wsl}

:::{.callout-warning}
We highly recommend running the raw data processing pipeline on a dedicated Linux server (typically a HPC), not directly on Windows via WSL2.
Although you can technically run the entire pipeline on WSL2, it may be a very suboptimal way of doing so for real data.
:::

The **Windows Subsystem for Linux (WSL2)** runs a compiled version of Ubuntu natively on Windows.
There are detailed instructions on how to install WSL on the [Microsoft documentation page](https://learn.microsoft.com/en-us/windows/wsl/install).
Briefly:

- Click the Windows key and search for _Windows PowerShell_, open it and run the command: `wsl --install`.
- Restart your computer.
- Click the Windows key and search for _Ubuntu_, which should open a new terminal.
- Follow the instructions to create a username and password (you can use the same username and password that you have on Windows, or a different one - it's your choice).
- You should now have access to a Ubuntu Linux terminal.
This (mostly) behaves like a regular Ubuntu terminal, and you can install apps using the `sudo apt install` command as usual.

#### Setup directories

After WSL is installed, it is useful to create shortcuts to your files on Windows.
Your `C:\` drive is located in `/mnt/c/` (equally, other drives will be available based on their letter).
For example, your desktop will be located in: `/mnt/c/Users/<WINDOWS USERNAME>/Desktop/`.
It may be convenient to set shortcuts to commonly-used directories, which you can do using _symbolic links_, for example:

- **Documents:** `ln -s /mnt/c/Users/<WINDOWS USERNAME>/Documents/ ~/Documents`
- If you use OneDrive to save your documents, use: `ln -s /mnt/c/Users/<WINDOWS USERNAME>/OneDrive/Documents/ ~/Documents`
- **Desktop:** `ln -s /mnt/c/Users/<WINDOWS USERNAME>/Desktop/ ~/Desktop`
- **Downloads**: `ln -s /mnt/c/Users/<WINDOWS USERNAME>/Downloads/ ~/Downloads`


#### Docker for WSL

We've experienced issues in the past when running _Nextflow_ pipelines from WSL2 with `-profile singularity`.
As an alternative, you can instead use **_Docker_**, which is another software containerisation solution.
To set this up, you can follow the instructions given on the Microsoft Documentation: [Get started with Docker remote containers on WSL 2](https://learn.microsoft.com/en-us/windows/wsl/tutorials/wsl-containers).

Once you have _Docker_ set and installed, you can then use `-profile docker` when running your _Nextflow_ command.


<!--
### Singularity

Singularity is a software for running a virtual operating system locally (known as a container) and popularly used for complex bioinformatic pipelines.
_Nextflow_ supports the use of _Singularity_ for managing its software and we **recommend its use it on HPC servers**.
_Singularity_ is typically installed by your HPC admins, otherwise request that they do so.

However, if you want to run the analysis locally on your computer (again, we do not recommend you to do so), then you can install Singularity following the instructions below.

::: {.panel-tabset group="os"}

#### Windows

You can use _Singularity_ from the _Windows Subsystem for Linux_ (see @wsl).
You can use _Singularity_ from the _Windows Subsystem for Linux_ (see @sec-wsl).
Once you setup WSL, you can follow the instructions for Linux.

#### Mac OS
#### macOS

Singularity is [not available for Mac OS](https://docs.sylabs.io/guides/3.0/user-guide/installation.html#install-on-windows-or-mac).
Singularity is [not available for macOS](https://docs.sylabs.io/guides/3.0/user-guide/installation.html#install-on-windows-or-mac).

#### Linux

Expand All @@ -98,14 +192,14 @@ These instructions are for _Ubuntu_ or _Debian_-based distributions[^1].

```bash
sudo apt update && sudo apt upgrade && sudo apt install runc
CODENAME=$(lsb_release -c | sed 's/Codename:\t//')
wget -O singularity.deb https://github.com/sylabs/singularity/releases/download/v3.10.2/singularity-ce_3.10.2-${CODENAME}_amd64.deb
codename=$(lsb_release -c | sed 's/Codename:\t//')
wget -O singularity.deb https://github.com/sylabs/singularity/releases/download/v3.10.2/singularity-ce_3.11.4-${codename}_amd64.deb
sudo dpkg -i singularity.deb
rm singularity.deb
```

:::
-->



<!--
Expand Down

0 comments on commit 421e117

Please sign in to comment.