Skip to content

Add documentation and examples for new functions; enhance existing fu… - #8

Merged
dosorio merged 1 commit into
mainfrom
dev
Aug 12, 2026
Merged

Add documentation and examples for new functions; enhance existing fu…#8
dosorio merged 1 commit into
mainfrom
dev

Conversation

@dosorio

@dosorio dosorio commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

…nction descriptions

  • Added author information to runSCORPION and testEdges functions.
  • Introduced maEdges function for meta-analysis of TF-target edges with documentation.
  • Implemented enrichEdges function for gene set enrichment analysis with detailed usage examples.
  • Created circosEdges function for visualizing differential network edges with comprehensive documentation.
  • Added internal helper functions for processing gene coordinates and parsing GMT files.
  • Updated README.md with new function descriptions and usage examples.
  • Added tests for circosEdges to ensure functionality with user-supplied coordinates and error handling.
  • Updated existing documentation to include new references and author information.

…nction descriptions

- Added author information to `runSCORPION` and `testEdges` functions.
- Introduced `maEdges` function for meta-analysis of TF-target edges with documentation.
- Implemented `enrichEdges` function for gene set enrichment analysis with detailed usage examples.
- Created `circosEdges` function for visualizing differential network edges with comprehensive documentation.
- Added internal helper functions for processing gene coordinates and parsing GMT files.
- Updated `README.md` with new function descriptions and usage examples.
- Added tests for `circosEdges` to ensure functionality with user-supplied coordinates and error handling.
- Updated existing documentation to include new references and author information.
Copilot AI lite review requested due to automatic review settings August 12, 2026 22:41
@dosorio
dosorio merged commit 51b150b into main Aug 12, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands SCORPION’s user-facing functionality and documentation by adding three new exported helpers (maEdges(), enrichEdges(), circosEdges()), updating package docs/README, and introducing test coverage for circosEdges().

Changes:

  • Added new exported functions for meta-analysis (maEdges), TF-wise gene set enrichment (enrichEdges), and Circos visualization (circosEdges) with roxygen docs and README examples.
  • Updated existing function documentation (runSCORPION, testEdges, regressEdges) with author/seealso references and refreshed dataset documentation (scorpionTest).
  • Added testthat coverage for circosEdges behavior (offline coords, GMT parsing, errors, chromosome ordering) and updated package exports/imports/suggested deps.

Reviewed changes

Copilot reviewed 10 out of 23 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/testthat/test_circos_edges.R Adds testthat coverage for circosEdges (offline coords, GMT parsing, error paths, .orderChr).
README.md Documents new functions and provides usage examples for maEdges, enrichEdges, and circosEdges.
R/testEdges.R Adds author and seealso references to connect new APIs in documentation.
R/runSCORPION.R Adds author and seealso references in documentation.
R/maEdges.R Introduces exported maEdges() meta-analysis implementation and roxygen docs.
R/enrichEdges.R Introduces exported enrichEdges() fgsea-based enrichment implementation and roxygen docs.
R/data-scorpionTest.R Updates dataset documentation to reflect the current scorpionTest contents/structure.
R/circosEdges.R Introduces exported circosEdges() visualization plus internal helpers (GMT parsing, coords fetch/validate, chromosome ordering, legends).
NAMESPACE Exports new functions and adds required imports for new code paths.
man/testEdges.Rd Regenerates docs to include author and seealso updates.
man/scorpionTest.Rd Regenerates docs to match updated dataset documentation.
man/runSCORPION.Rd Regenerates docs to include author and seealso updates.
man/regressEdges.Rd Regenerates docs to include author and seealso updates.
man/maEdges.Rd Adds generated documentation for maEdges().
man/enrichEdges.Rd Adds generated documentation for enrichEdges().
man/dot-validateGeneCoords.Rd Adds generated internal documentation for .validateGeneCoords().
man/dot-parseGMT.Rd Adds generated internal documentation for .parseGMT().
man/dot-orderChr.Rd Adds generated internal documentation for .orderChr().
man/dot-fetchGeneCoords.Rd Adds generated internal documentation for .fetchGeneCoords().
man/dot-drawCircosLegends.Rd Adds generated internal documentation for .drawCircosLegends().
man/circosEdges.Rd Adds generated documentation for circosEdges().
DESCRIPTION Updates package description typography and adds new suggested dependencies (circlize, biomaRt, fgsea).
Files not reviewed (12)
  • man/circosEdges.Rd: Generated file
  • man/dot-drawCircosLegends.Rd: Generated file
  • man/dot-fetchGeneCoords.Rd: Generated file
  • man/dot-orderChr.Rd: Generated file
  • man/dot-parseGMT.Rd: Generated file
  • man/dot-validateGeneCoords.Rd: Generated file
  • man/enrichEdges.Rd: Generated file
  • man/maEdges.Rd: Generated file
  • man/regressEdges.Rd: Generated file
  • man/runSCORPION.Rd: Generated file
  • man/scorpionTest.Rd: Generated file
  • man/testEdges.Rd: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread R/enrichEdges.R
Comment on lines +205 to +208
enrichment <- enrichment[
setdiff(colnames(enrichment), "leadingEdge"),
drop = FALSE
]
Comment thread R/circosEdges.R

# Per-gene degree: sum of log2FoldChange over outgoing (TF) and incoming
# (target) links, using every edge under pAdjThreshold (not just drawn links)
deg_col <- if ("log2FoldChange" %in% colnames(edges_sig)) "log2FoldChange" else colorBy
Comment thread R/maEdges.R
Comment on lines +65 to +72
maEdges <- function(edgesList,
method = c("random", "fixed"),
minStudies = 2L) {
method <- match.arg(method)

n_studies <- length(edgesList)

stopifnot(is.list(edgesList), n_studies >= 2L)
Comment thread R/enrichEdges.R
Comment on lines +70 to +81
enrichEdges <- function(edgesDF,
geneSets,
numericValue,
nCores = 3,
seed = 1) {
if (!requireNamespace("fgsea", quietly = TRUE)) {
stop(
"Package 'fgsea' (Bioconductor) is required for enrichEdges(). ",
"Install it with BiocManager::install('fgsea').",
call. = FALSE
)
}
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.

2 participants