igvteam / spacewalk

Spacewalk is an application for displaying and interacting with super-resolution chromatin tracing data in 3D. SpaceWalk includes igv.js and juicebox.js instances for rapid and intuitive visual comparison and interaction between 3D data and 1D genomic data.
MIT License
10 stars 1 forks source link

Gray localizations hiding highlighted localizations #259

Closed gnir closed 3 months ago

gnir commented 1 year ago

Hi @turner,

I have a point cloud sw file and I'm looking at the localizations in my traces. When I'm trying to look at one segment of the trace the other localizations are shown in gray. However, these gray localizations are 'hiding' my highlighted localizations. I think, you should have the option to not show the not-selected localizations or have them transparent.

Thank you, Guy

turner commented 1 year ago

@gnir here is an idea I came up with to prevent the un-highlighted points from obscuring the highlighted points. What do you think?

https://user-images.githubusercontent.com/87169/219702674-1ceb845f-1e27-49fe-893a-08848f208be4.mov

Here is a test share url to try it out: https://tinyurl.com/2kn5nwtu

gnir commented 1 year ago

Hi @turner,

Liked it a lot. Would it be possible to select several segments together? For instance, by holding ctrl or shift?

Apologies but I might be slower to respond until Tuesday. Guy

turner commented 1 year ago

@gnir I merged these changes with the production app: https://spacewalk-site.netlify.app/

I'll close this issue and open one specifically to address the segment selection idea

gnir commented 1 year ago

Thank you! Guy

gnir commented 1 year ago

@turner - I am not able to select multiple targets. Also - the track won't color the trace (like it does for simulation and balls-and-sticks). And, the distance map is not working.

Thank you, Guy

turner commented 1 year ago

@gnir I created this issue as a record that I need to work on it. I haven't started on it yet.

gnir commented 1 year ago

@turner - oh, I see. I misunderstood you. Guy

turner commented 1 year ago

@turner - oh, I see. I misunderstood you. Guy

For pointcloud rendering, distance map - and contact map - is not implemented. I also do not map igv track feature colors to pointclouds. This would not be very usable as the number of genomic locations in the track - and thus locations for a color - are extremely sparse for point cloud and thus would not look particularly convincing. Just a small set of color splotches.

gnir commented 1 year ago

For pointcloud rendering, distance map - and contact map - is not implemented.

Why? You find the mean(XYZ) location for each step.

'Just a small set of color splotches.' Maybe it makes sense to generate a density map (or another type of a volumetric visualization) for each target and add the IGV tracks on these?

turner commented 1 year ago

For pointcloud rendering, distance map - and contact map - is not implemented.

Why? You find the mean(XYZ) location for each step.

'Just a small set of color splotches.' Maybe it makes sense to generate a density map (or another type of a volumetric visualization) for each target and add the IGV tracks on these?

The fundamental issue with mapping color from track to trace - any flavor of trace (ball/stick, ribbon, pointcloud) - has to do with sampling. Specifically, an igv track may have around a thousand on screen features. A given ball/stick model may have a few dozen balls. Each ball is a single genomic location at which I sample the track (feature) for color. So, the ball/stick or ribbon or point cloud will severally under sample the track color distribution creating an aliased "point sampled" version of the nice continuous track color distribution.

gnir commented 1 year ago

Still, that's what people do. For instance, you can color the entirety of the density map with the feature that is dominant over that region. Does that make sense? Check out supplemental figure 10 from this paper as an example. Guy

turner commented 1 year ago

Ok, got it. I won't worry about the undersampling issue. I'll create: 1) an issue to add live density/distance maps to pointcloud 2) an issue to map track feature color to pointclouds

Thanks for all the super helpful input Guy

gnir commented 1 year ago

It's funny how you are thanking me... I'm planning on using it 😁

gnir commented 1 year ago

@turner - if you are planning to store the density maps in a sort of a matrix, then you could utilize this to compute volume overlap between segments, which is unique to that type of data (super-resolution imaging). You could also use it to compute volume (and chromatin density in DNA/Volume), surface area, sphericity, etc. Just a thought :) Guy

turner commented 1 year ago

@gnir I'm getting the pointcloud distance/contact map and track feature mapping happening first. I'll circle back to discuss density maps

gnir commented 1 year ago

Thank you :) Guy