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
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
for A in *.bed
do
for B in *.bed
do
bedtools intersect -a $A -b $B | wc -l | tr "\n" "\t"
done
echo
done
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
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Please edit the post to make the title more concise.