We have some ChIP data with UMIs in the reads. We are planning to duplicate mark using either umi_tools or Picard to mark duplicates in a UMI aware fashion.
I would produce BAM or BED files with only the reads that should be considered for peak calling and use --keep-dup=all to make MACS use only and exactly those reads.
My understanding is that MACS doesn't mark-duplicates, but rather filters out reads that have been marked as duplicates by a seperate tool (although I may be wrong).
Further, I don't think that MACS has any way to deal with UMI deduplication - that is, if you had four reads that the same place on the genome, with two reads each for two separate UMIs, I'm entirely unclear what MACS would do with that, but its quite likely I think that it will filter out all but one of them.
Finally, UMI-tools unfortunately doesn't have an option to mark duplicates, only deduplicate, or mark each read as to which "group" it comes from.
Thus, I would recommend deduplicating your reads with umi_tools dedup and then feeding these into MACS with --keep-dup=all as recommended by @ATpoint.
Maybe this will work if I just use the "callpeak" function.
Probably not as even though callpeak is a separate command it still documents that MACS2 will make its own decision about which reads are duplicates.
I would produce BAM or BED files with only the reads that should be considered for peak calling and use
--keep-dup=all
to make MACS use only and exactly those reads.