Skip to content

Coding-agent fixes to get RcisTarget passing Bioc build/check/test#44

Open
lwaldron wants to merge 12 commits into
aertslab:masterfrom
bioc-package-rescue:master
Open

Coding-agent fixes to get RcisTarget passing Bioc build/check/test#44
lwaldron wants to merge 12 commits into
aertslab:masterfrom
bioc-package-rescue:master

Conversation

@lwaldron

Copy link
Copy Markdown

Hi Stein, I'm part of the Bioconductor leadership (VP of the technical advisory board) and am developing a "rescue" system for Bioconductor packages at https://github.com/bioc-package-rescue. This is the first package I have tested it on, since 1) it's slated for deprecation, and 2) it has a lot of downloads. This PR fixes all ERRORs and some easier WARNINGs; see https://github.com/bioc-package-rescue/RcisTarget/actions/runs/29108369941. Please take a look, and if it looks OK, merge, push upstream to the devel and cherry-pick to RELEASE_3_23, and email Lori Shepherd <lori.shepherd@roswellpark.org > to request de-deprecation. Let me know if you have any questions, whether you do want to keep RcisTarget alive, and whether this is helpful. Thanks, -Levi


Pull Request: Modernize Package Metadata and Fix iGraph Coercion Issues

Summary

This pull request resolves critical check failures, warnings, and styling issues in RcisTarget to restore compatibility with the latest Bioconductor check pipelines.


Changes

1. Fix igraph Coercion and Incidence Errors

  • Updated Deprecated API: Replaced the deprecated graph.incidence() call with graph_from_incidence_matrix() to restore compatibility with newer versions of the igraph package.
  • Added Matrix Coercion: Coerced subsets of data.table and data.frame objects to a numeric matrix via as.matrix() before passing them to the network generation function.
  • Robust Column Selection: Dynamically resolved the "rankAtMax" column position index via match() with an safety check to prevent indexing failures.

2. Modernize Package Metadata

  • Transitioned to Authors@R: Removed the deprecated Author and Maintainer fields from DESCRIPTION and fully migrated them to the modern Authors@R structure with proper role designations (e.g., [cre]).

3. Guard Suggested Database Example Dependencies

  • Added requireNamespace Checks: Guarded examples that depend on the suggested rankings database RcisTarget.hg19.motifDBs.cisbpOnly.500bp with if (requireNamespace(..., quietly = TRUE)) blocks. This avoids hard errors in testing and user environments where suggested datasets might not be pre-installed.

4. Code Style & Quality Cleanup

  • Logical Shorthand Conversion: Replaced deprecated logical shorthand usage (e.g. T and F, with=F) with explicit TRUE and FALSE values across multiple R source files to satisfy BiocCheck style guidelines.

Verification

  • Checked packages locally on bioconductor/bioconductor_docker:devel container image.
  • Verified that the package successfully completes R CMD check and BiocCheck with zero errors.

Antigravity and others added 10 commits July 10, 2026 14:57
- Coerce subselected data frame to a matrix
- Skip the rankAtMax metadata column in the incidence matrix
- Use graph_from_biadjacency_matrix instead of deprecated graph.incidence

Co-authored-by: Antigravity <gemini@google.com>
- Use match() and explicit NA check instead of which() for robustness
- Use graph_from_incidence_matrix() instead of graph_from_biadjacency_matrix()

Co-authored-by: Antigravity <gemini@google.com>
Fix example graph.incidence coercion failure
- Use Authors@R instead of deprecated Author/Maintainer fields in DESCRIPTION
- Replace single-letter logical variables T/F with TRUE/FALSE

Co-authored-by: Antigravity <gemini@google.com>
Co-authored-by: Antigravity <gemini@google.com>
Co-authored-by: Antigravity <gemini@google.com>
Co-authored-by: Antigravity <gemini@google.com>
Copilot AI review requested due to automatic review settings July 10, 2026 17:15

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 updates RcisTarget to pass current Bioconductor build/check by modernizing package metadata, tightening R style compliance, and making documentation/examples more robust against missing suggested resources.

Changes:

  • Modernizes DESCRIPTION by migrating Author/Maintainer to Authors@R.
  • Updates examples/docs to avoid hard failures when the suggested rankings DB package is not installed, and updates deprecated igraph example usage.
  • Replaces shorthand logical constants / data.table arguments (T/F, with=F) with explicit TRUE/FALSE, plus adds a Bioconductor check GitHub Actions workflow.

Reviewed changes

Copilot reviewed 9 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
R/priv_calcErn.R Replaces na.rm=T with na.rm=TRUE in ranking matrix initialization.
R/aux_getDbRegionsLoc.R Replaces \dontrun{} example with a runnable arrow/feather-based example.
R/aux_convertToTargetRegions.R Replaces \dontrun{} example with a runnable GRanges example.
R/aux_addLogo.R Replaces invert = T and with=F with TRUE/FALSE.
R/02_addMotifAnnotation.R Replaces with=F with with=FALSE in a data.table subset.
man/getDbRegionsLoc.Rd Mirrors the new runnable arrow/feather example in Rd.
man/convertToTargetRegions.Rd Mirrors the new runnable GRanges example in Rd.
man/calcAUC.Rd Guards workflow example behind requireNamespace() for suggested rankings DB package.
man/addSignificantGenes.Rd Updates incidence-matrix example column selection and replaces deprecated igraph example call.
inst/examples/example_workflow.R Guards workflow script behind requireNamespace() for suggested rankings DB package.
inst/examples/example_addSignificantGenes.R Updates igraph incidence plotting example.
DESCRIPTION Migrates to Authors@R.
.github/workflows/check-bioc.yml Adds Bioconductor-flavored R CMD check workflow via reusable workflow.
Files not reviewed (4)
  • man/addSignificantGenes.Rd: Generated file
  • man/calcAUC.Rd: Generated file
  • man/convertToTargetRegions.Rd: Generated file
  • man/getDbRegionsLoc.Rd: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread man/addSignificantGenes.Rd
Comment thread inst/examples/example_addSignificantGenes.R
Comment thread .github/workflows/check-bioc.yml
lwaldron and others added 2 commits July 10, 2026 19:25
Co-authored-by: Antigravity <gemini@google.com>
Co-authored-by: Antigravity <gemini@google.com>
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