When I compare two lists of peaks to get VennDiag (ovelapping peaks), I get different results for the same list!
In the example bellow, from the same imported "Pif1_peaks.." list of peaks (.bed), I have a total of 1203 peaks in the 1st comparison A (338+865), however, in the second comparison the total number of peaks is 1245 (747+498) for Pif1_peaks..
In addition, in the original bed file "Pif1_..bed", I have only 1173 peaks!
Can you please be more clear about the question? I can see the read portion for from the left in Fig A is different from that of the red in figure B. I also do not see (267+932) . Also you have to check how are the peak comparison being done. Are they considering total end to end regions or a fraction.
Sorry 267+932 was for another example of comparison (also different than total of initial list, and different of the two others), I updated the my post according the example in image.
The colors changes (can't control it for this online tool), but the list is the same
The comparison is done by fraction, wherever a peak overlap another regardless of the overlapping size
Thank you for you reaction
ADD REPLY
• link
updated 2.4 years ago by
Ram
44k
•
written 9.2 years ago by
Samad
▴
90
1
Entering edit mode
I presume that you have bed file for both the peak files , and the tool uses interectbed and coveragebed to find the peak relationships. However I would suggest you to do a simple one command line to check the peak relationship with intersectbed. The paper has not shown anything about the criteria so I am assuming that the fraction they use in intersectBed is 1.0 (100%) for overlap. If you can do that in unix you can find that easily or you can mail the developers. I am assuming they have a binning or splitting window strategy based on coverage for which you have more peaks than the usual and that is the reason you have this discrepancy. However for your testing you can use the below command if you have bedtools installed.
## This will show the number of peaks that are overlapping with 100 % identity between regions
bedtools intersect -a file1.bed -b file2 .bed -u -f 1.0 | wc -l
It's very useful your reply, actually I have used bedtools intersect and wanted to visualize results as Venn diagram so I can see the unique and overlapped peaks!
Your question in the previous post made me thinking & verifying in details from where they comes the additional peaks, so I realize that it's normal to have maybe more peaks in total because 1 peak in the 1st list can overlap (partially) two peaks in the 2nd, in this particular case we count 2 for the common area in the figure, this was confusing for me!
I hope it was clear my explanation
Thank you again, I appreciate
Samad
ADD REPLY
• link
updated 2.2 years ago by
Ram
44k
•
written 9.2 years ago by
Samad
▴
90
1
Entering edit mode
Yes that is obviously possible since you are overlapping region and if the overlapping fraction is not 100% percent then a a peak in A can obviously overlap with 2 or more peaks in B depending on the fraction of windows of overlap parameters applied. Good that it helps. Dont mind an upvote or an acceptance of answer if my previous queries were helpful! Good luck!
The reply of @vchris_ngs made me thinking & verifying in details from where they comes the additional peaks, so I realize that it's normal to have maybe more peaks in total compared to the initial number, the reason is that 1 peak in the 1st list can possibly overlap (partially) two peaks in the 2nd, in this particular case we count 2 for the common area in the figure, this was confusing for me!
I hope it was clear my explanation and hope this post will be useful for others
Thank you again vchris, I appreciate!
Samad
ADD COMMENT
• link
updated 2.2 years ago by
Ram
44k
•
written 9.2 years ago by
Samad
▴
90
Sorry 267+932 was for another example of comparison (also different than total of initial list, and different of the two others), I updated the my post according the example in image.
The colors changes (can't control it for this online tool), but the list is the same
The comparison is done by fraction, wherever a peak overlap another regardless of the overlapping size
Thank you for you reaction
I presume that you have bed file for both the peak files , and the tool uses
interectbed
andcoveragebed
to find the peak relationships. However I would suggest you to do a simple one command line to check the peak relationship withintersectbed
. The paper has not shown anything about the criteria so I am assuming that the fraction they use inintersectBed
is 1.0 (100%) for overlap. If you can do that in unix you can find that easily or you can mail the developers. I am assuming they have a binning or splitting window strategy based on coverage for which you have more peaks than the usual and that is the reason you have this discrepancy. However for your testing you can use the below command if you have bedtools installed.or
Note: You should have bedtools or bedtools2 to run the above commands.
Hi vchris,
It's very useful your reply, actually I have used bedtools intersect and wanted to visualize results as Venn diagram so I can see the unique and overlapped peaks!
Your question in the previous post made me thinking & verifying in details from where they comes the additional peaks, so I realize that it's normal to have maybe more peaks in total because 1 peak in the 1st list can overlap (partially) two peaks in the 2nd, in this particular case we count 2 for the common area in the figure, this was confusing for me!
I hope it was clear my explanation
Thank you again, I appreciate
Samad
Yes that is obviously possible since you are overlapping region and if the overlapping fraction is not 100% percent then a a peak in A can obviously overlap with 2 or more peaks in B depending on the fraction of windows of overlap parameters applied. Good that it helps. Dont mind an upvote or an acceptance of answer if my previous queries were helpful! Good luck!