Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unpredictable JBrowse2 visualization #4316

Closed
gihannagalindez opened this issue Mar 25, 2024 · 7 comments
Closed

Unpredictable JBrowse2 visualization #4316

gihannagalindez opened this issue Mar 25, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@gihannagalindez
Copy link

chrX.zip

Hi! Thanks for this nice tool! I am using JBrowse2 to visualize nucleotide dependencies in the genome at 1-bp resolution in the region around a tRNA in yeast. This is not the typical resolution for hic files, but it seems that there is a bug, because the visualization changes when I zoom or try to move the track around (i.e. the red dots move around to unpredictable, seemingly random locations). I encounter this for both the web tool and the desktop version (I'm on Windows). I am attaching a hic file that contains the data for chromosome X; this file was generated using Juicer pre tool. I checked/visualized the same .hic file using another tool and it works fine. However, it would really be a great help for us if this can be solved and nicely visualized in JBrowse2.

To Reproduce

  1. Open JBrowse2 desktop and load the yeast fasta file.
  2. Load the attached .hic file.
  3. Go to chromosome and location X:353,208..356,165
  4. Try to move the track around. You will notice that the visualization changes if you move the track or try to zoom.

Screenshots

Please look at the two screenshots below. The location is the same but the visualization changes after moving the track horizontally.
screenshot1
screenshot2

Version:
2.10.3

Additional context

@gihannagalindez gihannagalindez added the bug Something isn't working label Mar 25, 2024
@cmdcolin
Copy link
Collaborator

thanks for reporting this. I think I can confirm some weirdness here, there are error messages in the dev console that say something to the effect of "RangeError: offset is outside the bounds of the DataView"

this could mean the parser has a bug

@cmdcolin
Copy link
Collaborator

just a random observation:

it appears that the resolution on this track you sent is "1" which means every cell in the file is a single basepair-pair (e.g. an interaction between exactly two base pairs). that is sort of abnormal from what i've seen. i have never used juicer though to generate .hic files, so i'm not sure if you have any control over this setting? if you do, you might try adjusting it

your file

Screenshot 2024-03-25 at 4 03 08 PM

a file from our sample data

Screenshot 2024-03-25 at 4 03 26 PM

https://jbrowse.org/code/jb2/v2.10.3/?config=test_data%2Fconfig_demo.json&session=share-Mjgz2vW2HQ&password=4bxx7

@gihannagalindez
Copy link
Author

Thanks a lot for your quick response! We are indeed generating the .hic files using the 1-bp resolution on purpose because this is for a new application case. Using the Juicer pre tool we were able to set/adjust the resolution to examine dependences in the single base pair level in the genome. It would be a great help if JBrowse2 can also handle the visualization in this granularity. Thank you very much!

@cmdcolin
Copy link
Collaborator

@gihannagalindez i tried to create a potential fix here #4319

you can run jbrowse create --branch hic_fix newinstance to try this out in a new instance (or run jbrowse upgrade --branch hic_fix in your current instance)

I am pretty inexperienced with hic data so I am not sure if what I'm seeing is correct but let me know if it looks right to you!

@cmdcolin
Copy link
Collaborator

went ahead and merged the fix to it...feel free still to test it out.

the particular thing that i am still not sure about is that there is a 'horizontal' lines not at y=0...that is visible in your screenshots. is that expected?

@cmdcolin
Copy link
Collaborator

I believe this is now fixed. Instead of offsetting according to the first hi-c contact bin, it offsets according to region.start divided by the current bin size. Improved coloring added too :)

@cmdcolin
Copy link
Collaborator

the fix should be in the now released latest version v2.11.0 along with some fun hi-c coloring schemes https://jbrowse.org/jb2/blog/2024/04/16/v2.11.0-release/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants