GMOD / jbrowse-components

Source code for JBrowse 2, a modern React-based genome browser
https://jbrowse.org/jb2
Apache License 2.0
208 stars 62 forks source link

If displayedRegion is created with negative coordinates, you can run into odd bugs #4562

Open cmdcolin opened 2 months ago

cmdcolin commented 2 months ago

this scenario is really only able to create programmatically but it creates quite odd conditions. example: the region width (region.end-region.start)/bpPerPx doesn't correspond to the actual region rendered (which will actually have performed a Math.max(region.start,0))

cmdcolin commented 1 month ago

just for reference this was a session i saved from this that had this happen http://localhost:3000/?config=test_data%2Fvolvox%2Fconfig.json&session=share-SL4YknjuwX&password=AjnWD

cmdcolin commented 1 month ago

another one http://localhost:3000/?config=test_data%2Fvolvox%2Fconfig.json&session=share-qADNrxHkq7&password=IUMvh

you can see there is a gap where no coverage is plotted on snpcoverage, that is due to region width being calculated wrong here image

again, not a very critical bug as you have to create these displayedRegions like this programmatically, not from the ui, but can cause surprising behavior