From bc39c65c3b5850ce7eaae31b4d6cefdb814b9ce4 Mon Sep 17 00:00:00 2001 From: "Mark T. Holder" Date: Tue, 29 Jul 2025 16:52:58 -0500 Subject: [PATCH 1/9] client-side taxonomy browsing --- webapp/private/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 webapp/private/.gitignore diff --git a/webapp/private/.gitignore b/webapp/private/.gitignore new file mode 100644 index 00000000..99dfa545 --- /dev/null +++ b/webapp/private/.gitignore @@ -0,0 +1 @@ +config.BAK From 52f6fbb1c90e60072b41791b1a278bc003ee5d44 Mon Sep 17 00:00:00 2001 From: "Mark T. Holder" Date: Tue, 29 Jul 2025 16:53:19 -0500 Subject: [PATCH 2/9] client-side taxonomy browsing --- webapp/static/taxobrowse.html | 489 ++++++++++++++++++++++++++++++++++ 1 file changed, 489 insertions(+) create mode 100644 webapp/static/taxobrowse.html diff --git a/webapp/static/taxobrowse.html b/webapp/static/taxobrowse.html new file mode 100644 index 00000000..55a06f02 --- /dev/null +++ b/webapp/static/taxobrowse.html @@ -0,0 +1,489 @@ + + + + + + +
+

+ +

+
+ + + + +

Open Tree taxonomy:

+

The current taxonomy version is + ott3.7 (click for more information). + See the OTT documentation for + an explanation of the taxon flags used below, e.g., + extinct +

+

Taxon details

+

+ +
+ OTT ID: +
+ Sources: + + +
+ Flags: + + +
+ View this taxon in the current synthetic tree +

+

Synonym(s)

+

Lineage

+

+ +

Children included in the synthetic tree

+
    +

    Children suppressed in the synthetic tree

    +
      +
      + + + + \ No newline at end of file From cc7bfcbd5df2023a269a65b0e544523bd502bfa8 Mon Sep 17 00:00:00 2001 From: "Mark T. Holder" Date: Wed, 30 Jul 2025 16:25:22 -0500 Subject: [PATCH 3/9] deal with amendments src links --- webapp/static/taxobrowse.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/webapp/static/taxobrowse.html b/webapp/static/taxobrowse.html index 55a06f02..d286b1ec 100644 --- a/webapp/static/taxobrowse.html +++ b/webapp/static/taxobrowse.html @@ -127,6 +127,8 @@

      Children suppressed in the synthetic tree

      var name_match_url = api_server + "/v3/tnrs/match_names"; var about_taxon_url = tree_server + "/about/taxonomy-version/ott3.7"; var page_route = "browse"; +var amendments_repo_number = "1"; +var amends_url_pref = "https://github.com/OpenTreeOfLife/amendments-" + amendments_repo_number + "/blob/master/amendments/"; var get_link_for_taxsrc = function (taxsrc) { var tsurl; @@ -150,6 +152,17 @@

      Children suppressed in the synthetic tree

      tsurl = "http://www.marinespecies.org/aphia.php?p=taxdetails&id=" + tsextid; } else if (tstag == 'silva') { tsurl = "http://www.arb-silva.de/browser/ssu/silva/" + tsextid; + } else { + var id_parts = tstag.split("-"); + if (id_parts.length > 1) { + if (id_parts[0] == "additions") { + var prefix = "addition"; + var amurl = amends_url_pref + tstag + ".json"; + var node_id = id_parts[1]; + tsurl = amurl; + taxsrc = prefix + ":" + node_id; + } + } } } } From c8f5f967fa801e36d81d13df89a26164d3e4ba3b Mon Sep 17 00:00:00 2001 From: Jim Allman Date: Mon, 11 Aug 2025 11:34:24 -0400 Subject: [PATCH 4/9] Applying improvements from webapp-tree-viewer Slightly improved wait messages, and a big spinner. Copied from https://github.com/OpenTreeOfLife/webapp-tree-viewer/blob/master/synthetic_tree_viewer/synthetic_tree_viewer/templates/taxobrowse.jinja2 --- webapp/static/taxobrowse.html | 49 ++++++++++++++++++++++++++++++----- 1 file changed, 43 insertions(+), 6 deletions(-) diff --git a/webapp/static/taxobrowse.html b/webapp/static/taxobrowse.html index d286b1ec..27d6bd70 100644 --- a/webapp/static/taxobrowse.html +++ b/webapp/static/taxobrowse.html @@ -74,12 +74,17 @@ font-family: monospace; color: #999; } + .spinner { + background-image: url('/static/images/spinner.gif'); + background-repeat: no-repeat; + background-position: center 200px; + } - -
      + +

      - +

      @@ -296,7 +301,7 @@

      Children suppressed in the synthetic tree

      for (let el of tn) { multimatch_container.removeChild(el); } - multimatch_container.textContent = "multiple matches found. Click on your choice to resolve."; + multimatch_container.textContent = "Multiple matches found. Click on your choice to resolve."; var mmul = document.createElement("ul"); mmul.setAttribute("class", "mmul"); for (let mi in res.matches) { @@ -313,18 +318,21 @@

      Children suppressed in the synthetic tree

      } else { var the_match = res.matches[0]; - error_id_container.textContent = "Match found loading taxon info..."; + error_id_container.textContent = "Match found, loading taxon info..."; error_id_container.hidden = false; + show_spinner(); populate_by_id(the_match.taxon.ott_id); } } else { error_id_container.textContent = "No taxon found matching name \"" + name_param + "\""; error_id_container.hidden = false; + hide_spinner(); } }; var by_id_response_cb = function(resp_obj) { + hide_spinner(); error_id_container.hidden = true; multimatch_container.hidden = true; known_id_container.hidden = false; @@ -421,6 +429,7 @@

      Children suppressed in the synthetic tree

      }; var match_by_name = function(name_param) { + show_spinner(); error_id_container.hidden = true; multimatch_container.hidden = true; @@ -461,6 +470,7 @@

      Children suppressed in the synthetic tree

      alert(errmsg); error_id_container.textContent = errmsg; error_id_container.hidden = false; + hide_spinner(); } } } @@ -473,6 +483,7 @@

      Children suppressed in the synthetic tree

      var error_id_container = document.getElementById("errorpanel"); var multimatch_container = document.getElementById("multimatch"); var postload = function() { + show_spinner(); const urlParams = new URLSearchParams(window.location.search); var id_param = urlParams.get('id'); const name_param = urlParams.get('name'); @@ -487,7 +498,10 @@

      Children suppressed in the synthetic tree

      var ott_int = parseInt(id_param, 10); if (isNaN(ott_int) || ott_int < 1) { alert("Expected id param to be a positive integer found \"" + id_param + "\""); + hide_spinner(); } else { + error_id_container.textContent = "ID found, loading taxon info..."; + error_id_container.hidden = false; populate_by_id(ott_int); } } else { @@ -497,6 +511,29 @@

      Children suppressed in the synthetic tree

      } }; +var set_name_or_id = function() { + //var the_form = document.getElementById("searchform"); + var name_or_id_field = document.getElementById("name_or_id_field"); + if (isNaN(name_or_id_field.value)) { + // it's a name! submit the form as-is + return true; + } else { + // it's a plausible ID, tweak field name and submit form + name_or_id_field.setAttribute("name", "id"); + } + return true; +} + +/* a basic spinner to show during load+parse */ +var spinner_el = document.getElementById("spinner-container"); +var show_spinner = function() { + spinner_el.setAttribute("class", "spinner"); +} + +var hide_spinner = function() { + spinner_el.setAttribute("class", ""); +} + - \ No newline at end of file + From fce52465a70c0b10ac1e5e0cc344394893aac7f4 Mon Sep 17 00:00:00 2001 From: "Mark T. Holder" Date: Mon, 22 Dec 2025 10:06:04 -0600 Subject: [PATCH 5/9] ott3.7.3 stats into ott.json --- webapp/static/statistics/ott.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/webapp/static/statistics/ott.json b/webapp/static/statistics/ott.json index d4c2bf4d..b6634b11 100644 --- a/webapp/static/statistics/ott.json +++ b/webapp/static/statistics/ott.json @@ -6,6 +6,12 @@ "===": "visible_taxon_count comes from `cleaned_ott/index.html` in propinquity output", "===": "For proper sorting, all `date` strings must be in the form {yyyy-mm-dd}!", + "version": "ott3.7.3", + "date": "2024-12-20", + "taxon_count": 4529570, + "visible_taxon_count": 3677854 + }, + { "version": "ott3.7.2", "date": "2024-09-18", "taxon_count": 4529129, From 7c8f86c2b99b142cfa1504ab33f3cb1cfe2a3996 Mon Sep 17 00:00:00 2001 From: "Mark T. Holder" Date: Mon, 22 Dec 2025 10:18:16 -0600 Subject: [PATCH 6/9] Update synthesis.json with 16.1 details --- webapp/static/statistics/synthesis.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/webapp/static/statistics/synthesis.json b/webapp/static/statistics/synthesis.json index d75b60b0..df89253b 100644 --- a/webapp/static/statistics/synthesis.json +++ b/webapp/static/statistics/synthesis.json @@ -167,5 +167,14 @@ "tree_count": 1362, "total_OTU_count": 129778, "tip_count": 2384572 + }, + "2025-12-22T11Z": { + "===": "tree_count from https://files.opentreeoflife.org/synthesis/opentree16.1/output/index.html", + "===": "total_OTU_count and tip_count found in https://files.opentreeoflife.org/synthesis/opentree16.1/output/labelled_supertree/index.html", + "version": "v15.1", + "OTT_version": "ott3.7.2", + "tree_count": 2064, + "total_OTU_count": 159925, + "tip_count": 2385875 } } From 35276ddd8ac3490c7511371c8fee5caa8b75b8f6 Mon Sep 17 00:00:00 2001 From: "Mark T. Holder" Date: Mon, 22 Dec 2025 13:59:25 -0600 Subject: [PATCH 7/9] Update synthesis.json --- webapp/static/statistics/synthesis.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/static/statistics/synthesis.json b/webapp/static/statistics/synthesis.json index df89253b..ff55ce22 100644 --- a/webapp/static/statistics/synthesis.json +++ b/webapp/static/statistics/synthesis.json @@ -171,7 +171,7 @@ "2025-12-22T11Z": { "===": "tree_count from https://files.opentreeoflife.org/synthesis/opentree16.1/output/index.html", "===": "total_OTU_count and tip_count found in https://files.opentreeoflife.org/synthesis/opentree16.1/output/labelled_supertree/index.html", - "version": "v15.1", + "version": "v16.1", "OTT_version": "ott3.7.2", "tree_count": 2064, "total_OTU_count": 159925, From ba02fb35ade2f4a37e5d694f1e3b207839972842 Mon Sep 17 00:00:00 2001 From: "Mark T. Holder" Date: Mon, 22 Dec 2025 14:01:10 -0600 Subject: [PATCH 8/9] Update synthesis.json From 0427d84bc3be62d02a942d90b5b167686f52c771 Mon Sep 17 00:00:00 2001 From: "Mark T. Holder" Date: Wed, 7 Jan 2026 10:47:04 -0600 Subject: [PATCH 9/9] minor --- webapp/static/taxobrowse.html | 1 - 1 file changed, 1 deletion(-) diff --git a/webapp/static/taxobrowse.html b/webapp/static/taxobrowse.html index 27d6bd70..e8bcaece 100644 --- a/webapp/static/taxobrowse.html +++ b/webapp/static/taxobrowse.html @@ -459,7 +459,6 @@

      Children suppressed in the synthetic tree

      var args = {"ott_id": ott_int, 'include_children': true, 'include_lineage': true}; - xmlhttp.onreadystatechange = function() { if (this.readyState == 4) { if (this.status == 200) {