Skip to content

Feature/add linkage methods#3

Open
windysky wants to merge 4 commits into
hyuncat:mainfrom
windysky:feature/add-linkage-methods
Open

Feature/add linkage methods#3
windysky wants to merge 4 commits into
hyuncat:mainfrom
windysky:feature/add-linkage-methods

Conversation

@windysky

Copy link
Copy Markdown

No description provided.

windysky and others added 4 commits August 22, 2025 16:43
This commit implements the 'ward' and 'david' (multiple) linkage methods in the `richCluster` package.

The 'ward' linkage method is implemented using the generalized formula from Székely and Rizzo (2005), which is suitable for pre-computed distance matrices.

The 'david' linkage method is a custom implementation inspired by the DAVID functional annotation tool. It merges clusters based on the number of links between them.

The R code has been updated to support these new linkage methods, and tests have been added to `scripts/tests.R`. The README has also been updated to reflect the new features.
This commit implements the DAVID clustering algorithm as a separate function `david_cluster`.

The implementation is based on the provided Perl script and includes:
- Kappa score calculation for term similarity.
- Identification of initial seed groups.
- Iterative merging of seeds based on the Dice similarity coefficient.

A new C++ class `DavidClustering` has been created to encapsulate the logic, and it is exposed to R through the `david_cluster` function.

The README and NAMESPACE files have been updated to reflect these changes, and a test has been added to `scripts/tests.R`.
This commit adds two new visualization functions to the package: `plot_network_graph` and `compare_network_graphs_plotly`.

`plot_network_graph` visualizes a single cluster as a network graph, with nodes representing terms and edges representing similarity. Node colors can represent p-values from multiple datasets.

`compare_network_graphs_plotly` provides an interactive, side-by-side comparison of network graphs for a single cluster using different p-value types.

The necessary dependencies (`igraph`, `fields`, `plotly`, `viridis`) have been added to the `DESCRIPTION` file. Tests and documentation have also been updated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant