thechiselgroup / biomixer

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

Parallel Expansions and Mapping Arcs #503

Closed everbeek closed 9 years ago

everbeek commented 9 years ago

Long ago, I made it so that mapping arcs would not clutter the view by hiding any that were among nodes that entered together as the result of a mapping expansion. This helped immensely. The way I implemented it was to not show any mapping edges unless they were linking to an explicitly expanded node.

While working on #500, I discovered that this hides some interesting edges. I imported the following graph, then pulled in a single concept id as follows. I then did a concept expansion on the two concepts that came from other ontologies, and noticed that the interesting mappings get hidden unless I mouse-over things that are mapped (as programmed, so not a bug proper). There are 8 mapping arcs among the three ontologies, each with between 7 and 9 nodes present.

I think I should revise the approach to only hide interconnections from mapping expansion cohorts, rather than requiring nodes be explicitly expanded to have an arc render. Think about it.

Data: http://purl.obolibrary.org/obo/UBERON_0008311 {"NB":"Greetings! This is a BioMixer portable graph. Paste this entire data structure into the Import dialog box, accessible via the menu. Use the url: http://127.0.0.1:8888/conceptPathToRoot.html .","n":[{"c":"http://purl.obolibrary.org/obo/UBERON_0006591","o":"UBERON","x":781.7248082893183,"y":463.61667330013273},{"c":"http://purl.obolibrary.org/obo/UBERON_0006607","o":"UBERON","x":1039.02229424697,"y":440.559641464557},{"c":"http://purl.obolibrary.org/obo/UBERON_0007642","o":"UBERON","x":509.9233676207672,"y":446.21768093693197},{"c":"http://purl.obolibrary.org/obo/UBERON_0006590","o":"UBERON","x":601.8848396352282,"y":223.4344213788073},{"c":"http://purl.obolibrary.org/obo/UBERON_0004120","o":"UBERON","x":454.2775095585205,"y":357.5673182732772},{"c":"http://purl.obolibrary.org/obo/UBERON_0001637","o":"UBERON","x":395.83415875924874,"y":236.56458070938314}],"s":{"inheritanceStyleLink":"rgb(0, 34, 102)","compositionStyleLink":"rgb(0, 51, 17)","mappingStyleLink":"rgb(212, 212, 212)","UBERONhttp____purlobolibraryorgoboRO_0002495LinkStyle":"rgb(31, 119, 180)"}}

everbeek commented 9 years ago

I could revise it in a few ways. I could get rid of the hairball detangling hidden mapping arc mechanism. I could have a UI toggle for it. Or...I could include any mapping arcs that are the direct result of a mapping expansion, as well as those arcs that connect nodes that have any non-mapping arc attached to them.

The key is that the mapping arcs that are hidden in my case above are providing structural information. Hiding them is bad. In the case of the mapping hairballs that occur on a large mapping expansion, the fact that virtually all nodes in the expansion have mappings together is fairly uninformative. There are too many one-to-one comparisons to be interested in, among nodes that likely share partial or even full names. By including arcs that also have adjacent non-mapping arcs, we recognize that there is a potential for sub-tree comparison, to find missing mappings or concepts that are not common to two ontologies.

Implementing this relevant-node-mapping-arc-promotion idea.

everbeek commented 9 years ago

This is much better. I would attach a screenshot, but I stumbled upon this with mildly embarrassing bodily organs. I have three parallel trees, and I can clearly see how they inter-relate on the whole, due to the revised mapping arc rendering rules. Checking a few other things, then committing.

Notably, NBO appears ot use only UBERON concepts, but provides some different neighbourhoods than UBERON itself, and NIFSTD, which also uses UBERON concepts. This is a good example of why we need to load all instances of a concept when it is brought in without ontology context.