How to compare multiple bed files with a collection of these bed files one by one, calculate the number of overlapping fragments, and output to form a matrix
1
0
Entering edit mode
21 months ago
1934822857 • 0

How to compare multiple bed files with a collection of these bed files one by one, calculate the number of overlapping fragments, and output a matrix to create a COOC diagram

bedtools COOC-diagram bed • 1.8k views
ADD COMMENT
1
Entering edit mode

Please edit the post to make the title more concise.

ADD REPLY
0
Entering edit mode
21 months ago
for A in *.bed
do
  for B in *.bed
  do
    bedtools intersect -a $A -b $B | wc -l | tr "\n" "\t"
  done
  echo
done
ADD COMMENT
0
Entering edit mode

In the previous post, due to my unclear description of the problem, the answer provided could only provide the number of repeated segments. However, I would like to know which segments in each bed file and the number of repetitions in the set bed file are missing, as well as which segments are zero repetitions compared to the set bed file. I really need your help, and I would greatly appreciate it if you could provide me with a solution

ADD REPLY

Login before adding your answer.

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