<p>You could try setting a high p-value threshold when you're calling peaks to retain the "non-significant" values. Something like:</p>

<pre><code>macs2 callpeak -t &lt;ChIP&gt;.bam -c &lt;Control&gt;.bam -f BED -g hs -n test -B -p 0.7
</code></pre>

<p>You probably don't want to set the threshold to 1, since you'll likely want to avoid some noise.</p>

<p>But you can then use these "non-significant" values in combination with a <code>bedtools map</code> command, to map them to your predefined union of "actual" peaks.</p>

CC BY-SA 4.0
2018-11-29T20:59:33.423Z
2018-11-29T20:59:33.423Z
James Hawley
<p>I have performed peak calling on a number of separate ChIP-seq experiments and would like to harmonise the peaks from each of the experiments in order to convert my data into a matrix for further analysis. I would like to do this by taking the union of the called peaks (available in BED / narrowPeak / MACS2 format) and retrieving the enrichment score / q-value for all of the experiments on each peak. Is this possible without writing my own extension to MACS2?</p>

CC BY-SA 4.0
2018-11-26T11:34:55.833Z
This is going to be an custom script so you're not going to touch MACS2 itself. The only question is how you want to summarize q-values from different samples. Other than that this is a job for bedtools/bedops.
Devon Ryan
CC BY-SA 4.0
2018-11-27T14:51:24.687Z
Here's why I think I still need MACS - say Sample A has a peak at chrN:100-200, but Sample B does not. In order to avoid missing values, I would like to get the (not significant) enrichment score from that peak for Sample B using the MACS2 algorithm.
Scott Gigante
CC BY-SA 4.0
2018-11-27T15:04:57.653Z
Ah, if you really want that then yes you'll need to use the (undocumented) MACS2 API.
Devon Ryan
<chip-seq><peak-calling><macs2>
Score predefined ChIP-seq peaks with MACS2 or equivalent
# Score predefined ChIP-seq peaks with MACS2 or equivalent

(Asked by: username_0 on 2018-11-26)

I have performed peak calling on a number of separate ChIP-seq experiments and would like to harmonise the peaks from each of the experiments in order to convert my data into a matrix for further analysis. I would like to do this by taking the union of the called peaks (available in BED / narrowPeak / MACS2 format) and retrieving the enrichment score / q-value for all of the experiments on each peak. Is this possible without writing my own extension to MACS2?

**Tags:** chip-seq, peak-calling, macs2
> **Comments:**
> **username_1**: This is going to be an custom script so you're not going to touch MACS2 itself. The only question is how you want to summarize q-values from different samples. Other than that this is a job for bedtools/bedops.  
> **username_0**: Here's why I think I still need MACS - say Sample A has a peak at chrN:100-200, but Sample B does not. In order to avoid missing values, I would like to get the (not significant) enrichment score from that peak for Sample B using the MACS2 algorithm.  
> **username_1**: Ah, if you really want that then yes you'll need to use the (undocumented) MACS2 API.  

---

## 1 answers

### Answer by username_2 on 2018-11-29. Score: 2

You could try setting a high p-value threshold when you're calling peaks to retain the "non-significant" values. Something like:
macs2 callpeak -t .bam -c .bam -f BED -g hs -n test -B -p 0.7

You probably don't want to set the threshold to 1, since you'll likely want to avoid some noise.
But you can then use these "non-significant" values in combination with a bedtools map command, to map them to your predefined union of "actual" peaks.


---

