BED Heatmap
0
0
Entering edit mode
3.4 years ago
kstangline ▴ 80

I have BED files of ChIP-seq peaks with different conditions, and I would like to make a heatmap showing the similarity/overlap between the peaks.

I have designed a program to take in bedtools intersect overlaps by using a double for loop. The program builds a CSV and heatmap based on the information provided in this double for loop below. I was wondering if a bedtools intersect double for loop would be the best way to find the similarity/overlap between peaks?

for i in *bed; do for j in *bed; do echo $i $j;bedtools intersect -u -a $i -b $j | wc -l; done; done

The reason I'm asking this is because

bedtools intersect -u -a test1 -b test2 | wc -l

can give a different result from

bedtools intersect -u -a test2 -b test1 | wc -l

causing the heatmap to be unsymmetrical.

ChIP-seq • 905 views
ADD COMMENT
0
Entering edit mode

Will use -wa and -wb help?

ADD REPLY
0
Entering edit mode

This works! Thank you. However, I'm running into another problem.

bedtools intersect -a test1.bed -b test2.bed -wa -wb | wc -l

In this output, I have more entries that are not even present in the test1.bed.

ADD REPLY

Login before adding your answer.

Traffic: 2888 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