Method and apparatus for accelerating large phylogenetic trees

By using an acceleration method based on clustering algorithms, the problem of low visualization efficiency of large phylogenetic trees is solved, and the visualization of phylogenetic trees that efficiently preserves leaf node features is achieved, thereby improving the ability to analyze the evolutionary relationships of large systems.

CN115691656BActive Publication Date: 2026-05-05COMP NETWORK INFORMATION CENT CHINESE ACADEMY OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
COMP NETWORK INFORMATION CENT CHINESE ACADEMY OF SCI
Filing Date
2022-10-11
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing phylogenetic tree tools are inefficient when visualizing large phylogenetic trees, and the method of folding subtrees leads to the loss of leaf node features, which cannot meet the researchers' needs for analyzing large phylogenetic relationships.

Method used

An acceleration method based on clustering algorithm is adopted. By obtaining the node attributes of the phylogenetic tree, leaf node clustering is performed to generate a new phylogenetic tree. The accelerated result is generated by judging the visibility state of the leaf branches.

Benefits of technology

It improves the visualization efficiency of large phylogenetic trees, avoids clustering and folding phenomena, preserves the characteristics of leaf nodes, and meets the analysis needs of evolutionary relationships in large systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115691656B_ABST
    Figure CN115691656B_ABST
Patent Text Reader

Abstract

This invention discloses an accelerated method and apparatus for visualizing large phylogenetic trees. The method includes: acquiring the attributes of all nodes in the phylogenetic tree; clustering the leaf nodes of the phylogenetic tree based on horizontal and vertical coordinates to obtain outliers and node clusters; if all descendant leaf nodes of a node belong to one of the node clusters, and the number of descendant leaf nodes is not less than a certain threshold, then treating the node as a new leaf node and setting the visibility state of the descendant leaf nodes to invisible, thereby obtaining a new phylogenetic tree; for the new phylogenetic tree, determining whether each leaf branch is invisible due to being covered by other nodes, and acquiring the visibility state of each node in that leaf branch to generate the accelerated result of the phylogenetic tree. This invention avoids the phenomenon of clustering and collapsing when visualizing large phylogenetic trees.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of applied bioinformatics technology and relates to a method and apparatus for accelerating large-scale phylogenetic trees. Background Technology

[0002] Phylogenetic trees are essential in biological research. They link species or populations in a hierarchical structure, elucidating evolutionary patterns, phylogenetic relationships among major phyla, and dynamic changes in organisms. Phylogenetic trees have positive applications, such as predicting which species are becoming extinct, allowing for preventative measures; identifying closely related members of pharmacologically significant species; and recognizing and classifying various microorganisms, including bacteria.

[0003] Currently, the evolutionary relationships of over 80,000 species have been analyzed, while over 1 million species remain unanalyzed, indicating a vast market for analyzing species evolutionary relationships. The bioinformatics field already has many tools for visualizing phylogenetic trees, such as iTOL v5, PhyD3, and PhyloTree, which excel in metadata visualization, software portability, and functional extensibility. However, due to the development of high-throughput sequencing and artificial intelligence technologies, massive amounts of bioinformatics data are being created, and the size of phylogenetic trees is constantly increasing. To improve the visualization efficiency of large-scale phylogenetic trees, acceleration methods are needed. Designing such acceleration methods is a pressing issue that needs to be addressed.

[0004] Existing phylogenetic tree tools often visualize all nodes and branches when visualizing phylogenetic trees. The advantage of this approach is that it preserves all the features of the original tree and avoids distortion due to scaling. However, this method is relatively inefficient, especially when dealing with large phylogenetic trees. The size of phylogenetic trees researchers face has increased from less than 1,000 leaf nodes to over 100,000 leaf nodes. Visualizing such large phylogenetic trees is extremely inefficient and cannot meet researchers' needs for analyzing large-scale phylogenetic relationships.

[0005] To improve the visualization efficiency of large phylogenetic trees, the field of bioinformatics has conducted long-term research. Current solutions mainly focus on folding subtrees, i.e., reducing the number of nodes and branches that need to be rendered by folding certain larger subtrees of a large phylogenetic tree. While this method can accelerate the visualization of large phylogenetic trees, the folded subtrees often possess many unique characteristics. For example, iTOL automatically folds subtrees with more than 200 nodes. This clustering folding causes a significant loss of characteristics contained in these subtrees. From a global perspective, leaf nodes are crucial for analyzing phylogenetic relationships, and the phylogenetic tree accelerated by folding methods cannot reflect the characteristics of the original leaf nodes. Furthermore, evolutionary biology uses clustering methods to infer taxonomic relationships between species. Due to the grouping characteristics of clustering methods, combining clustering methods to group and accelerate the leaf nodes of large phylogenetic trees has broad application prospects.

[0006] Therefore, given the increasing size of phylogenetic trees and the growing number of large-scale phylogenetic tree visualization scenarios, it is of great significance to propose a method for accelerating large-scale phylogenetic trees while preserving leaf node features as much as possible. Summary of the Invention

[0007] This invention addresses the issue of low efficiency in visualizing large phylogenetic trees by proposing an acceleration method and apparatus for large phylogenetic trees. It is mainly applied to large phylogenetic tree visualization, exploration of evolutionary relationships in large systems, and large-scale species classification.

[0008] The technical content of this invention includes:

[0009] An accelerated method for large phylogenetic trees, the method comprising:

[0010] Obtain the attributes of all nodes in the system's evolutionary tree; wherein, the attributes include: horizontal coordinate, vertical coordinate, parent node, child node, visibility state, and radius, and the initial value of the visibility state is that the current node is visible;

[0011] Based on the horizontal and vertical coordinates, the leaf nodes of the phylogenetic tree are clustered to obtain outliers and node clusters;

[0012] If all of a node's descendant leaf nodes belong to the same node cluster, and the number of descendant leaf nodes is not less than a certain threshold, then the node is designated as a new leaf node, and the visibility state of the descendant leaf nodes is set to invisible for the current node, thus obtaining a new phylogenetic tree; wherein the radius of the new leaf node is based on the number of descendant leaf nodes.

[0013] For the new phylogenetic tree, the visibility status of each node in the leaf branch is obtained by determining whether each leaf branch is invisible due to being covered by other nodes.

[0014] Based on the visible state of each node in each leaf branch, an accelerated result of the phylogenetic tree is generated.

[0015] Furthermore, obtaining the attributes of all nodes in the system's evolutionary tree includes:

[0016] Read the Newick format file of the phylogenetic tree and convert it into a JSON structure;

[0017] The phylogenetic tree is initialized based on the JSON structure, and starting from the root node of the phylogenetic tree, all nodes are traversed, and the parent node corresponding to each node is recorded.

[0018] Set the horizontal scaling factor SCALE_X and the vertical scaling factor SCALE_Y;

[0019] Set the leaf node position as (X, Y) = (TOTAL_DISTANCE*SCALE_X, COUNT*SCALE_Y-BIAS_Y); where TOTAL_DISTANCE represents the sum of the path lengths of all paths from the current node to the root node, COUNT is the number of leaf nodes currently being traversed, and BIAS_Y is the offset in the Y-axis direction.

[0020] Traverse back from the leaf node to the parent node until the root node, and the position of the currently traversed node is (X, Y) = (TOTAL_DISTANCE*SCALE_X, (MIN_SON_Y+MAX_SON_Y) / 2); where MIN_SON_Y and MAX_SON_Y are the minimum and maximum coordinates of the child node in the Y direction, respectively.

[0021] Perform a level-order traversal of all nodes and branches, and set all nodes to be visible.

[0022] Further, the step of clustering the leaf nodes of the phylogenetic tree based on the horizontal and vertical coordinates to obtain outliers and node clusters includes:

[0023] Set the first hyperparameter MIN_SAMPLES and the second hyperparameter EPS, and set the input to all the leaf nodes in the phylogenetic tree; wherein, the first hyperparameter MIN_SAMPLES is the minimum number of samples in a cluster, and the second hyperparameter EPS is the scan radius;

[0024] Using the first hyperparameter MIN_SAMPLES and the second hyperparameter EPS, the DBSCAN algorithm is executed on all leaf nodes to obtain several node clusters and outliers; each node cluster contains several leaf nodes.

[0025] Further, when all descendant leaf nodes of a node belong to the same node cluster, and the number of descendant leaf nodes is not less than a certain threshold, the node is designated as a new leaf node, and the visibility state of the descendant leaf nodes is set to invisible for the current node, to obtain a new phylogenetic tree, including:

[0026] Set the quantity threshold MIN_NODES, and initialize the TEMP_LIST list to be empty;

[0027] For each node in a class, traverse the hierarchy starting from the root node. If all the descendant leaf nodes of a branch belong to a node cluster and the number of these descendant leaf nodes is greater than or equal to MIN_NODES, then change the visible state of the node to a temporary state.

[0028] For each node in a node cluster, perform a level-wise traversal starting from the root node;

[0029] If all of a node's descendant leaf nodes belong to a node cluster, and the number of descendant leaf nodes is greater than or equal to the number threshold MIN_NODES, then the node's visibility state is changed to a temporary state and added to the list TEMP_LIST.

[0030] Traverse the TEMP_LIST list, change the visibility of nodes to be visible, and set the radius of each node based on the number of its descendant leaf nodes. Then, treat the node as a new leaf node to obtain a new phylogenetic tree.

[0031] Furthermore, for the new phylogenetic tree, the process of determining whether each leaf branch is invisible due to being covered by other nodes, and obtaining the visibility state of each node in that leaf branch, includes:

[0032] For the new phylogenetic tree, traverse all leaf nodes and establish a sequential covering table VISIBLE_TABLE for the leaf nodes;

[0033] For each leaf node, check the branch from the leaf node to the parent node and mark the coverage count COVER_TIMES as 0;

[0034] Starting from the leaf node, extend the NODE_SIZE size towards the parent node;

[0035] Get the new extension position of the last extension position;

[0036] In the sequential covering table VISIBLE_TABLE, find the leaf nodes in the open interval of the horizontal coordinate between the previous extension position and the new extension position, and record these leaf nodes as neighbor nodes;

[0037] If at least one of the neighboring nodes is within the coverage area of ​​the previous extension position or the new extension position, increment the coverage count COVER_TIMES of the corresponding branch by 1, and jump to determine whether the coverage count COVER_TIMES is equal to the actual extension count, and whether it extends beyond the root node.

[0038] If none of the neighboring nodes are within the coverage area of ​​the previous extension position or the new extension position, and the coverage count COVER_TIMES of the corresponding branch remains unchanged, and all descendant internal nodes and leaf nodes under the branch corresponding to the previous extension position are set to invisible, then the next leaf node in the sequential coverage table VISIBLE_TABLE is selected, and the process returns to the leaf node and extends NODE_SIZE towards the parent node.

[0039] Determine whether the number of coverage times (COVER_TIMES) is equal to the actual number of extensions, and whether the extension extends beyond the root node:

[0040] If the number of coverages (COVER_TIMES) is equal to the number of actual extensions, and the extension does not extend beyond the root node, the new extension position is taken as the previous extension position, and the process returns to the new extension position where the previous extension position was obtained, in order to obtain a continuous longest invisible path.

[0041] If the number of coverage times (COVER_TIMES) is not equal to the actual number of extensions, or if the extension extends beyond the parent node, after setting all descendant internal nodes and leaf nodes under the branch corresponding to the last extension position to an invisible state, select the next leaf node in the sequential coverage table (VISIBLE_TABLE), and return to the step of obtaining the NODE_SIZE size extending from the leaf node towards the parent node.

[0042] Mark the visibility status of all descendant internal nodes and leaf nodes under the longest consecutive invisible path as invisible to the current node.

[0043] Furthermore, after generating the accelerated result of the phylogenetic tree based on the visible state of each node in each leaf branch, the process further includes:

[0044] Visualize the acceleration results.

[0045] An acceleration device for large phylogenetic trees, the device comprising:

[0046] The acquisition module is used to acquire the attributes of all nodes in the system evolution tree; wherein, the attributes include: horizontal coordinate, vertical coordinate, parent node, child node, visibility state and radius, and the initial value of the visibility state is that the current node is visible;

[0047] A clustering module is used to cluster the leaf nodes of the phylogenetic tree based on the horizontal and vertical coordinates to obtain outliers and node clusters.

[0048] The initial filtering module is used to treat a node as a new leaf node when all of its descendant leaf nodes belong to the same node cluster and the number of descendant leaf nodes is not less than a certain threshold, and to set the visibility state of the descendant leaf nodes to be invisible to the current node, so as to obtain a new phylogenetic tree; wherein the radius of the new leaf node is obtained based on the number of descendant leaf nodes.

[0049] The secondary filtering module is used to determine the visibility status of each node in the new phylogenetic tree by judging whether each leaf branch is invisible due to being covered by other nodes.

[0050] The result generation module is used to generate accelerated results of the phylogenetic tree based on the visible state of each node in each leaf branch.

[0051] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the methods described above.

[0052] A computer device includes a memory and a processor, the memory storing a computer program which is loaded and executed by the processor to perform any of the methods described above.

[0053] Compared with the prior art, the positive effects of the present invention are as follows:

[0054] This invention presents an accelerated method for large phylogenetic trees based on clustering algorithms. It is primarily applied to the visualization of large phylogenetic trees, the exploration of evolutionary relationships within large systems, and large-scale species classification. This method avoids the clustering and collapsing phenomenon during the visualization of large phylogenetic trees, thus improving visualization efficiency and speed. Attached Figure Description

[0055] Figure 1 This is a flowchart illustrating the workflow of the method for accelerating the evolutionary tree of a large system in this embodiment.

[0056] Figure 2This is a flowchart for accelerating the processing of large phylogenetic trees based on the phylogenetic tree of Chinese terrestrial plants. Detailed Implementation

[0057] The technical solutions in the embodiments of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are merely specific embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0058] The large phylogenetic tree in this embodiment is the basic phylogenetic tree of Chinese terrestrial plants (Li D Z. Tree of life for the genera of Chinese vascular plants. 2016.). Its phylogenetic tree format is Newick format, as shown in Set1.

[0059] See appendix Figure 1 , 2 The specific process of the large-scale phylogenetic tree acceleration method described in this embodiment is as follows:

[0060] Step A: Analysis of the Chinese Terrestrial Plant Systematic Evolution Tree: Read the Newick format file of the Chinese terrestrial plant systematic evolution tree and convert it into a JSON structure. Starting from the root node, traverse all nodes and record the parent node corresponding to each node. Then proceed to Step B.

[0061] Step B: Initialization of the Chinese Terrestrial Plants Systematic Evolution Tree: Based on the scaling factor of the X and Y axes, traverse the Chinese Terrestrial Plants Systematic Evolution Tree starting from the root node, calculate and obtain the position of all nodes, initially set all nodes to be visible, and set the node radius to NODE_RADIUS. Then proceed to step C.

[0062] Step C: Filter outliers: Set the hyperparameters MIN_SAMPLES and EPS, input the coordinates of all leaf nodes of the Chinese terrestrial plant phylogenetic tree, and use the DBSCAN clustering algorithm to cluster these leaf nodes. The result contains multiple clusters, and the nodes that are not included are outliers. The node clusters other than the outliers are used in step D.

[0063] Step D: Initial Filtering: For each node in the class, start traversing from the root node of the Chinese terrestrial plant phylogenetic tree. If all the descendant leaf nodes of a branch belong to a cluster in the result of Step C, and the number of these descendant leaf nodes is greater than or equal to MIN_NODES, then set the node to the temporary state TEMP_STATUS, and all its descendant leaf nodes become invisible. Then proceed to Step E.

[0064] Step E: Reset leaf nodes: For the node marked TEMP_STATUS, set its size and make it visible, then proceed to step F;

[0065] Step F: Secondary filtering: Based on the node size NODE_RADIUS, traverse each leaf branch of the Chinese terrestrial plant phylogenetic tree using the range covering method, and determine whether it is invisible due to being covered by other nodes. If so, continue to search for its parent branch, that is, find the longest parent branch that is invisible to all its descendants, set all the corresponding nodes to be invisible, and then execute step G.

[0066] Step G: Visualization of the phylogenetic tree: Based on the state of the nodes, only the visible branches and nodes of the phylogenetic tree of Chinese terrestrial plants are retained, and the results are finally visualized.

[0067] In this embodiment, step A, the parsing of the phylogenetic tree of Chinese terrestrial plants, involves converting the Newick format phylogenetic tree into a JSON format sequence similar to Set2. Each node is given "xposition", "yposition", "parent", "children", "visible", and "size" attributes, which are used to record the node's horizontal coordinate, vertical coordinate, parent node, child node, current node visibility status, and current node radius, respectively. Initially, the visible attribute value of all nodes is set to 2, and NODE_RADIUS is initialized to 1, meaning that the size attribute value of all leaf nodes is 1, and the size attribute value of all non-leaf nodes is 0.

[0068] In this embodiment, step B, the phylogenetic tree initialization, is as follows: (1) Set the horizontal scaling factor SCALE_X = 10 and the vertical scaling factor SCALE_Y = 0.2; (2) Starting from the root node, traverse all leaf nodes of the phylogenetic tree of Chinese terrestrial plants in a level-order traversal manner, and calculate the leaf node position as (X, Y) = (TOTAL_DISTANCE * SCALE_X, COUNT * SCALE_Y - BIAS_Y), where TOTAL_DISTANCE represents the sum of the path lengths from the current node to the root node, COUNT is the number of leaf nodes traversed, starting from 1, and BIAS_Y is... The offset in the Y-axis direction is equal to 1 / 2 of the vertical interval between the highest and lowest leaf nodes; (3) Backtrack from the leaf node to the parent node until the root node, and the position of the currently traversed node is (X, Y) = (TOTAL_DISTANCE*SCALE_X, (MIN_SON_Y+MAX_SON_Y) / 2), where MIN_SON_Y and MAX_SON_Y are the coordinates of the child node in the Y direction, and update X and Y to the node's "xposition" and "yposition" attributes; (4) Traverse all nodes and branches hierarchically, and set all nodes and branches to be visible.

[0069] In this embodiment, the outlier selection in step C is as follows: (1) Set the hyperparameters MIN_SAMPLES=5 and EPS=1, where MIN_SAMPLES is the minimum number of samples in a cluster, EPS is the scanning radius, and set all leaf nodes to be input; (2) Execute the DBSCAN algorithm, and the result contains many clusters, each containing multiple leaf nodes. Points not in a cluster are outliers. Mark these outliers as visible, and the remaining result clusters proceed to step D.

[0070] The initial filtering in step D of this embodiment is as follows: (1) Set the parameter MIN_NODES = 5 and initialize TEMP_LIST as an empty list; (2) For each node in the class, traverse the hierarchy starting from the root node. If all the descendant leaf nodes of a branch belong to a cluster in the result of step C, and the number of these descendant leaf nodes is greater than or equal to MIN_NODES, then set the visible state of the node to a temporary state, that is, set the "visible" attribute to 1, add the node to TEMP_LIST, and set all its descendant leaf nodes to be invisible, that is, set the "visible" attribute to 0.

[0071] In this embodiment, step E, resetting the leaf node, means: sequentially traversing all nodes in TEMP_LIST, setting its node size to a fixed size, and the size being proportional to the number of descendant leaf nodes, while setting the node to a visible state, i.e., setting the "visible" attribute to 2. At this time, the nodes in TEMP_LIST are the new leaf nodes.

[0072] The secondary filtering in step F of this embodiment is as follows: (1) Traverse all leaf nodes of the phylogenetic tree of Chinese terrestrial plants that are visible, and establish a leaf node sequential cover table VISIBLE_TABLE. The format of each data in the table is (X, Y), that is, it stores the "xposition" and "yposition" attributes of the leaf node, and is arranged in ascending order of X and Y; (2) Traverse all leaf nodes. For each leaf node, check the branch from the current node to the parent node and mark the cover count COVER_TIMES as 0; (3) Starting from the leaf node, extend towards the parent node. The length of each extension is NODE_SIZE. After each extension, search for all the nodes contained in (the previous extension) in VISIBLE_TABLE. (Extended position, new extended position) nodes in the horizontal coordinate interval and record these nodes as NEIGHBOR_NODES. If at least one node in NEIGHBOR_NODES is within the coverage of at least one of the first and last two nodes corresponding to the interval (last extended position, new extended position), then mark the coverage count COVER_TIMES of this branch and increment it by 1. After the extension is completed, if COVER_TIMES is not equal to the extension count or the extension exceeds the root node, then traverse the next leaf node; otherwise, continue to execute the subsequent steps. (4) Check the parent branch of the current branch and switch to process (3). The goal is to find a continuous longest path, then mark all descendant internal nodes and leaf nodes under this path as invisible.

[0073] The phylogenetic tree visualization in step G of this embodiment is as follows: (1) convert the JSON file processed in the previous step into a Newick file, and keep only the nodes with the "visible" attribute value of 2; (2) visualize the Newick file using PhyD3.

[0074] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for accelerating the evolution of large phylogenetic trees, characterized in that, The method includes: Obtain the attributes of all nodes in the system's evolutionary tree; wherein, the attributes include: horizontal coordinate, vertical coordinate, parent node, child node, visibility state, and radius, and the initial value of the visibility state is that the current node is visible; Based on the horizontal and vertical coordinates, the leaf nodes of the phylogenetic tree are clustered to obtain outliers and node clusters; If all of a node's descendant leaf nodes belong to the same node cluster, and the number of descendant leaf nodes is not less than a certain threshold, then the node is designated as a new leaf node, and the visibility state of the descendant leaf nodes is set to invisible for the current node, thus obtaining a new phylogenetic tree; wherein the radius of the new leaf node is based on the number of descendant leaf nodes. For the new phylogenetic tree, the visibility status of each node in the leaf branch is obtained by determining whether each leaf branch is invisible due to being covered by other nodes. Based on the visible state of each node in each leaf branch, an accelerated result of the phylogenetic tree is generated; Specifically, for the new phylogenetic tree, determining whether each leaf branch is invisible due to being covered by other nodes, and obtaining the visibility state of each node in that leaf branch, includes: For the new phylogenetic tree, traverse all leaf nodes and establish a sequential covering table VISIBLE_TABLE for the leaf nodes; For each leaf node, check the branch from the leaf node to the parent node and mark the coverage count COVER_TIMES as 0; Starting from the leaf node, extend NODE_SIZE size towards the parent node; Get the new extension position of the last extension position; In the sequential covering table VISIBLE_TABLE, find the leaf nodes in the open interval of the horizontal coordinate between the previous extension position and the new extension position, and record these leaf nodes as neighbor nodes; If at least one of the neighboring nodes is within the coverage area of ​​the previous extension location or the new extension location, increment the coverage count COVER_TIMES of the corresponding branch by 1, and jump to determine whether the coverage count COVER_TIMES is equal to the actual extension count, and whether it extends beyond the parent node. If none of the neighboring nodes are within the coverage area of ​​the previous extension position or the new extension position, and the coverage count COVER_TIMES of the corresponding branch remains unchanged, and all descendant internal nodes and leaf nodes under the branch corresponding to the previous extension position are set to invisible, then the next leaf node in the sequential coverage table VISIBLE_TABLE is selected, and the process returns to the leaf node and extends NODE_SIZE towards the parent node. Determine whether the number of coverage times (COVER_TIMES) is equal to the actual number of extensions, and whether the extension extends beyond the root node: If the number of coverages (COVER_TIMES) is equal to the number of actual extensions, and the extension does not extend beyond the root node, the new extension position is taken as the previous extension position, and the process returns to the new extension position where the previous extension position was obtained, in order to obtain a continuous longest invisible path. If the number of coverage times (COVER_TIMES) is not equal to the actual number of extensions, or if the extension extends beyond the root node, after setting all descendant internal nodes and leaf nodes under the branch corresponding to the last extension position to an invisible state, select the next leaf node in the sequential coverage table (VISIBLE_TABLE), and return to the step of obtaining the NODE_SIZE size of the extension from the leaf node towards the parent node. Mark the visibility status of all descendant internal nodes and leaf nodes under the longest consecutive invisible path as invisible to the current node.

2. The method as described in claim 1, characterized in that, The process of obtaining the attributes of all nodes in the phylogenetic tree includes: Read the Newick format file of the phylogenetic tree and convert it into a JSON structure; The phylogenetic tree is initialized based on the JSON structure, and starting from the root node of the phylogenetic tree, all nodes are traversed, and the parent node corresponding to each node is recorded. Set the horizontal scaling factor SCALE_X and the vertical scaling factor SCALE_Y; Set the leaf node position as (X, Y) = (TOTAL_DISTANCE*SCALE_X, COUNT*SCALE_Y-BIAS_Y); where TOTAL_DISTANCE represents the sum of the path lengths of all paths from the current node to the root node, COUNT is the number of leaf nodes currently being traversed, and BIAS_Y is the offset in the Y-axis direction. Traverse back from the leaf node to the parent node until the root node, and the position of the currently traversed node is (X, Y) = (TOTAL_DISTANCE*SCALE_X, (MIN_SON_Y+MAX_SON_Y) / 2); where MIN_SON_Y and MAX_SON_Y are the minimum and maximum coordinates of the child node in the Y direction, respectively. Perform a level-order traversal of all nodes and branches, and set all nodes to be visible.

3. The method as described in claim 1, characterized in that, The step of clustering the leaf nodes of the phylogenetic tree based on the horizontal and vertical coordinates to obtain outliers and node clusters includes: Set the first hyperparameter MIN_SAMPLES and the second hyperparameter EPS, and set the input to all the leaf nodes in the phylogenetic tree; wherein, the first hyperparameter MIN_SAMPLES is the minimum number of samples in a cluster, and the second hyperparameter EPS is the scan radius; Using the first hyperparameter MIN_SAMPLES and the second hyperparameter EPS, the DBSCAN algorithm is executed on all leaf nodes to obtain several node clusters and outliers; each node cluster contains several leaf nodes.

4. The method as described in claim 1, characterized in that, When all descendant leaf nodes of a node belong to the same node cluster, and the number of descendant leaf nodes is not less than a certain threshold, the node is designated as a new leaf node, and the visibility state of the descendant leaf nodes is set to invisible for the current node, thus obtaining a new phylogenetic tree, including: Set the quantity threshold MIN_NODES, and initialize the TEMP_LIST list to be empty; For each node in a class, perform a level-order traversal starting from the root node. If all descendant leaf nodes of a branch belong to a node cluster, and the number of these descendant leaf nodes is greater than or equal to MIN_NODES, then change the visible state of that node to a temporary state. For each node in a node cluster, perform a level-wise traversal starting from the root node; If all of a node's descendant leaf nodes belong to a node cluster, and the number of descendant leaf nodes is greater than or equal to the number threshold MIN_NODES, then the node's visibility state is changed to a temporary state and added to the list TEMP_LIST. Traverse the TEMP_LIST list, change the visibility of nodes to be visible, and set the radius of each node based on the number of its descendant leaf nodes. Then, treat the node as a new leaf node to obtain a new phylogenetic tree.

5. The method as described in claim 1, characterized in that, After generating the accelerated result of the phylogenetic tree based on the visible state of each node in each leaf branch, the method further includes: Visualize the acceleration results.

6. An acceleration device for large-scale phylogenetic trees, characterized in that, The device includes: The acquisition module is used to acquire the attributes of all nodes in the system evolution tree; wherein, the attributes include: horizontal coordinate, vertical coordinate, parent node, child node, visibility state and radius, and the initial value of the visibility state is that the current node is visible; A clustering module is used to cluster the leaf nodes of the phylogenetic tree based on the horizontal and vertical coordinates to obtain outliers and node clusters. The initial filtering module is used to treat a node as a new leaf node when all of its descendant leaf nodes belong to the same node cluster and the number of descendant leaf nodes is not less than a certain threshold, and to set the visibility state of the descendant leaf nodes to be invisible to the current node, so as to obtain a new phylogenetic tree; wherein the radius of the new leaf node is obtained based on the number of descendant leaf nodes. The secondary filtering module is used to determine the visibility status of each node in the new phylogenetic tree by judging whether each leaf branch is invisible due to being covered by other nodes. The result generation module is used to generate accelerated results of the phylogenetic tree based on the visible state of each node in each leaf branch. Specifically, for the new phylogenetic tree, determining whether each leaf branch is invisible due to being covered by other nodes, and obtaining the visibility state of each node in that leaf branch, includes: For the new phylogenetic tree, traverse all leaf nodes and establish a sequential covering table VISIBLE_TABLE for the leaf nodes; For each leaf node, check the branch from the leaf node to the parent node and mark the coverage count COVER_TIMES as 0; Starting from the leaf node, extend NODE_SIZE size towards the parent node; Get the new extension position of the last extension position; In the sequential covering table VISIBLE_TABLE, find the leaf nodes in the open interval of the horizontal coordinate between the previous extension position and the new extension position, and record these leaf nodes as neighbor nodes; If at least one of the neighboring nodes is within the coverage area of ​​the previous extension location or the new extension location, increment the coverage count COVER_TIMES of the corresponding branch by 1, and jump to determine whether the coverage count COVER_TIMES is equal to the actual extension count, and whether it extends beyond the parent node. If none of the neighboring nodes are within the coverage area of ​​the previous extension position or the new extension position, and the coverage count COVER_TIMES of the corresponding branch remains unchanged, and all descendant internal nodes and leaf nodes under the branch corresponding to the previous extension position are set to invisible, then the next leaf node in the sequential coverage table VISIBLE_TABLE is selected, and the process returns to the leaf node and extends NODE_SIZE towards the parent node. Determine whether the number of coverage times (COVER_TIMES) is equal to the actual number of extensions, and whether the extension extends beyond the root node: If the number of coverages (COVER_TIMES) is equal to the number of actual extensions, and the extension does not extend beyond the root node, the new extension position is taken as the previous extension position, and the process returns to the new extension position where the previous extension position was obtained, in order to obtain a continuous longest invisible path. If the number of coverage times (COVER_TIMES) is not equal to the actual number of extensions, or if the extension extends beyond the root node, after setting all descendant internal nodes and leaf nodes under the branch corresponding to the last extension position to an invisible state, select the next leaf node in the sequential coverage table (VISIBLE_TABLE), and return to the step of obtaining the NODE_SIZE size of the extension from the leaf node towards the parent node. Mark the visibility status of all descendant internal nodes and leaf nodes under the longest consecutive invisible path as invisible to the current node.

7. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method of any one of claims 1-5.

8. A computer device comprising a memory and a processor, the memory storing a computer program, the computer program being loaded and executed by the processor to perform the method of any one of claims 1-5.

Citation Information

Patent Citations

  • Normalizing weights of weighted tree leaf nodes

    US20210158192A1

  • Cactus tree-based data visualization method and apparatus, and device and storage medium

    WO2020052053A1