iVis-at-Bilkent/newt

Hide selected node in hyperedge should not always remove hyperedge

Closed this issue · 6 comments

Consider the reaction
A + X <-> B + Y
Often, A and B are in a linear pathway, while X and Y are cofactors. One may wish to view a network without multiple crossovers due to shared cofactors. Therefore, it is useful to be able to hide X and Y, while leaving the edge A <-> B. This can currently be done by deleting X and Y but then one ends up with a visualisation that becomes inconsistent in topology with the underlying biochemical network.

Suggest to allow the arc from a hyperedge to be hidden with the corresponding node, as an option, rather than hiding the entire hyperede and the nodes uniquely associated with it.

@rmtfleming To make sure we understand this, are you saying that in your example reaction, you want to be able to temporarily hide X and Y without hiding A, B and the associated process nodes?

Yes

Like "Delete Selected Simple" and "Delete Selected Smart", let's implement a simple version of this as well: "Hide Selected Simple" (to be added as a simplified version that only hides what's given using this icon
hide-selected-simple.svg.txt

and "Hide Selected Smart" (functionality we already have now using this icon:
hide-selected-smart.svg.txt

Make sure to delete the file "hide-selected.svg" and add both to the View > Hide/Show menu as well as the toolbar.

Looks good overall but:

  • Let's apply incremental layout on Hide Selected Simple like Hide Selected Smart for consistency.

  • I also noticed that incremental layout acts weird sometimes (see below), I don't know if this is related to this issue though. Have you noticed this @hasanbalci ?
    ezgif com-gif-maker (3)

Hide selected simple will apply incremental layout now.

About the layout acting weird: I can reproduce the same issue using existing Hide Selected Smart functionality in the public version. I don't think it is directly related to this issue. Maybe we should have a seperate issue for it @ugurdogrusoz?

OK. Here is the separate issue on layout acting weird.

Regarding this one, let's apply incremental layout as follows:

  • Simple Delete or Hide: no layout applied
  • Smart Delete or Hide: apply incremental layout if "Recalculate Layout on Complexity Management" flag is checked.