intervene icon indicating copy to clipboard operation
intervene copied to clipboard

Differences between bedtools command line vs intervene pairwise?

Open unique379r opened this issue 2 years ago • 2 comments

Hi, I have question about values obtain from bedtools and intervene of Jaccard similarity.

Command bedtools jaccard in bash script:

bedtools jaccard -a "$file1" -b "$file2" -f 1.0 -r -e | grep -v "intersection" | awk '{print $3}'

Sample	A	B	C	D	E	
A	1	0.307771	0.326171	0.257917	0.261808	
B	0.307771	1	0.32018	0.242112	0.248604	
C	0.326171	0.32018	1	0.260097	0.270409	
D	0.257917	0.242112	0.260097	1	0.363778	
E	0.261808	0.248604	0.270409	0.363778	1	

From intervene pairwise

intervene pairwise -i *.bed --compute jaccard --bedtools-options f=1.0,r,e --htype tribar --output pairwise-results
	A	B	C	D	E
A	1.0	0.34152	0.355896	0.277933	0.282856
B	0.34152	1.0	0.354377	0.268735	0.269864
C	0.355896	0.354377	1.0	0.285222	0.290961
D	0.277933	0.268735	0.285222	1.0	0.386835
E	0.282856	0.269864	0.290961	0.386835	1.0

I am wondering, why the both results slightly differ in the values(jaccard index) of the sample.

Any clue ? Any insight would be helpful for my analysis.

Thanks Rupesh

unique379r avatar Oct 04 '23 16:10 unique379r

Hi @unique379r are you using the same order of files (-a and -b) when computing the scores using the bedtools that you're using with the intervene?

asntech avatar Oct 04 '23 17:10 asntech

Thats a good point, i will confirm and get back you soon. thanks

unique379r avatar Oct 04 '23 18:10 unique379r