Commit 17819f9c authored by Schauer's avatar Schauer
Browse files

update rmd with path

parent e78c22bb
## Correlation analysis
- Download the repository to your local computer so you can look at the pre-made files
## Prerequisites
- [conda](https://docs.conda.io/en/latest/miniconda.html)
## Setup
- Login to the HPC
```{bash}
ssh your.user@hpc-submit01.scidom.de
```
- Start an interactive session
```{bash}
srun -p normal_q --qos normal --reservation=chromatin -c 8 --mem=32G --pty bash
```
- Change to your directory
```{bash}
cd /lustre/groups/shared/chromatin/your.user
```
- clone repository
```{bash}
git clone https://ascgitlab.helmholtz-muenchen.de/chromatin_summer_school_2022/workshops/correlation.git
```
- activate environment (created [here](https://ascgitlab.helmholtz-muenchen.de/chromatin_summer_school_2022/workshops/data_processing_1))
```{bash}
conda activate env_workshop
```
## Tutorial
- follow the tutorial in the ```correlation.html``` file (downloaded to your local computer)
- or alternatively the ```correlation.md``` (ong gitlab)
......@@ -625,65 +625,7 @@ pre code {
<h2>Correlation</h2>
<div id="bigwig-files" class="section level4">
<h4>Bigwig files</h4>
<div class="sourceCode" id="cb1"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">ls</span> <span class="at">-1</span> tracks/<span class="pp">*</span></span></code></pre></div>
<pre><code>tracks/ATAC_1.bw
tracks/ATAC_2.bw
tracks/ATAC_3.bw
tracks/ATAC_4.bw
tracks/ATAC_5.bw
tracks/ATAC_6.bw
tracks/CT_H3K27ac_1.bw
tracks/CT_H3K27ac_2.bw
tracks/CT_H3K27ac_4.bw
tracks/CT_H3K27ac_5.bw
tracks/CT_H3K27ac_6.bw
tracks/CT_H3K27me3_1.bw
tracks/CT_H3K27me3_2.bw
tracks/CT_H3K27me3_3.bw
tracks/CT_H3K27me3_4.bw
tracks/CT_H3K27me3_5.bw
tracks/CT_H3K27me3_6.bw
tracks/CT_H3K4me3_3.bw
tracks/CT_IgG_1.bw
tracks/CT_IgG_2.bw
tracks/CT_IgG_3.bw
tracks/CT_IgG_4.bw
tracks/CT_IgG_5.bw
tracks/CT_IgG_6.bw
tracks/G1_H3k27ac.bw
tracks/G1_H3k27me3.bw
tracks/G1_IgG.bw
tracks/G2_H3k27ac.bw
tracks/G2_H3k27me3.bw
tracks/G2_IgG.bw
tracks/G3_H3K27me3.bw
tracks/G3_H3k27ac.bw
tracks/G3_IgG.bw
tracks/G4_H3k27ac.bw
tracks/G4_H3k27me3.bw
tracks/G4_IgG.bw
tracks/G5_H3k27ac.bw
tracks/G5_H3k27me3.bw
tracks/G5_IgG.bw
tracks/G6_H3k27ac.bw
tracks/G6_H3k27me3.bw
tracks/G6_IgG.bw
tracks/Gr5_H3K27ac.bw
tracks/Gr5_H3K27me3.bw
tracks/Gr5_input.bw
tracks/KP_H3K27ac.bw
tracks/KP_H3K27me3.bw
tracks/KP_input.bw
tracks/P1_H3k27ac_30.bw
tracks/P1_H3k27me3_30.bw
tracks/P2_H3k27ac_60.bw
tracks/P2_H3k27me3_60.bw
tracks/PM_H3K27ac.bw
tracks/PM_H3K27me3.bw
tracks/PM_input.bw
tracks/P_M_H3K27ac.bw
tracks/P_M_H3K27me3.bw
tracks/P_M_input.bw</code></pre>
<div class="sourceCode" id="cb1"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">ls</span> <span class="at">-1</span> /lustre/groups/shared/chromatin/gabriela/workflows/snakemake-ngs-processing/results/bigWig/hg38/<span class="pp">*</span></span></code></pre></div>
<ul>
<li>deeptools <a href="https://deeptools.readthedocs.io/en/develop/content/tools/multiBigwigSummary.html">docs</a></li>
</ul>
......@@ -693,18 +635,17 @@ tracks/P_M_input.bw</code></pre>
<ul>
<li>summary of read counts</li>
</ul>
<div class="sourceCode" id="cb3"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">multiBigwigSummary</span> bins <span class="dt">\</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a>--numberOfProcessors 18 <span class="dt">\</span></span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a>--bwfiles tracks/<span class="pp">*</span> <span class="dt">\</span></span>
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a>--blackListFileName blacklists/hg38-blacklist.v2.bed <span class="dt">\</span></span>
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a>--smartLabels <span class="dt">\</span></span>
<span id="cb3-6"><a href="#cb3-6" aria-hidden="true" tabindex="-1"></a>--outFileName results/scores_per_bin.npz <span class="dt">\</span></span>
<span id="cb3-7"><a href="#cb3-7" aria-hidden="true" tabindex="-1"></a>--outRawCounts results/scores_per_bin.tab</span></code></pre></div>
<pre><code>Number of bins found: 298783</code></pre>
<div class="sourceCode" id="cb2"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">multiBigwigSummary</span> bins <span class="dt">\</span></span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a>--numberOfProcessors 8 <span class="dt">\</span></span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a>--bwfiles /lustre/groups/shared/chromatin/gabriela/workflows/snakemake-ngs-processing/results/bigWig/hg38/<span class="pp">*</span> <span class="dt">\</span></span>
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a>--blackListFileName blacklists/hg38-blacklist.v2.bed <span class="dt">\</span></span>
<span id="cb2-5"><a href="#cb2-5" aria-hidden="true" tabindex="-1"></a>--smartLabels <span class="dt">\</span></span>
<span id="cb2-6"><a href="#cb2-6" aria-hidden="true" tabindex="-1"></a>--outFileName results/scores_per_bin.npz <span class="dt">\</span></span>
<span id="cb2-7"><a href="#cb2-7" aria-hidden="true" tabindex="-1"></a>--outRawCounts results/scores_per_bin.tab</span></code></pre></div>
<ul>
<li>summary matrix</li>
</ul>
<div class="sourceCode" id="cb5"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="fu">head</span> results/scores_per_bin.tab</span></code></pre></div>
<div class="sourceCode" id="cb3"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="fu">head</span> results/scores_per_bin.tab</span></code></pre></div>
<pre><code>#&#39;chr&#39; &#39;start&#39; &#39;end&#39; &#39;ATAC_1&#39; &#39;ATAC_2&#39; &#39;ATAC_3&#39; &#39;ATAC_4&#39; &#39;ATAC_5&#39; &#39;ATAC_6&#39; &#39;CT_H3K27ac_1&#39; &#39;CT_H3K27ac_2&#39; &#39;CT_H3K27ac_4&#39; &#39;CT_H3K27ac_5&#39; &#39;CT_H3K27ac_6&#39; &#39;CT_H3K27me3_1&#39; &#39;CT_H3K27me3_2&#39; &#39;CT_H3K27me3_3&#39; &#39;CT_H3K27me3_4&#39; &#39;CT_H3K27me3_5&#39; &#39;CT_H3K27me3_6&#39; &#39;CT_H3K4me3_3&#39; &#39;CT_IgG_1&#39; &#39;CT_IgG_2&#39; &#39;CT_IgG_3&#39; &#39;CT_IgG_4&#39; &#39;CT_IgG_5&#39; &#39;CT_IgG_6&#39; &#39;G1_H3k27ac&#39; &#39;G1_H3k27me3&#39; &#39;G1_IgG&#39; &#39;G2_H3k27ac&#39; &#39;G2_H3k27me3&#39; &#39;G2_IgG&#39; &#39;G3_H3K27me3&#39; &#39;G3_H3k27ac&#39; &#39;G3_IgG&#39; &#39;G4_H3k27ac&#39; &#39;G4_H3k27me3&#39; &#39;G4_IgG&#39; &#39;G5_H3k27ac&#39; &#39;G5_H3k27me3&#39; &#39;G5_IgG&#39; &#39;G6_H3k27ac&#39; &#39;G6_H3k27me3&#39; &#39;G6_IgG&#39; &#39;Gr5_H3K27ac&#39; &#39;Gr5_H3K27me3&#39; &#39;Gr5_input&#39; &#39;KP_H3K27ac&#39; &#39;KP_H3K27me3&#39; &#39;KP_input&#39; &#39;P1_H3k27ac_30&#39; &#39;P1_H3k27me3_30&#39; &#39;P2_H3k27ac_60&#39; &#39;P2_H3k27me3_60&#39; &#39;PM_H3K27ac&#39; &#39;PM_H3K27me3&#39; &#39;PM_input&#39; &#39;P_M_H3K27ac&#39; &#39;P_M_H3K27me3&#39; &#39;P_M_input&#39;
chr19_GL949749v2_alt 0 10000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0008405057191848755 0.0 0.0 0.0008653428077697754 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
chr19_GL949749v2_alt 10000 20000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
......@@ -718,19 +659,19 @@ chr19_GL949749v2_alt 80000 90000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
<ul>
<li>plot correlation</li>
</ul>
<div class="sourceCode" id="cb7"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="ex">plotCorrelation</span> <span class="dt">\</span></span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a>--corData results/scores_per_bin.npz <span class="dt">\</span></span>
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a>--corMethod spearman <span class="at">--skipZeros</span> <span class="dt">\</span></span>
<span id="cb7-4"><a href="#cb7-4" aria-hidden="true" tabindex="-1"></a>--plotTitle <span class="st">&quot;Spearman Correlation of Read Counts&quot;</span> <span class="dt">\</span></span>
<span id="cb7-5"><a href="#cb7-5" aria-hidden="true" tabindex="-1"></a>--whatToPlot heatmap <span class="at">--colorMap</span> RdBu_r <span class="at">--plotNumbers</span> <span class="dt">\</span></span>
<span id="cb7-6"><a href="#cb7-6" aria-hidden="true" tabindex="-1"></a>--plotHeight 14.25 <span class="dt">\</span></span>
<span id="cb7-7"><a href="#cb7-7" aria-hidden="true" tabindex="-1"></a>--plotWidth 16.5 <span class="dt">\</span></span>
<span id="cb7-8"><a href="#cb7-8" aria-hidden="true" tabindex="-1"></a>-o plots/heatmap_SpearmanCorr_readCounts.png <span class="dt">\</span></span>
<span id="cb7-9"><a href="#cb7-9" aria-hidden="true" tabindex="-1"></a>--outFileCorMatrix results/SpearmanCorr_readCounts.tab </span></code></pre></div>
<div class="sourceCode" id="cb5"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="ex">plotCorrelation</span> <span class="dt">\</span></span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a>--corData results/scores_per_bin.npz <span class="dt">\</span></span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a>--corMethod spearman <span class="at">--skipZeros</span> <span class="dt">\</span></span>
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a>--plotTitle <span class="st">&quot;Spearman Correlation of Read Counts&quot;</span> <span class="dt">\</span></span>
<span id="cb5-5"><a href="#cb5-5" aria-hidden="true" tabindex="-1"></a>--whatToPlot heatmap <span class="at">--colorMap</span> RdBu_r <span class="at">--plotNumbers</span> <span class="dt">\</span></span>
<span id="cb5-6"><a href="#cb5-6" aria-hidden="true" tabindex="-1"></a>--plotHeight 14.25 <span class="dt">\</span></span>
<span id="cb5-7"><a href="#cb5-7" aria-hidden="true" tabindex="-1"></a>--plotWidth 16.5 <span class="dt">\</span></span>
<span id="cb5-8"><a href="#cb5-8" aria-hidden="true" tabindex="-1"></a>-o plots/heatmap_SpearmanCorr_readCounts.png <span class="dt">\</span></span>
<span id="cb5-9"><a href="#cb5-9" aria-hidden="true" tabindex="-1"></a>--outFileCorMatrix results/SpearmanCorr_readCounts.tab </span></code></pre></div>
<ul>
<li>correlation matrix</li>
</ul>
<div class="sourceCode" id="cb8"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="fu">head</span> results/SpearmanCorr_readCounts.tab</span></code></pre></div>
<div class="sourceCode" id="cb6"><pre class="sourceCode bash"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="fu">head</span> results/SpearmanCorr_readCounts.tab</span></code></pre></div>
<pre><code>#plotCorrelation --outFileCorMatrix
&#39;G1_H3k27me3&#39; &#39;PM_H3K27me3&#39; &#39;Gr5_input&#39; &#39;KP_input&#39; &#39;PM_input&#39; &#39;P_M_input&#39; &#39;G5_IgG&#39; &#39;G1_IgG&#39; &#39;G4_IgG&#39; &#39;G3_IgG&#39; &#39;G6_IgG&#39; &#39;G2_IgG&#39; &#39;G1_H3k27ac&#39; &#39;ATAC_1&#39; &#39;G4_H3k27ac&#39; &#39;G5_H3k27ac&#39; &#39;P1_H3k27ac_30&#39; &#39;P2_H3k27ac_60&#39; &#39;G6_H3k27ac&#39; &#39;Gr5_H3K27ac&#39; &#39;P_M_H3K27ac&#39; &#39;G3_H3k27ac&#39; &#39;KP_H3K27ac&#39; &#39;PM_H3K27ac&#39; &#39;ATAC_2&#39; &#39;ATAC_3&#39; &#39;ATAC_4&#39; &#39;ATAC_5&#39; &#39;ATAC_6&#39; &#39;CT_H3K27ac_1&#39; &#39;CT_H3K27ac_2&#39; &#39;CT_H3K27ac_6&#39; &#39;CT_H3K27ac_4&#39; &#39;CT_H3K27ac_5&#39; &#39;CT_IgG_5&#39; &#39;CT_H3K4me3_3&#39; &#39;CT_IgG_3&#39; &#39;G2_H3k27ac&#39; &#39;G4_H3k27me3&#39; &#39;CT_H3K27me3_3&#39; &#39;CT_IgG_1&#39; &#39;CT_IgG_6&#39; &#39;CT_IgG_2&#39; &#39;CT_IgG_4&#39; &#39;G5_H3k27me3&#39; &#39;G3_H3K27me3&#39; &#39;KP_H3K27me3&#39; &#39;G6_H3k27me3&#39; &#39;Gr5_H3K27me3&#39; &#39;P_M_H3K27me3&#39; &#39;P2_H3k27me3_60&#39; &#39;G2_H3k27me3&#39; &#39;P1_H3k27me3_30&#39; &#39;CT_H3K27me3_2&#39; &#39;CT_H3K27me3_1&#39; &#39;CT_H3K27me3_5&#39; &#39;CT_H3K27me3_4&#39; &#39;CT_H3K27me3_6&#39;
&#39;G1_H3k27me3&#39; 1.0000 0.6942 0.4841 0.5772 0.5635 0.5311 0.5781 0.6270 0.6158 0.5220 0.5058 0.5161 0.5935 0.6383 0.6018 0.6240 0.4884 0.4405 0.4624 0.4232 0.4449 0.5171 0.5553 0.5131 0.5190 0.4971 0.4920 0.5448 0.5810 0.2392 0.3057 0.2736 0.2720 0.2843 0.3707 0.3336 0.4079 0.4440 0.0057 0.3798 0.2334 0.3087 0.1520 0.1891 0.1971 0.6884 0.6548 0.5403 0.4649 0.4874 0.5843 0.5978 0.6233 0.5101 0.5199 0.4907 0.4759 0.4866
......@@ -44,69 +44,9 @@ pre code {
#### Bigwig files
```bash
ls -1 tracks/*
```
```
tracks/ATAC_1.bw
tracks/ATAC_2.bw
tracks/ATAC_3.bw
tracks/ATAC_4.bw
tracks/ATAC_5.bw
tracks/ATAC_6.bw
tracks/CT_H3K27ac_1.bw
tracks/CT_H3K27ac_2.bw
tracks/CT_H3K27ac_4.bw
tracks/CT_H3K27ac_5.bw
tracks/CT_H3K27ac_6.bw
tracks/CT_H3K27me3_1.bw
tracks/CT_H3K27me3_2.bw
tracks/CT_H3K27me3_3.bw
tracks/CT_H3K27me3_4.bw
tracks/CT_H3K27me3_5.bw
tracks/CT_H3K27me3_6.bw
tracks/CT_H3K4me3_3.bw
tracks/CT_IgG_1.bw
tracks/CT_IgG_2.bw
tracks/CT_IgG_3.bw
tracks/CT_IgG_4.bw
tracks/CT_IgG_5.bw
tracks/CT_IgG_6.bw
tracks/G1_H3k27ac.bw
tracks/G1_H3k27me3.bw
tracks/G1_IgG.bw
tracks/G2_H3k27ac.bw
tracks/G2_H3k27me3.bw
tracks/G2_IgG.bw
tracks/G3_H3K27me3.bw
tracks/G3_H3k27ac.bw
tracks/G3_IgG.bw
tracks/G4_H3k27ac.bw
tracks/G4_H3k27me3.bw
tracks/G4_IgG.bw
tracks/G5_H3k27ac.bw
tracks/G5_H3k27me3.bw
tracks/G5_IgG.bw
tracks/G6_H3k27ac.bw
tracks/G6_H3k27me3.bw
tracks/G6_IgG.bw
tracks/Gr5_H3K27ac.bw
tracks/Gr5_H3K27me3.bw
tracks/Gr5_input.bw
tracks/KP_H3K27ac.bw
tracks/KP_H3K27me3.bw
tracks/KP_input.bw
tracks/P1_H3k27ac_30.bw
tracks/P1_H3k27me3_30.bw
tracks/P2_H3k27ac_60.bw
tracks/P2_H3k27me3_60.bw
tracks/PM_H3K27ac.bw
tracks/PM_H3K27me3.bw
tracks/PM_input.bw
tracks/P_M_H3K27ac.bw
tracks/P_M_H3K27me3.bw
tracks/P_M_input.bw
```bash
ls -1 /lustre/groups/shared/chromatin/gabriela/workflows/snakemake-ngs-processing/results/bigWig/hg38/*
```
......@@ -120,18 +60,14 @@ tracks/P_M_input.bw
```bash
multiBigwigSummary bins \
--numberOfProcessors 18 \
--bwfiles tracks/* \
--numberOfProcessors 8 \
--bwfiles /lustre/groups/shared/chromatin/gabriela/workflows/snakemake-ngs-processing/results/bigWig/hg38/* \
--blackListFileName blacklists/hg38-blacklist.v2.bed \
--smartLabels \
--outFileName results/scores_per_bin.npz \
--outRawCounts results/scores_per_bin.tab
```
```
Number of bins found: 298783
```
- summary matrix
```bash
......
Supports Markdown
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