forensicgenomics / mitoTree-viewer

mitoTree is an interactive tool for visualizing and exploring mitochondrial DNA (mtDNA) lineages and their evolutionary relationships, helping users explore genetic diversity and maternal ancestry.
Mozilla Public License 2.0
2 stars 0 forks source link

EXPLORE TREE SEARCH: Possibility to search for HG in collapsed nodes #2

Closed niki0211 closed 2 weeks ago

niki0211 commented 1 month ago

from external user:

  1. Go to EXPLORE
  2. search for a haplogroup that is not visible

In case a haplogroup is not shown and you search for it, it would be nice if the tree jumps to that node.

minimops commented 1 month ago

It was decided that the search should work like this for now, meaning it only searches for haplogroups that are currently shown. The reason why / the problem is that it would be necessary to recursively expand all parent nodes of all matches found. This means the tree needs to be re-rendered and any customization done is lost and this also often leads to quite a lot of nodes being drawn (i.e. a huge tree).

It is definitely possible and worth implementing (maybe with a toggle selector to switch modes) if this behavior is generally desired by users.

Another option could be to add a 'Highlight in Tree' button to Haplogroups Info pages, where it would redirect to the linear tree page just like the 'Show Subtree' button, but draw the entire tree from true root, expand the necessary nodes to show the specific haplogroup and highlight it.

Asking for input here :)

minimops commented 2 weeks ago

Added this highlight in Tree functionality now (on branch fixes_v01), where the page redirects to a liner tree, which is expanded up to that specific node, it is highlighted and scrolled to center.

minimops commented 2 weeks ago

Also now added the function to search in all nodes via a toggle. There is a slight bug when scrolling to the node but works otherwise.

minimops commented 2 weeks ago

scrolling bug fixed. Leaving both features in for now.