Hi, I have 2 bed files.
File 1: ref.bed
chr9 9383800 9493700 REGION
File 2: map.bed
chr9 9387448 9387482 PTPRD_EXON
I want to calculate a length of bases in an area overlapping between ref.bed and map.bed
So I used BEDOPS bedmap function as follows, and got the following result file.
$ bedmap --echo --bases ref.bed map.bed > result.bed
$ cat result.bed
chr9 9383800 9493700 REGION|34
Thus, this result file indicates that the length of bases in an overlapping area is "34bp".
However, I think the length might be incorrect.
Because, in this case, the overlapping area is chr9:9387448..9387482.
So, the length of overlapping area is 9387482-9387448+1 = "35bp".
Could you tell me whether my opinion is right?