macs3-project / MACS

MACS -- Model-based Analysis of ChIP-Seq
https://macs3-project.github.io/MACS/
BSD 3-Clause "New" or "Revised" License
713 stars 268 forks source link

Advanced: Call peaks using MACS2 subcommands - How to obtain fold enrichment #394

Open olechnwin opened 4 years ago

olechnwin commented 4 years ago

I am following the steps in https://github.com/taoliu/MACS/wiki/Advanced%3A-Call-peaks-using-MACS2-subcommands.

The final output will generate a file with peak location and p-values or q-values. Is there a way to get a file with peaks location, p-values/q-values and fold-enrichment?

Thank you!

taoliu commented 4 years ago

@olechnwin The bdgpeakcall subcommands can't output pvalue, q-value and fold-enrichment at the same time. What it can see is only the fourth column of the input bedGraph file by -i. So if the input file is a bedGraph file with -log10(p-values) in the fourth column, then the output narrowPeak file will have 10 times of the -log10(p-value) of the peak summit in the score (5th) column. And if your input contains -log10(q-value), the output will have the 10*-log10(q-value) of peak summit in the 5th column.

olechnwin commented 4 years ago

@taoliu Sorry I wasn't being clear. I was wondering whether you have any suggestion on how to get the fold enrichment. I wonder whether I can run bdgpeakcall with a bedGraph containing -log10(p-values) in the fourth column to get the output narrowPeak file with pvalue score in the 5th column. Then, run another bdgpeakcall with bedGraph containing fold-enrichment and get the narrowPeak output with fold-enrichment score in the 5th column. Can I simply intersect them?