iVis-at-Bilkent / newt

A web application to visualize and edit pathway models
http://newteditor.org
GNU Lesser General Public License v3.0
52 stars 27 forks source link

Remove disconnected nodes from query results #717

Closed ugurdogrusoz closed 4 days ago

ugurdogrusoz commented 2 weeks ago

Often times, query results are cluttered with disconnected nodes. In the case of complex members (nodes whose parent are complexes), we should only remove disconnected nodes if there are non-disconnected nodes in the same parent. Example (here, for instance, we keep the nodes in complex DNA2:WRN, since removing them would leave the complex empty):

Screenshot 2024-06-18 at 09 49 46

Let's use a new option in all query windows to remove all disconnected nodes from query results. This checkbox (true by default) could go as the last setting in all query windows with the label "Remove disconnected nodes". Make sure to reuse the new code across all queries as much as possible (rather than duplicating it). Location:

Screenshot 2024-06-18 at 09 47 22
umut-er commented 5 days ago

Currently these are the nodes that the algorithm decides to delete

image

and this is how the map looks after the deletion:

image

Couple of notes:

  1. I decided to keep "unspecified entity" objects (circular nodes) because they seem to be explanatory in nature ("Holliday junction", "cleaved Holliday structure", "3' overhanging DNA resected DSB ends" and things like these).
  2. The algorithm doesn't delete any type of compound nodes (that is, complexes, compartments and submaps) even if they fit the description.
  3. The algorithm doesn't delete any nodes specified in the query (in this map those would be BRCA1 and BRCA2, for example).

Let me know if this is OK.

ugurdogrusoz commented 5 days ago
  1. I decided to keep "unspecified entity" objects (circular nodes) because they seem to be explanatory in nature ("Holliday junction", "cleaved Holliday structure", "3' overhanging DNA resected DSB ends" and things like these).

unspecified entries aren't any different than others, let's also not keep them if they are isolated

umut-er commented 4 days ago

Is this style OK for the placement of the checkbox?

image

Note that I changed the style on "Gene Symbols" to better match and align "Stop Distance" and "Gene Symbols". If this is OK, something similar to this can be made in all query types except URI.

umut-er commented 4 days ago

Please review this on the internal server. A lot of the requirements for this issue (except URI queries) have been merged. Also, please suggest where I should place the checkbox for URI queries because that one is very different from the other ones.

ugurdogrusoz commented 4 days ago

Well done!