SnapATAC2 icon indicating copy to clipboard operation
SnapATAC2 copied to clipboard

Add store_bdg, SPMR, broad parameters for calling peaks using MACS3

Open beyondpie opened this issue 1 year ago • 4 comments

Hi Kai,

I add three parameters for peak calling.

  1. On bed graph generation:

    • SPMR and store_bdg, I open the two parameters since we notice that MACS2/3 can generate the smoothed bedgraphs for our later deep learning model usage.
  2. On broad peak calling:

    • add broad to allow broad peak calling. We typically use this for broad peak calling on some histone modifications.

But I am not sure if this is enough for the peak calling function since I notice that you actually have a rust layer for the real task. Another question I have: there is nomodel parameter in the list. According the MACS3 README, it seems to be needed for extsize parameter.

By default, I set all of them false in order to keep the default behavior of your function.

Thanks! Songpeng

beyondpie avatar Aug 27 '24 23:08 beyondpie

Thanks for the pull request!

  1. I suggest remove store_bdg, SPMR. And implement bedgraph smoothing in https://kzhang.org/SnapATAC2/api/_autosummary/snapatac2.ex.export_coverage.html. This should be easy.
  2. Have you check if the broad peaks called by macs3 and snapatac2 agree with each other?

kaizhang avatar Aug 28 '24 00:08 kaizhang

Hi Kai, Thanks for your suggestions!

  1. I will give it a look. In MACS2/3, it allows us to shift and extend the fragments, not sure if your function of export_coverage support this. I think this is the main reason why we choose MACS2, otherwise, deepTools or bedtools also provide the generation of tracks with more parameters.

  2. I did not use SnapATAC2 for peak calling later since in our current pipeline, we use bam files to directly call peaks. But Johnny(@zwang0715) recently used SnapATAC2 for peak calling. Maybe he can give us some comments here. BTW, is the parameter nomodel used in your peak calling pipeline?

Thanks! Songpeng

beyondpie avatar Aug 28 '24 16:08 beyondpie

yes, nomodel is used

kaizhang avatar Sep 02 '24 23:09 kaizhang

@kaizhang https://kzhang.org/SnapATAC2/api/_autosummary/snapatac2.tl.macs3.html From this doc, it supported the unmerged content, like save_bdg. Do you think we should merge this commit or update the document to reflect the stable version?

Thanks! Songpeng

beyondpie avatar Oct 14 '24 23:10 beyondpie

Broad peak calling was added in c60ddecf111d651c4e24a5ef1845d6505553c485. I'm closing this pull request.

kaizhang avatar Nov 29 '24 01:11 kaizhang