I have two different ATAC-seq libraries that I wish to compare on a genome browser. I have used Macs to generate bedgraph files for each individual library using the command:
macs2 callpeak -t macs2 callpeak -t bamfile --outdir /path/to/ -f BAMPE --keep-dup all --pvalue 1e-2 --call-summits --bdg
I then convert bdg to bigwig.
How can I best normalise the two ATAC-seq libraries that I want to compare by library size? Can I do this in MACS? Or do I do it after I have generated the separate bdg files?
Thank you,
Presumably as it’s rpm you can then directly compare the two tracks? Also is the bam the one directly following mapping?
Well, RPM is good enough for visual inspection. The BAM should be filtered for duplicate reads, e.g. with Picard MarkDuplicates, sambamba markdup or samblaster.
Ah....I get this error: bamCoverage: error: unrecognized arguments: CPM any clues?
Update to the latest version of deeptools. It was introduced recently. Alternatively,do the following (a bit slower but who cares):
Or, my personal favorit if you are on Linux (not Mac), get mosdepth. This script should give you a normalized bigwig with only one or two cores in a few minutes. Mosdepth is really awesomely fast.
Does deeptools bamCoverage only accept bams as an input? Because it would be nice to be able to use it directly with the bed files from the MACS2 output (if bigwig tracks with the peak calling results are desired for visualization).
No, it doesn't, but
bedtools genomecov
does.