nf-core / chipseq

ChIP-seq peak-calling, QC and differential analysis pipeline.
https://nf-co.re/chipseq
MIT License
177 stars 144 forks source link

chromap chipseq default mode remove duplicates making preseq fail #288

Closed JoseEspinosa closed 1 year ago

JoseEspinosa commented 1 year ago

As mentioned above, the --preset chip argument of chromap includes the removal of duplicates (--remove-pcr-duplicates set by the preset) and thus, the downstream PRESEQ_LCEXTRAP process fails with the following error: ERROR: max count before zero is less than min required count (4) duplicates removed

To fix this issue we could use chromap with the arguments included by the --preset chip without including the --remove-pcr-duplicates argument and keep all the rest of the code as it is now for consistency or otherwise, we could keep the removal of duplicates and just skip the affected downstream steps (which seems more optimal). What do you think @drpatelh ?

drpatelh commented 1 year ago

We are already removing duplicates with Picard MarkDuplicates right? If so, I would be tempted to use that to remove duplicates before running any downstream peak callers for consistency. This would mean switching off any automatic duplicate removal in tools like MAC2 and Chromap.

JoseEspinosa commented 1 year ago

We are already removing duplicates with Picard MarkDuplicates right?

Yes, the only thing is that chromap is not a peak caller but an aligner specially meant for aligning ChIP-seq, ATAC-seq and similar (https://github.com/haowenz/chromap). That is why I was wondering whether to switch the removal of duplicates since in fact the chromap step is placed upstream of the Picard MarkDuplicates. Anyway, I think I will switch off the removal of duplicates for this release and keep this issue open so that we can take this point into consideration in following releases.

drpatelh commented 1 year ago

Sounds sensible 👍🏽 If we use a single tool like Picard Markduplicates to remove the duplicates then it will be easier to benchmark and compare results downstream.

JoseEspinosa commented 1 year ago

Closed by https://github.com/nf-core/chipseq/pull/290