Thursday, March 7, 2013

The Shadow Knows!

"Who knows what evil lurks in the hearts of men? The Shadow knows!" So begins the popular radio drama The Shadow that ran from 1930 until 1954. When I was a tiny kid in the early '60s, the local radio station would rerun episodes on Sunday nights, much to my parent's delight. Of course, the mystery of The Shadow was lost on me, since I just wanted to go and watch Walt Disney's The Wonderful World of Color on TV!


Although the Shadow had "...the power to cloud men's minds so they cannot see him", an important feature of BioFabric, called shadow links, are intended to makes things clearer instead of cloudier.  So today's posting will provide a short introduction to get you started with shadow links.


The Les Miserables network I debuted in an earlier posting serves as a nice, compact example. But this time, I will present it with the default layout, which is how it would look after you first imported it from a .sif file. You might want to go back to the earlier posting to compare this version with the custom cluster-based layout:

BioFabric Network Visualization: Les Miserables
Click on picture to enlarge

Remember, Valjean gets top billing in the default layout because he is the highest degree node, and all of the links incident on Valjean get drawn before we move on the the highest-degree neighbor, Gavroche. Then, when we are done with Gavroche, all the remaining links incident on that node have been drawn as well. This means that when we get to e.g. the fifth node, Thenardier, the edge wedge we see for that node is not a complete inventory of all the links incident upon it, but is missing the four previous links attaching Thenardier to Valjean, Gavroche, Marius, and Javert. This is to be expected, since if we are drawing each link only once, we are not going to get a contiguous region of incident edges appearing for every node in the network: down that path lies the dread hairball

Given the distributed nature of drawing links that is a natural outcome of treating nodes as potentially infinitely long lines, is there a solution? Yes, and that's what the Shadow knows! Instead of drawing each link only once, we draw it twice: one "real" link, and one "shadow" link.

When BioFabric is first started, shadow links are turned off.  To see them, go to the main menu and select Edit->Set Display Options...:

Step one to add shadow links in BioFabric
Click on picture to enlarge

In the dialog box that appears, check all three middle boxes, providing shadow links, minimal submodel links, and node zone shading.  Click OK:

Step two to add shadow links in BioFabric
Click on picture to enlarge


The result adds shadow links to the network, as well as providing alternating subtle shading of the node zones to make the links belonging to each node stand out more distinctly:

Les Miserables network with shadow links
Click on picture to enlarge
Compare this shadow version with the one at the top of this posting.  See how the part of the network below the main diagonal just looks like a stretched version of the non-shadow network? In fact, all the links below the diagonal are the "real" links, while the ones above the diagonal are the duplicate "shadow" links. And since there are now twice as many links in the network, the network is twice as wide.

Let's take a closer look at some of the later nodes to be laid out, focusing on Joly, who stands out over there on the right side of the network.  This is what it looks like in the original, no-shadow version (though node shading is still active):
Joly detail in non-shadowed BioFabric network
Click on picture to enlarge


While this is what the same node zones look like in the shadowed version:

Joly detail in shadowed BioFabric network
Click on picture to enlarge

The part below the main diagonal matches the original, while the shadow links incident on each node are drawn above the diagonal, and to the left of the "real" links for the node.

The thing to keep in mind about the upper non-shadowed version is that although there is a prominent node label on the the contiguous group of links incident on a node (e.g. Joly), that group is not the full set of links incident on that node! Without shadows, I tend to think of each of those regions (what BioFabric calls the node zone) as the death-rattle of each node, the last chance to make its mark on the world before it rides off into the sunset.  Because of the way the default layout works, that region is only where the last links for a node are drawn. Though they are prominently labeled (because it would be perverse not to provide such a label on such a prominent feature), they are not the whole picture. To get the whole picture, consult the shadow links version!

The shadow links version is very egalitarian: everybody gets to share, and so each node has the full compliment of incident links in its node zone. If you are not careful, you might look at the non-shadow version and say that Joly is degree six, but looking at the shadowed version, you can see immediately that Joly is much more popular, with 12 links!  Indeed, the entire right end of the shadow network shows those nodes to be much more well-connected than a non-trained eye looking at the non-shadow version might be lead to believe. 

So why not have BioFabric only support the shadow link version of the network?  That's a good question, but I would argue that the regular version is certainly more compact, provides a cleaner profile of the network structure, is more faithful to the true topology of the network, and is even preferable with smaller networks where all the links can be scanned in a single view. The clustered version of the Les Miserables network is one such example.

So, in stark contrast to the famous radio character, shadow links have instead "... the power to clear men's minds so they can see..."!  

Who shows what links connect to the hearts of nodes? The Shadow Links show!

No comments:

Post a Comment