-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve fragment size handling for MACS2 peak calling #193
Comments
Hi @ppericard, I intentionally avoided passing the fragment size to the peak calling because one of the main advantages of MACS2 is that it is able to calculate the shifting model itself. The fragment size is actually used for other processes such as creating the bigWig tracks and for some QC plots with deepTools where this information will not be known. A better solution would be to let the user decide which parameters they would like to provide MACS2 in these instances, and that will be possible in the next release anyway since it will be written in DSL2. |
Hi @drpatelh. I understand the logic. I'm just surprised no-one was stopped by this pb before. I have IP tracks with very clear signal but macs2 cannot identify correctly the shifting model. I have no idea why. |
Yeah, sorry. Its a fine balance between providing a generic set of parameters that can be used to tune the behaviour of the pipeline, maintaining best practice and trying to factor in everyone's use cases. Defo should be easier in the next release. |
Hi @drpatelh, is it possible to reopen this issue? I have also had problems with smaller genome that was workable by specifying Now that the release is in DSL2, maybe it can be implemented? Here is what worked for me, but I haven't worked on the details, and I'm new to this so I don't know if this is optimal: |
Hi @johannesnicolaus ! Pinging @JoseEspinosa here because he has been responsible for bringing the pipeline to DSL2. Might be easier to have a single parameter that sets non-mandatory options for MACS2 e.g. Have you tried overriding these options via a custom config file? This is one of the benefits of using the DSL2 implementation. |
Thanks for the reply! Do you mean to set these options via a custom config file? I haven't tried that yet because changing the |
Yes, I think more people are modifying macs2 parameters using a custom config. Actually, this slack exchange might be interesting for you: https://nfcore.slack.com/archives/CFP55NZ5G/p1652280017471059?thread_ts=1652184721.335959&cid=CFP55NZ5G About implementing the |
Thanks! Seems good for now |
Can be tuned from 2.0.0 release |
Right now, the fragment size can be a main input parameter of the nf-core/chipseq pipeline. However, if this parameter is supplied, MACS2 callpeaks is still set-up to automatically guess the fragment size. If the IP signal is not strong enough, or the coverage is not very high, the detection algorithm can easily fail to detect or guess correctly the fragment size which leads to the peak-calling step crashing.
The solution I'm suggesting is: if the user inputs the fragment size then it could be passed to MACS2 callpeaks like this:
Or at least, the user should have the option to deactivate automatic detection in MACS2 callpeaks and pass the input fragment size
The text was updated successfully, but these errors were encountered: