# Score predefined ChIP-seq peaks with MACS2 or equivalent

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?

• 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. Nov 26 '18 at 11:34
• 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. Nov 27 '18 at 14:51
• Ah, if you really want that then yes you'll need to use the (undocumented) MACS2 API. Nov 27 '18 at 15:04

macs2 callpeak -t <ChIP>.bam -c <Control>.bam -f BED -g hs -n test -B -p 0.7

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.