From 6b0f584c112df7148426f1f1ca4294431f4c4c67 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 27 Jan 2026 21:45:13 +0000 Subject: [PATCH 1/2] Initial plan From c58eec2c58efb1dd78d461ee8b33a6880ed3584b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 27 Jan 2026 21:47:49 +0000 Subject: [PATCH 2/2] Remove unused newick.js file and update documentation Co-authored-by: rvosa <106490+rvosa@users.noreply.github.com> --- WEB_UI_ANALYSIS.md | 1 - .../src/main/webapp/scripts/newick.js | 102 ------------------ 2 files changed, 103 deletions(-) delete mode 100644 treebase-web/src/main/webapp/scripts/newick.js diff --git a/WEB_UI_ANALYSIS.md b/WEB_UI_ANALYSIS.md index 538cadb3b..c50708791 100644 --- a/WEB_UI_ANALYSIS.md +++ b/WEB_UI_ANALYSIS.md @@ -417,7 +417,6 @@ styles/ | `menuExpandable.js` | 6.1KB | Expandable menu navigation | Medium - Pure JS possible | | `ajaxProgress.js` | 1KB | Progress indicators | Medium - Uses DWR | | `d3.phylogram.js` | 12KB | D3-based tree rendering | Low - Uses D3 v7 | -| `newick.js` | 3.2KB | Newick format parsing | Low - Pure JavaScript | | `sha1.js` | 4.4KB | SHA1 hashing | Low - Pure JavaScript | | `googleAnalytics.js` | 3.4KB | Analytics integration | Low - Standard GA | | `multiFileUpload.js` | 1KB | File upload handling | Medium | diff --git a/treebase-web/src/main/webapp/scripts/newick.js b/treebase-web/src/main/webapp/scripts/newick.js deleted file mode 100644 index 43715e668..000000000 --- a/treebase-web/src/main/webapp/scripts/newick.js +++ /dev/null @@ -1,102 +0,0 @@ -/** - * Newick format parser in JavaScript. - * - * Copyright (c) Jason Davies 2010. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - * Example tree (from http://en.wikipedia.org/wiki/Newick_format): - * - * +--0.1--A - * F-----0.2-----B +-------0.3----C - * +------------------0.5-----E - * +---------0.4------D - * - * Newick format: - * (A:0.1,B:0.2,(C:0.3,D:0.4)E:0.5)F; - * - * Converted to JSON: - * { - * name: "F", - * branchset: [ - * {name: "A", length: 0.1}, - * {name: "B", length: 0.2}, - * { - * name: "E", - * length: 0.5, - * branchset: [ - * {name: "C", length: 0.3}, - * {name: "D", length: 0.4} - * ] - * } - * ] - * } - * - * Converted to JSON, but with no names or lengths: - * { - * branchset: [ - * {}, {}, { - * branchset: [{}, {}] - * } - * ] - * } - */ -(function(exports) { - exports.parse = function(s) { - var ancestors = []; - var tree = {}; - var tokens = s.split(/\s*(;|\(|\)|,|:)\s*/); - for (var i=0; i