thechiselgroup / biomixer

BioMixer
http://bio-mixer.appspot.com/
16 stars 13 forks source link

Ontology Overview Double Bubble Node Effect #340

Closed everbeek closed 10 years ago

everbeek commented 10 years ago

For the ontology overview, Ray suggested having the nodes sized as they are, but also adding an interior circle that represents the number of classes that are mapped to by the central node.

everbeek commented 10 years ago

I have it running, but the size of the mappings is so tiny compared to the size of larger ontologies. Scaling issues are dominating...

The inner circle can be scaled relative to overall node size (as it is currently) and be difficult to interpret. It could be expressed as relative to something else...like...with its own scaling...if each mapped node radius is scaled to each other's. They could end up as larger than the node they are inside of, in the case of two disparately sized ontologies both having the maximum number of mapped nodes.

Even doing something like a pie chart wouldn't help. The slice would be too small (and if the ontology node were small enough, we couldn't see the pie slice).

Thinking...

everbeek commented 10 years ago

I had some silly bugs, and the inner circles are bigger than they were before. I am re-assessing. Ok, it looks good enough right now. It can be tweaked later, but I made some size cutoffs to prevent uselessly tiny inner circles.

everbeek commented 10 years ago

The visualization is drastically slowed now. I thought it was some issues with the rest calls, but not so. If it is simply because of the numerosity of elements on screen, I can back up and re-implement the inner circles in a way that uses single circles with thick borders. The visual effect would be identical. Looking into the problem.

everbeek commented 10 years ago

I have the node thickness sorted out. I had a lot of fussy issues with it. For RCD central ontology, the Nomenclature of Medicine node has good ratio of edge to central node (159000 mapped of 400000, which means that many of the central node's 200000 terms are related to that ontology).

I have some visual anomalies to sort out, and I have to clean up a lot of code. There is an odd hairline arc that might be for a rogue node. I have outputs indicating mappings larger than a node's number of terms, which is disconcerting. I have to go over nodes with no visible dot in the middle, and ensure that they have very low counts. I am eager to finish this one so I can move on to doing absolute count filtering controls.

everbeek commented 10 years ago

Was tryign to fix some circle rendering issues, and came across the reason why I am seeing it: Chrome renders circles with a gap between the stroke and central radius, if the stroke width is greater than 2 times as large as the circle radius. This is a bug.

https://code.google.com/p/chromium/issues/detail?id=239860 (Fiddle at http://jsfiddle.net/3YX3S/1/ )

Or jam the following code into the W3 schools link below: http://www.w3schools.com/svg/tryit.asp?filename=trysvg_circle

everbeek commented 10 years ago

In issue #335, I made changes that allow me to see some double circles that don't look right at all. Look into them further.

everbeek commented 10 years ago

SNOMEDCT has a 3:4 ratio of thickness to radius, in pixel count. This does not correspond to the 159000 to 400000 mapped to total or 241000 to 400000 unmapped to total (4:6 or 60%) ratio that it should represent. Wow, pardon how unclear that description is.

It should be a pixel thickness of 4:6 or so, if the unmapped consist of 60% of the total number. Looking for what I did wrong.

everbeek commented 10 years ago

This thickness approach is too finnicky. I am adding back in the code I first made that simply used two circles. I will also cut down the rendering to use only the first 100 ontologies, which dovetails from #335 anyway. If we ever need ontologies other than the top 100, we will deal with it later with windowed node inclusion.

I thought about it some more, but that bug about thickness and radius ratios being greater than x2 really makes this approach untenable.

everbeek commented 10 years ago

Tweaking the circle sizes now. I am trying a ratio of inner to outer based on area rather than on radius.

everbeek commented 10 years ago

Wrapped up. Heading on to work on capping the number of nodes in a flexible way.

As a side note, in my comment I mentioned that I didn't remember why I abandoned the use of the basic scaling function for inner node sizing, but it happened when I tried to go over to using thickness to get this effect. Slipped through the cracks when I went back to two circles.