lidaof / eg-react

WashU Epigenome Browser
https://epigenomegateway.wustl.edu
Other
68 stars 30 forks source link

Visualization questions #216

Closed mozesjacobs closed 2 years ago

mozesjacobs commented 3 years ago

Hello,

I am a researcher working in William Noble's lab at the UW on a package called PASTIS (https://github.com/hiclib/pastis), which infers 3d chromatin structures from Hi-C matrices. I am currently running a matrix (https://data.4dnucleome.org/files-processed/4DNFI9YAVTI1/) through our program, and I have some intermediate results. Namely, I have the coordinates of the structure output by PASTIS. I wanted to visualize the structure, so I converted it to the .g3d format and loaded into the genome browser.

I had a couple questions:

1) How can I select just one chromosome, or a subset of chromosomes, to be viewed (and choose their colors)? I've played around with the settings on the browser, but I haven't figured this out.

2) Can I disable the lines in the structure so that only the spherical beads are shown? Referencing the lines on the left side of the image below. I would like it to just be a view like on the right side with the beads.

Screen Shot 2021-10-20 at 7 27 13 PM

3) Any idea what this clump structure is that I'm seeing in the image below? It's hard to see if it's also there in matplotlib (since 3d visualization isn't as good there), so I can't really tell.

Screen Shot 2021-10-20 at 7 15 39 PM

I have attached a visualization in matplotlib as well, though due to the size of the structure it's not a very clear image.

Screen Shot 2021-10-20 at 7 26 39 PM

Here is a link to the .g3d structure: https://drive.google.com/file/d/1waDp8uQiV4-7ii34l5UHBizvZVFYMLtR/view?usp=sharing

And here is a link to the corresponding structure output by PASTIS: https://drive.google.com/file/d/1CoLsggztXk0D7M0jWqw_yzqO0zSIyW21/view?usp=sharing

Thank you! Mozes

lidaof commented 3 years ago

Hi Mozes @mozesjacobs , very nice to hear from you! Thanks for the interest!

I checked the g3d file, seems the chromosome name is not correct, the 3d module in the browser is linked to browser region, so the region in the browser will be used to highlight the 3d structure. and also the resolution is 20000, but start of each bin/row is not like separated by 20000*x

chrChr01        1       -0.0976270078546495     -0.43037873274483895    -0.20552675214328775    s
chrChr01        1       -0.5236984805493223     -0.5079094495430907     0.7987885945931865      s
chrChr01        2       -0.08976636599379373    0.15269040132219058     -0.29178822613331223    s
chrChr01        2       0.5758138740155656      0.8449078166270354      0.828311980773045       s
  1. How can I select just one chromosome, or a subset of chromosomes, to be viewed (and choose their colors)? I've played around with the settings on the browser, but I haven't figured this out.

typically when you change the browser region to entire chromosome, you can see the regions in 3d you want, for subset of chromosomes, you can run a region set view and 3d structure will update as well. maybe i can add options to allow customized highlighting. I will think about this.

  1. Can I disable the lines in the structure so that only the spherical beads are shown? Referencing the lines on the left side of the image below. I would like it to just be a view like on the right side with the beads.

will add that option, right now cannot do that.

  1. Any idea what this clump structure is that I'm seeing in the image below? It's hard to see if it's also there in matplotlib (since 3d visualization isn't as good there), so I can't really tell.

the 3d display is very strange though...we are using 3dmol.js to display 3d structures, we used the x, y, and z coordinates internally and fit into 3dmol.js for display...

previously we used to display some g3d data come from pastis output which looks better.. image

I will play with your pastis output file see if we can figure something out.

mozesjacobs commented 3 years ago

Okay, thank you very much!

mozesjacobs commented 2 years ago

Hi @lidaof . I was wondering if you had any updates regarding my pastis output file? Thanks!

lidaof commented 2 years ago

Hi @mozesjacobs, yes, I worked on it the other day...somehow forgot to reply...sorry about that.

like I mentioned I see duplicated lines in the file, so what I did is that I separated the lines based on the 2nd column of the .g3d file you provided, that I generated 2 .g3d file...after load them to the browser, i can see the structure from the core part, while there are many outlines....need to figure out a way to remove them..

here is the view I got with the 2 files I generated, also attaching the files.

image

a.txt b.txt

command to generate the g3d file g3dtools load a.txt -o aa

mozesjacobs commented 2 years ago

Awesome, I'll take a look at them. Thank you!

mozesjacobs commented 2 years ago

Does this browser support viewing of diploid structures?

lidaof commented 2 years ago

Hi @mozesjacobs in the last column of the g3d bed file you can specify different haplotypes or categories, the 3d viewer will display them as separated 3d models, and they can be toggled for display or hide. not sure if this is what you are asking.

mozesjacobs commented 2 years ago

Ok, thanks

lidaof commented 2 years ago

Hi @mozesjacobs i am closing this one, but feel free to open any new issue :) Thank you!