From e47726f563edba4a3744e70f0b8d40ada1ebca42 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 24 Mar 2026 09:21:21 +0000 Subject: [PATCH] docs: Weekly AI README upgrade (2026-03-24) --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index ab52e09..29025f6 100644 --- a/README.md +++ b/README.md @@ -127,6 +127,28 @@ server <- function(input, output, session) { shinyApp(ui, server) ``` +### Filter Subnetwork by Context + +Filter a subnetwork based on contextual relevance using `filterSubnetworkByContext`. + +```r +# Example nodes and edges +nodes <- data.frame(id = c("A", "B", "C")) +edges <- data.frame( + source = c("A", "B"), + target = c("B", "C"), + interaction = c("Activation", "Inhibition"), + stringsAsFactors = FALSE +) + +# Define a query and filter the subnetwork +query <- c("DNA damage", "repair") +filtered_network <- filterSubnetworkByContext(nodes, edges, query, method = "tag_count", cutoff = 1) + +print(filtered_network$nodes) +print(filtered_network$edges) +``` + ## License This package is distributed under the [Artistic-2.0](https://opensource.org/licenses/Artistic-2.0) license. However, its dependencies may have different licenses.