so can i combine peaks from different condition as well? or only replicates
Hi guys. I have two peak files. One is from ATAC seq and the other is from H3K27ac chip seq. I am trying to merge these two peaks files together and get a file with overlapping peaks. There are several questions that I have here:
what scripts or programs are good for that application? (bedops and bedmap?)
I used MACS2 to call peaks: regular peaks calling for ATAC seq and broad peaks calling for H3K27ac chip seq. I am concerned whether the different peak calling methods will influence the overlapping results. Thank you!
3 answers
You can use bedops to do the merging and bedmap to get a list of peaks that overlap the merged regions:
$ bedops --merge A.bed B.bed C.bed ... > merge.bed
$ bedops --everything A.bed B.bed C.bed ... > union.bed
$ bedmap --echo --echo-map merge.bed union.bed > answer.bed
Or as a one-liner:
$ bedmap --echo --echo-map <(bedops --merge A.bed B.bed C.bed ...) <(bedops --everything A.bed B.bed C.bed ...) > answer.bed
You may want to consider using Fseq to call ATAC seq peaks instead of MACS2. H3K27ac gives fairly punctate peaks, so you should probably be fine, but any time you are doing intersections you should consider the size of the peak regions from both sets, and decide if how you want to define the peak boundaries for the intersected set.
Log in to answer this question.