feature(filter-subnetwork): Add feature to filter the subnetwork from INDRA by query context#84
feature(filter-subnetwork): Add feature to filter the subnetwork from INDRA by query context#84tonywu1999 wants to merge 2 commits intodevelfrom
Conversation
…atbot to give you way more similar sounding words for free
📝 WalkthroughWalkthroughIntroduces a new Changes
Sequence Diagram(s)sequenceDiagram
participant User as User/<br/>Package
participant Extract as Extract<br/>Evidence
participant INDRA as INDRA API
participant PubMed as PubMed<br/>(rentrez)
participant TextProc as Text<br/>Processing<br/>(text2vec)
participant Filter as Filter &<br/>Return
User->>Extract: Input: nodes, edges
Extract->>INDRA: Query for evidence<br/>per stmt_hash
INDRA-->>Extract: Evidence text, PMIDs
Extract->>PubMed: Fetch abstracts<br/>for unique PMIDs
PubMed-->>Extract: PubMed abstracts
Extract->>TextProc: Build TF-IDF matrix<br/>(query + abstracts)
TextProc->>TextProc: Vectorize & compute<br/>cosine similarity
TextProc-->>Extract: Similarity scores
Extract->>Filter: Attach scores,<br/>filter by cutoff
Filter-->>User: Filtered nodes,<br/>edges, evidence
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@R/filterSubnetworkByContext.R`:
- Around line 112-114: Replace the positional column access nodes[[1]] with an
explicit nodes$id reference in the nodes_filtered assignment, and add a
pre-check that the nodes data.frame contains an "id" column (e.g., stop with a
clear error if !"id" %in% colnames(nodes)); update the nodes_filtered creation
that currently uses surviving_nodes and edges_filtered to filter by nodes$id to
avoid silent breakage when columns are reordered; this keeps behavior consistent
with other functions like getSubnetworkFromIndra() and fails fast when the
required column is missing.
- Around line 93-106: Remove the forced conversion of missing similarity values
to 0 (the line setting evidence_scored$similarity[is.na(...)] <- 0) so
unknown/failed-fetch abstracts remain NA, and update the logic that computes
passing_pmids (the filter that uses similarity >= cutoff) to treat NA as passing
by using a condition like is.na(similarity) OR similarity >= cutoff; this
ensures evidence_scored, evidence_filtered, abstracts_df, similarity and
passing_pmids retain and preserve unknown scores rather than conflating them
with zero.
- Around line 217-220: Replace the single-section extraction using
xml_find_first with a concatenation of all <AbstractText> nodes: use
xml_find_all(doc, ".//AbstractText") to retrieve every section, combine their
xml_text() values (e.g., collapse with a space) and assign the combined string
to results[[pmid]] instead of the single abstract_node; additionally update the
package metadata to import xml_find_all by adding xml_find_all to the
`@importFrom` xml2 line and exporting it in the NAMESPACE so the function is
available.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f8397e58-b24c-4ce8-aa8e-d6f237bd05a8
📒 Files selected for processing (6)
DESCRIPTIONNAMESPACER/filterSubnetworkByContext.RR/utils_getSubnetworkFromIndra.Rman/filterSubnetworkByContext.Rdvignettes/Filter-By-Context.Rmd
| filterSubnetworkByContext <- function(nodes, | ||
| edges, | ||
| similarity_cutoff = 0.10, | ||
| query = "DNA damage repair cancer oncology") { |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
cd /tmp && find . -name "filterSubnetworkByContext.R" 2>/dev/null | head -20Repository: Vitek-Lab/MSstatsBioNet
Length of output: 49
🏁 Script executed:
git ls-files | grep -i filtersubnetworkRepository: Vitek-Lab/MSstatsBioNet
Length of output: 129
🏁 Script executed:
cat -n R/filterSubnetworkByContext.R | head -100Repository: Vitek-Lab/MSstatsBioNet
Length of output: 5006
🏁 Script executed:
cat -n R/filterSubnetworkByContext.R | sed -n '25,100p'Repository: Vitek-Lab/MSstatsBioNet
Length of output: 3555
🏁 Script executed:
wc -l R/filterSubnetworkByContext.RRepository: Vitek-Lab/MSstatsBioNet
Length of output: 100
🏁 Script executed:
cat -n R/filterSubnetworkByContext.RRepository: Vitek-Lab/MSstatsBioNet
Length of output: 12275
Validate query and similarity_cutoff before vectorising.
query must be a single character string. If length > 1, all_texts at line 54 combines multiple query strings with abstracts, creating a DTM with extra rows. This causes scores at line 76–78 to have length = nrow(query) + nrow(abstracts_df), which fails to assign to abstracts_df$similarity at line 80 (length mismatch). Non-scalar similarity_cutoff will also recycle silently in the comparison at line 83.
Proposed fix
filterSubnetworkByContext <- function(nodes,
edges,
similarity_cutoff = 0.10,
query = "DNA damage repair cancer oncology") {
+ if (!is.character(query) || length(query) != 1L || is.na(query) || !nzchar(query)) {
+ stop("`query` must be a single non-empty character string.")
+ }
+ if (!is.numeric(similarity_cutoff) || length(similarity_cutoff) != 1L ||
+ is.na(similarity_cutoff) || !is.finite(similarity_cutoff) ||
+ similarity_cutoff < -1 || similarity_cutoff > 1) {
+ stop("`similarity_cutoff` must be a single numeric value in [-1, 1].")
+ }
# ── 1. Extract evidence text from edges ───────────────────────────────────
evidence <- .extract_evidence_text(edges)| evidence_scored <- merge( | ||
| evidence, | ||
| abstracts_df[, c("pmid", "similarity")], | ||
| by = "pmid", | ||
| all.x = TRUE | ||
| ) | ||
| evidence_scored$similarity[is.na(evidence_scored$similarity)] <- 0 | ||
|
|
||
| # Keep only evidence rows whose PMID passed | ||
| evidence_filtered <- evidence_scored[ | ||
| evidence_scored$pmid %in% passing_pmids, | ||
| c("source", "target", "interaction", "site", | ||
| "evidenceLink", "stmt_hash", "text", "pmid", "similarity") | ||
| ] |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# Find and read the file
find . -name "filterSubnetworkByContext.R" -type fRepository: Vitek-Lab/MSstatsBioNet
Length of output: 98
🏁 Script executed:
# Get context around the relevant lines
head -120 R/filterSubnetworkByContext.R | tail -50Repository: Vitek-Lab/MSstatsBioNet
Length of output: 2022
🏁 Script executed:
# Read the full function to understand the complete context
cat -n R/filterSubnetworkByContext.R | head -110Repository: Vitek-Lab/MSstatsBioNet
Length of output: 5542
🏁 Script executed:
# Find the fetch function to understand when abstracts might be NA
rg "\.fetch_clean_abstracts_xml" -A 5 R/Repository: Vitek-Lab/MSstatsBioNet
Length of output: 825
🏁 Script executed:
# Look for the function definition
rg "fetch_clean_abstracts" --type r -B 2 -A 15 R/Repository: Vitek-Lab/MSstatsBioNet
Length of output: 2480
🏁 Script executed:
# Get the complete .fetch_clean_abstracts_xml function
sed -n '/^\.fetch_clean_abstracts_xml/,/^}/p' R/filterSubnetworkByContext.R | head -50Repository: Vitek-Lab/MSstatsBioNet
Length of output: 1105
🏁 Script executed:
# Check how abstracts_df handles missing abstracts - specifically look at what happens
# when abstract is empty string vs NA
rg "abstract_list|abstracts_df" R/filterSubnetworkByContext.R -A 2 -B 2Repository: Vitek-Lab/MSstatsBioNet
Length of output: 1035
🏁 Script executed:
# Check for tests or examples
fd "test.*filter" --type f
fd "filterSubnetwork" --type fRepository: Vitek-Lab/MSstatsBioNet
Length of output: 129
Don't collapse unscored abstracts into similarity 0.
Line 99 converts NA to 0, which happens when abstracts fail to fetch or aren't returned by PubMed. This conflates transient fetch failures with genuinely low-scoring abstracts, causing valid evidence to be removed from the network at line 103 (filtered by passing_pmids with cutoff ≥ 0.10). Instead, preserve evidence with unknown similarity scores.
Proposed fix
evidence_scored <- merge(
evidence,
abstracts_df[, c("pmid", "similarity")],
by = "pmid",
all.x = TRUE
)
- evidence_scored$similarity[is.na(evidence_scored$similarity)] <- 0
+ if (all(is.na(evidence_scored$similarity))) {
+ warning("No abstracts could be scored — returning unfiltered inputs.")
+ return(list(nodes = nodes, edges = edges, evidence = evidence_scored))
+ }
# Keep only evidence rows whose PMID passed
evidence_filtered <- evidence_scored[
- evidence_scored$pmid %in% passing_pmids,
+ !is.na(evidence_scored$similarity) &
+ evidence_scored$similarity >= similarity_cutoff,
c("source", "target", "interaction", "site",
"evidenceLink", "stmt_hash", "text", "pmid", "similarity")
]🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@R/filterSubnetworkByContext.R` around lines 93 - 106, Remove the forced
conversion of missing similarity values to 0 (the line setting
evidence_scored$similarity[is.na(...)] <- 0) so unknown/failed-fetch abstracts
remain NA, and update the logic that computes passing_pmids (the filter that
uses similarity >= cutoff) to treat NA as passing by using a condition like
is.na(similarity) OR similarity >= cutoff; this ensures evidence_scored,
evidence_filtered, abstracts_df, similarity and passing_pmids retain and
preserve unknown scores rather than conflating them with zero.
| # Keep nodes present in surviving edges | ||
| surviving_nodes <- union(edges_filtered$source, edges_filtered$target) | ||
| nodes_filtered <- nodes[nodes[[1]] %in% surviving_nodes, ] # assumes first col is node ID |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# First, locate and examine the file
find . -name "filterSubnetworkByContext.R" -type fRepository: Vitek-Lab/MSstatsBioNet
Length of output: 98
🏁 Script executed:
# Read the specific file and lines to verify the current code
cat -n R/filterSubnetworkByContext.R | sed -n '100,120p'Repository: Vitek-Lab/MSstatsBioNet
Length of output: 1158
🏁 Script executed:
# Search for the entire function to understand context
cat -n R/filterSubnetworkByContext.R | head -150Repository: Vitek-Lab/MSstatsBioNet
Length of output: 7257
🏁 Script executed:
# Look for calls to this function to understand how nodes is passed
rg "filterSubnetworkByContext" --type r -A 3 -B 3Repository: Vitek-Lab/MSstatsBioNet
Length of output: 2814
🏁 Script executed:
# Search for getSubnetworkFromIndra to understand how it creates the nodes object
rg "getSubnetworkFromIndra" --type r -A 20Repository: Vitek-Lab/MSstatsBioNet
Length of output: 16819
🏁 Script executed:
# Find the getSubnetworkFromIndra function
grep -n "\.constructNodesDataFrame\|\..*nodes" R/getSubnetworkFromIndra.R | head -20Repository: Vitek-Lab/MSstatsBioNet
Length of output: 362
🏁 Script executed:
# Search for how nodes dataframe is built in the main function
cat -n R/getSubnetworkFromIndra.R | tail -150Repository: Vitek-Lab/MSstatsBioNet
Length of output: 5716
🏁 Script executed:
# Look for internal helper functions that construct the nodes dataframe
find . -name "*.R" -type f -exec grep -l "constructNodesDataFrame\|nodes.*data\.frame" {} \;Repository: Vitek-Lab/MSstatsBioNet
Length of output: 253
🏁 Script executed:
# Check utils file that was referenced
cat -n R/utils_getSubnetworkFromIndra.R | grep -A 50 "nodes"Repository: Vitek-Lab/MSstatsBioNet
Length of output: 6650
🏁 Script executed:
# Search for the actual nodes dataframe construction logic
rg "nodes\s*<-" R/ -A 5 -B 2Repository: Vitek-Lab/MSstatsBioNet
Length of output: 5185
Use nodes$id instead of nodes[[1]] and validate the column exists.
The function is exported and can be called with nodes dataframes from external sources. If callers reorder columns before invoking this function, nodes[[1]] silently becomes incorrect. While getSubnetworkFromIndra() materialises an id column (line 346 of utils_getSubnetworkFromIndra.R), this function should not rely on column order. Add validation to fail fast when the column is missing, and use explicit column reference for consistency with the rest of the codebase (which uses nodes$id elsewhere).
Proposed fix
# Keep nodes present in surviving edges
surviving_nodes <- union(edges_filtered$source, edges_filtered$target)
- nodes_filtered <- nodes[nodes[[1]] %in% surviving_nodes, ] # assumes first col is node ID
+ if (!"id" %in% names(nodes)) {
+ stop("`nodes` must contain an `id` column.")
+ }
+ nodes_filtered <- nodes[nodes$id %in% surviving_nodes, ]📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # Keep nodes present in surviving edges | |
| surviving_nodes <- union(edges_filtered$source, edges_filtered$target) | |
| nodes_filtered <- nodes[nodes[[1]] %in% surviving_nodes, ] # assumes first col is node ID | |
| # Keep nodes present in surviving edges | |
| surviving_nodes <- union(edges_filtered$source, edges_filtered$target) | |
| if (!"id" %in% names(nodes)) { | |
| stop("`nodes` must contain an `id` column.") | |
| } | |
| nodes_filtered <- nodes[nodes$id %in% surviving_nodes, ] |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@R/filterSubnetworkByContext.R` around lines 112 - 114, Replace the positional
column access nodes[[1]] with an explicit nodes$id reference in the
nodes_filtered assignment, and add a pre-check that the nodes data.frame
contains an "id" column (e.g., stop with a clear error if !"id" %in%
colnames(nodes)); update the nodes_filtered creation that currently uses
surviving_nodes and edges_filtered to filter by nodes$id to avoid silent
breakage when columns are reordered; this keeps behavior consistent with other
functions like getSubnetworkFromIndra() and fails fast when the required column
is missing.
| abstract_node <- xml_find_first(doc, ".//AbstractText") | ||
|
|
||
| if (!is.na(abstract_node)) { | ||
| results[[pmid]] <- xml_text(abstract_node) |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# First, let's find and examine the file
fd filterSubnetworkByContext.RRepository: Vitek-Lab/MSstatsBioNet
Length of output: 129
🏁 Script executed:
# Read the file to see the context around lines 217-220
if [ -f "R/filterSubnetworkByContext.R" ]; then
wc -l R/filterSubnetworkByContext.R
fiRepository: Vitek-Lab/MSstatsBioNet
Length of output: 100
🏁 Script executed:
# Get the context around lines 217-220
if [ -f "R/filterSubnetworkByContext.R" ]; then
sed -n '200,235p' R/filterSubnetworkByContext.R
fiRepository: Vitek-Lab/MSstatsBioNet
Length of output: 1315
🏁 Script executed:
# Search for other uses of AbstractText in the codebase
rg "AbstractText" -nRepository: Vitek-Lab/MSstatsBioNet
Length of output: 168
🏁 Script executed:
# Check if xml_find_first is used elsewhere for abstracts
rg "xml_find_first" -n -A 2 -B 2Repository: Vitek-Lab/MSstatsBioNet
Length of output: 997
🌐 Web query:
PubMed XML structured abstracts multiple AbstractText sections
💡 Result:
In PubMed/MEDLINE XML, a structured abstract is represented as multiple <AbstractText> elements inside a single <Abstract> (and likewise inside <OtherAbstract> for additional-language abstracts). Each <AbstractText> corresponds to one section (e.g., OBJECTIVE, METHODS, RESULTS) and should be read/processed in document order. [1]
Typical patterns you’ll see:
- Publisher-supplied PubMed XML (data provider format): sections are encoded with the
Labelattribute:<Abstract><AbstractText Label="OBJECTIVE">…</AbstractText><AbstractText Label="METHODS">…</AbstractText>…</Abstract>[1]
- MEDLINE/PubMed distributed/efetch-style records: sections may also include
NlmCategory(a normalized category such as BACKGROUND/OBJECTIVE/METHODS/RESULTS/CONCLUSIONS; plus UNASSIGNED for unmapped labels). This is what lets you reliably pick, say, only the RESULTS section by filteringAbstractText@NlmCategory="RESULTS". [2][3]
So if you see multiple <AbstractText> nodes, that’s expected: treat them as the abstract’s section blocks (optionally keyed by @Label and/or @NlmCategory), and concatenate or selectively extract as needed. [1][3]
Sources: [1] PubMed Data Provider XML Help (NCBI Bookshelf) • [2] NLM Technical Bulletin on structured abstracts & NlmCategory (incl. UNASSIGNED) • [3] NLM EDirect sample showing filtering on AbstractText@NlmCategory
🌐 Web query:
PubMed efetch XML format AbstractText elements MEDLINE
💡 Result:
In PubMed EFetch XML (db=pubmed&retmode=xml), the abstract text is in one or more <AbstractText> elements under the MEDLINE citation:
- Path (typical):
PubmedArticleSet/PubmedArticle/MedlineCitation/Article/Abstract/AbstractText[3], [4] - Unstructured abstract: one
<AbstractText>containing the full abstract [3] - Structured abstract: multiple
<AbstractText>sections, each optionally carrying:Label(the section heading text as printed, e.g., “METHODS”)NlmCategory(controlled values likeBACKGROUND|OBJECTIVE|METHODS|RESULTS|CONCLUSIONS|UNASSIGNED) [3], [5]
Also note:
- Abstract-like text can appear in
<OtherAbstract>(and that element has had aLanguageattribute added) [5], [4] - Whether a record is indexed for MEDLINE is indicated by
MedlineCitation@Status(e.g.,Status="MEDLINE") [4] - EFetch parameterization:
retmodecontrols format (XML vs text), and PubMed supports “PubMed XML” output viaretmode=xml; for PubMed E-utilities, XML is also the default whenretmodeis omitted in the updated API [1], [2]
🏁 Script executed:
# Check what xml2 functions are currently imported
grep -n "xml_find" R/filterSubnetworkByContext.RRepository: Vitek-Lab/MSstatsBioNet
Length of output: 195
🏁 Script executed:
# Check the NAMESPACE file to see what's imported from xml2
grep "xml2" NAMESPACERepository: Vitek-Lab/MSstatsBioNet
Length of output: 150
🌐 Web query:
xml2 package R xml_find_all function documentation
💡 Result:
xml2::xml_find_all() documentation (reference page): “Find nodes that match an xpath expression.” [1]
Usage
xml_find_all(x, xpath, ns = xml_ns(x), ...)- Method for nodesets:
xml_find_all(x, xpath, ns = xml_ns(x), flatten = TRUE, ...)[1]
Key arguments
x: anxml_document,xml_node, orxml_nodesetxpath: an XPath 1.0 expression stringns: namespace prefix-to-URI mapping (often fromxml_ns(x)); default namespaces must be given an explicit prefix name [1]
Value / behavior
- Returns matching nodes as an
xml_nodeset; if no matches, returns an empty nodeset - When
xis a nodeset, it can return a nodeset or a list of nodesets;flattencontrols whether results are combined into one nodeset [1]
Related
xml_find_first()returns only the first match (or anxml_missingnode if none) [1]
Sources: [1]
🏁 Script executed:
# Verify that trimws and paste are base R functions
python3 << 'EOF'
# These are base R functions that don't need imports
# trimws - base R (since R 3.2)
# paste - base R
print("trimws and paste are base R functions (no imports needed)")
EOFRepository: Vitek-Lab/MSstatsBioNet
Length of output: 124
🏁 Script executed:
# Check what needs to be added to NAMESPACE and imports
echo "Current xml2 imports in NAMESPACE:"
grep "importFrom(xml2" NAMESPACE
echo ""
echo "Would need to add: importFrom(xml2,xml_find_all)"Repository: Vitek-Lab/MSstatsBioNet
Length of output: 235
🏁 Script executed:
# Check if there are any other usages of abstract fetching or XML parsing
rg "xml_find" -A 3 -B 3Repository: Vitek-Lab/MSstatsBioNet
Length of output: 1250
Concatenate all abstract sections instead of truncating to the first.
PubMed structured abstracts contain multiple <AbstractText> nodes—one for each section (OBJECTIVE, METHODS, RESULTS, CONCLUSIONS, etc.). Using xml_find_first() retrieves only the first section, causing relevance scoring to miss matches in other sections.
Proposed fix
- abstract_node <- xml_find_first(doc, ".//AbstractText")
-
- if (!is.na(abstract_node)) {
- results[[pmid]] <- xml_text(abstract_node)
+ abstract_nodes <- xml_find_all(doc, ".//AbstractText")
+
+ if (length(abstract_nodes) > 0) {
+ results[[pmid]] <- paste(trimws(xml_text(abstract_nodes)), collapse = " ")
}Also update the @importFrom and NAMESPACE to include xml_find_all from the xml2 package.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@R/filterSubnetworkByContext.R` around lines 217 - 220, Replace the
single-section extraction using xml_find_first with a concatenation of all
<AbstractText> nodes: use xml_find_all(doc, ".//AbstractText") to retrieve every
section, combine their xml_text() values (e.g., collapse with a space) and
assign the combined string to results[[pmid]] instead of the single
abstract_node; additionally update the package metadata to import xml_find_all
by adding xml_find_all to the `@importFrom` xml2 line and exporting it in the
NAMESPACE so the function is available.
Motivation and Context
This PR introduces a new feature to filter protein interaction subnetworks by contextual relevance of supporting literature. The feature addresses the common problem of subnetworks containing many edges supported by literature from diverse biological contexts. It leverages TF-IDF cosine similarity to score PubMed abstracts against a user-provided text query, allowing researchers to focus on interactions relevant to specific research questions (e.g., "DNA damage repair cancer oncology"). The solution integrates with the existing INDRA database integration to fetch evidence text and abstracts, then filters the network based on similarity cutoffs.
Changes
DESCRIPTION: Extended the
Importssection to includetext2vec,stopwords,xml2, andrentrezpackages (lines +5/-1)NAMESPACE:
filterSubnetworkByContextfunctionimportFromdeclarations for:httr:content_type_jsonrentrez:entrez_fetchstopwords:stopwordstext2vec:TfIdf,create_dtm,create_vocabulary,fit_transform,itoken,prune_vocabulary,vocab_vectorizer,word_tokenizerxml2:read_xml,xml_find_first,xml_textR/filterSubnetworkByContext.R (new file, 266 lines):
filterSubnetworkByContext(nodes, edges, similarity_cutoff = 0.10, query = "DNA damage repair cancer oncology")that orchestrates the filtering workflow:.extract_evidence_text(df): Queries INDRA API for evidence text associated with each statement hash, constructs dataframe with source, target, interaction, site, evidenceLink, stmt_hash, text, and pmid columns.fetch_clean_abstracts_xml(pmids): Fetches PubMed abstracts viarentrezwith XML parsing, includes rate limiting (0.34s delay per NCBI guidelines) and progress tracking.query_indra_evidence(stmt_hash): Queries INDRA API endpoint to retrieve evidence objects for a given statement hashman/filterSubnetworkByContext.Rd (new file, 37 lines): Roxygen documentation for the public function including parameter descriptions, return value structure, and usage details
vignettes/Filter-By-Context.Rmd (new file, 264 lines): Comprehensive R Markdown vignette demonstrating the end-to-end workflow for filtering a subnetwork by literature context, including:
annotateProteinInfoFromIndra,getSubnetworkFromIndra)R/utils_getSubnetworkFromIndra.R: Added 2 trailing blank lines (minor formatting change)
Testing
No unit tests were added or modified to verify the new
filterSubnetworkByContextfunction. The existing test suite in./tests/testthat/does not include any tests for this new functionality.Coding Guidelines
The PR template requires running
styler::style_pkg(transformers = styler::tidyverse_style(indent_by = 4))before requesting a review to ensure code style compliance with the project's tidyverse conventions (indentation of 4 spaces). There is no indication in the PR that this step was completed.