OneZoom / OZtree

OneZoom Tree of Life Explorer
Other
90 stars 20 forks source link

code alternative branch style for bacterial branches #22

Open jrosindell opened 7 years ago

jrosindell commented 7 years ago

As it is unclear whether bacterial relationships are ever really "tree-like" in the first place (and even if so, the tree will only represent a small fraction of the "core genes" in the genome). Additionally, the rooting of the bacterial tree is very uncertain. So something that marks out the bacterial branch as only partially representing the relationships (e.g. a dotted or faded line) would be good.

Additionally, we might not want the standard view (especially the polytomy view) to look as if it is rooted.

hyanwong commented 6 years ago

@jrosindell : I would very much like to address this, now that bacteria are on the tree. Would it need to be something that is passed in via the API (like IUCN status), or can we calculate it even if zoomed in to the bacteria in detail (i.e. do we always keep a list of nodes to the root of the tree that we can query, even when zoomed in a lot)? @lentinj: do you think changing the line style on one specific branch would take a lot of time to code?

lentinj commented 6 years ago

do you think changing the line style on one specific branch would take a lot of time to code?

Easy-peasy. As part of OTOP we defined regions:-

https://github.com/OneZoom/OZtree/blob/4eb499debafb726126c3401607f1e22cf9408ec2/OZprivate/rawJS/OZTreeModule/src/factory/data_repo.js#L13-L25

...which we set for all nodes, which if they don't have their own region defined, will get whatever their parent got. Assuming that the the definition of bacteria there matches what you need, then you can use that when making theming decisions thus...

https://github.com/OneZoom/OZtree/blob/master/OZprivate/rawJS/OZTreeModule/src/themes/otop_theme.js#L10-L37

There's a wrinkle here, as the ott_region_map is based on OTT, we can't work out the region until nodes are developed. This results in some slight twinkling of nodes in OTOP, but might be more noticeable in this case. I think the answer is for ott_region_map to be converted into an OZid region map server-side, as I mentioned in some other ticket. This doesn't sound that scary though.

hyanwong commented 6 years ago

I hoped the answer would be something like that - excellent, thanks Jamie. @jrosindell: I think we should simply (as a first pass) have the bacteria as a lighter grey shade in the normal OZ tree. I can discuss implementation etc with you when we next chat (which I think is in a week or so?)

hyanwong commented 6 years ago

We also should add something to the FAQ (FAQ.html) "Why are the bacteria in a different colour to the rest of the tree: etc etc"

hyanwong commented 6 years ago

@lentinj : do regions only work in the OTOP view, or have you generalised the functionality to all the OneZoom projections (e.g. spiral)?

lentinj commented 6 years ago

@hyanwong Tagging the nodes with a region is generalised and available for anything. The only thing that uses them currently is the function in otop_theme.js.

hyanwong commented 6 years ago

Brilliant, thanks!

jrosindell commented 3 years ago

This relates also to the issues of node uncertainty and reflecting this in the colour scheme - we could use different colours for branches backed up by genetic data vs. those only based on taxonomy