Question: Length of Bases in Overlapping Regions Calculated By BEDOPS
0
gravatar for Apprentice
4.3 years ago by
Apprentice10
Apprentice10 wrote:

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?

bed • 867 views
ADD COMMENTlink modified 4.1 years ago by Biostar ♦♦ 20 • written 4.3 years ago by Apprentice10

Thank you for your answer.

I could learn very important point about BED file.

BEDOPS is very userful tool. I want to continue utilizing that.

 

ADD REPLYlink written 4.3 years ago by Apprentice10
2
gravatar for Alex Reynolds
4.3 years ago by
Alex Reynolds25k
Seattle, WA USA
Alex Reynolds25k wrote:

BED files are zero-based. This means that the number of bases in a BED element is simply the difference of the stop and start coordinates. See: What Are The Advantages/Disadvantages Of One-Based Vs. Zero-Based Genome Coordinate Systems

ADD COMMENTlink modified 4.3 years ago • written 4.3 years ago by Alex Reynolds25k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1462 users visited in the last hour