Homer mergePeaks : Cannot calculate the mean of overlapped peaks
1
0
Entering edit mode
9.0 years ago
morovatunc ▴ 560

Hi guyz,

I started trying to use Homer for finding overlaps of my 20 sample data. It finds the overlaps pretty good. However, I cannot get that taking the mean of the overlaps option work. Is there a way to get it worked. I found this github page https://github.com/shraddhapai/mergePeaks_resolve . But that boost compiler gave me lots of errors.

If you know anything about this please help.

Best,
Tunc

ChIP-Seq Homer • 3.6k views
ADD COMMENT
0
Entering edit mode
9.0 years ago
Alternative ▴ 290

If I understood well your request, you can perform the task using bedtools:

Assuming your score is in column 5

cat *.bed  | sort -k1,1 -k2,2n | bedtools merge -i -  -c 4,5 -o collapse,mean

The above command takes all bed files in the directory (cat) and sort them by chr first then start (sort) then merge them (bedtools).

-c indicates that you want to operate on columns 4, and 5 and that you want, from all the merged peaks

  • To collapse the names in the 4th field (good to keep track of what was merged)
  • The mean from the 5th column of all the merged peaks.

bedtools merge -h and the online docs explain everything

ADD COMMENT
0
Entering edit mode

Your method is nice. But I have already got overlapping regions. Homer finds those overlapping regions but I does not calculate the mean of the peak heights. I think your line of code, also finds the overlapping peaks which might generate problems for me?

ADD REPLY
0
Entering edit mode

I meant to use the original bed files, and not the one generated by Homer. You start directly with your 20 or so files by concatenating them in order to merge them. This method will "merge peaks" (union) and does not intersect them. Your question is confusing: Do you want to merge your peaks or to get the overlaps ? These are two different things.

ADD REPLY
0
Entering edit mode

I only wanna get overlaps. But what I am saying is I have already got the overlaps with various programs such as Homer, Bedops/Bedmap. Therefore, I asked my question specifically about is there a way to invoke average option of the Homer.

What I need for my project I have 13 tumour and 7 normal samples. I want to get overlapping regions within these data set. For normal samples, if the overlap region no is 7 then I call it high confidence peaks. where I call less than 7 as low peaks. same for the Tumour but 13 for high confidence and less than 13 for low confidence.

ADD REPLY

Login before adding your answer.

Traffic: 1877 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6