GMOD / jbrowse

JBrowse 1, a full-featured genome browser built with JavaScript and HTML5. For JBrowse 2, see https://github.com/GMOD/jbrowse-components.
http://jbrowse.org
Other
464 stars 199 forks source link

Feature start offset of one between Front-end and JS object #1596

Closed Bjoernsen closed 3 years ago

Bjoernsen commented 3 years ago

Currently, I am playing around with JavaScript and how to access the feature data. During my tests, I recognized that there is an offset of 1 for the feature start between the JBrowse Front-end and the JavaScript object.

The front-end says that my feature starts at the position ...970, whereas the JavaScript object says it starts at ...969. The underlying GFF3 file says it starts at ...970

The stop/end position is the same.

Where does this offset come from? Is it always the case?

image

image

cmdcolin commented 3 years ago

Internally the data is represented using zero-based coordinates but is presented with one-based coordinates. The gff file format is also one-based so the raw file gets converted to zero-based internally before again going back to one-based when displayed

Faq entry https://jbrowse.org/docs/faq.html#what-type-of-coordinate-system-does-jbrowse-use

Bjoernsen commented 3 years ago

ah, ok. Thank you!