nf-core / chipseq

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

Output bigwigs with macs2 p-value signal for every base-pair #251

Open Al-Murphy opened 2 years ago

Al-Murphy commented 2 years ago

I am looking for the MACS2 p-value signal for every base-pair, similar to the bigwigs available from ROADMAP or EPIMAP.

Had a discussion with @JoseEspinosa and he thinks it may be available using the --bdg option when calling MACS2 but this is not a parameter that is currently available:

https://github.com/nf-core/chipseq/blob/6924b669422215f9021144b251e83fc9929be1fe/main.nf#L1135-L1145

jcotney commented 2 years ago

Just getting into nextflow and this would be very helpful for us as well. This has to be done after the initial callpeak command. Use bdgcmp command to compare the two bedgraphs originally generated by macs2 with the -B/--bdg and --SPMR options

This is how we have typically done this for histone mods: macs2 callpeak -t x_norm_sorted.bam -c y-Input_norm_sorted.bam -n x -f BAM -g hs --keep-dup all --nomodel -p 1e-2 --broad --nomodel --extsize -B --SPMR macs2 bdgcmp -t x_treat_pileup.bdg -c y_control_lambda.bdg -o x_ppois.bdg -m ppois -S <value calculated based on whether the chip or input larger/million reads>

Al-Murphy commented 2 years ago

Just to add to @jcotney solution, ENCODE also have a pipeline to produce this data (which could be replicated in nextflow I guess):

https://github.com/ENCODE-DCC/chip-seq-pipeline2

jcotney commented 2 years ago

Just to add to @jcotney solution, ENCODE also have a pipeline to produce this data (which could be replicated in nextflow I guess):

https://github.com/ENCODE-DCC/chip-seq-pipeline2

This is exactly what the portion of our pipeline is based on. I think the current scale factor files that are generated for the igv sessions could be used to apply the value for the "-S" option. This routine could be added as an option to the overall pipeline with something like --generate-pvalue-bigwig ?

JoseEspinosa commented 2 years ago

Yes, after reading a little bit my first comment was wrong. Probably we can leave this for the next iteration version 2.1. Ping @drpatelh to know which is his take on this, since it is also true that with version 2.0 of the pipeline it would be possible to tweak the parameters of macs2 callpeak and generate the pvalues tracks outside the pipeline.