Conversation
…nity/SCWorkflow into NewFun_CompareCelPop
….Rmd to work with devtoools::check()
…t work so run devtools::check(vignettes = FALSE)
… did not work so run devtools::check(vignettes = FALSE)
…nity/SCWorkflow into NewFun_CompareCelPop
There was a problem hiding this comment.
Pull request overview
This PR adds a new compareCellPopulations() visualization utility to SCWorkflow (with documentation and tests), updates vignettes/pkgdown site outputs, and renames/updates the violin plotting API used in docs and tests.
Changes:
- Add
compareCellPopulations()(R implementation + Rd) and a new snapshot-based test suite with helpers. - Rename
violinPlot_mod()→violinPlot()and update vignette/test call sites. - Update vignettes and committed pkgdown site artifacts (docs/) to surface new functions and workflow content.
Reviewed changes
Copilot reviewed 41 out of 46 changed files in this pull request and generated 24 comments.
Show a summary per file
| File | Description |
|---|---|
| vignettes/SCWorkflow-Visualizations.Rmd | Update violin plot call + add Compare Cell Populations vignette section |
| vignettes/SCWorkflow-Usage.Rmd | Fix vignette index entry |
| vignettes/SCWorkflow-QC.Rmd | Fix vignette index entry |
| vignettes/SCWorkflow-DEG.Rmd | Add magrittr import in vignette |
| vignettes/SCWorkflow-Annotations.Rmd | Add magrittr import in vignette |
| vignettes/README.Rmd | Convert README vignette metadata to html_vignette (“Intro”) |
| tests/testthat/test-Violin_Plots_by_Metadata.R | Switch tests to call violinPlot() |
| tests/testthat/test-Compare_Cell_Populations.R | Add new compareCellPopulations test coverage + snapshots |
| tests/testthat/helper-Compare_Cell_Populations.R | Add test parameter builder + snapshot helpers |
| man/violinPlot.Rd | Rename Rd topic to violinPlot and update args (layer) |
| man/modscore-imports.Rd | Add internal imports topic for ModuleScore helpers |
| man/modscore-imports-011726.Rd | Add internal imports topic for ModuleScore helpers (dated variant) |
| man/modScore.Rd | Document new group_var argument |
| man/launch_module_score_app.Rd | Add Rd for launching ModuleScore Shiny app |
| man/compareCellPopulations.Rd | Add Rd for compareCellPopulations |
| inst/extdata/NIDAPjson/Compare_Cell_Populations.code-template.json | Add NIDAP JSON template source for CCP |
| docs/sitemap.xml | Update sitemap entries for new pages |
| docs/reference/violinPlot_mod.html | Update legacy violinPlot_mod reference HTML (still present) |
| docs/reference/object.html | Add examples section in reference HTML |
| docs/reference/modScore.html | Update usage/examples for group_var |
| docs/reference/index.html | Add new function links in reference index |
| docs/reference/colorByMarkerTable.html | Update args/examples in reference HTML |
| docs/pkgdown.yml | Update pkgdown site config (articles list, timestamps) |
| docs/index.html | Add “Key Functions” section + license link changes |
| docs/authors.html | Update citation year |
| docs/articles/index.html | Update article index links (Intro) |
| docs/articles/SCWorkflow-Visualizations.html | Rendered vignette includes CCP section + updated violin plot call |
| docs/articles/SCWorkflow-Overview.html | Remove old overview article (HTML deleted) |
| docs/articles/SCWorkflow-DEG.html | Update rendered vignette links (aggregateCounts) |
| docs/LICENSE-text.html | Update rendered license text output |
| docs/CHANGELOG.html | Update rendered changelog with v1.0.3 notes |
| README.md | Add “Key Functions” section |
| R/Violin_Plots_by_Metadata.R | Rename function to violinPlot, switch slot→layer, change return value |
| R/ModuleScoreHelpers_011726.R | Add roxygen import topic + importFrom fixes |
| R/ModuleScoreHelpers.R | Add roxygen import topic + importFrom fixes |
| R/Compare_Cell_Populations.R | Add new compareCellPopulations implementation |
| NAMESPACE | Export new functions and rename violin export |
| DESCRIPTION | Add dependencies for new functionality |
| CHANGELOG.md | Add v1.0.3 notes |
| .gitignore | Ignore doc/ and Meta/ |
| .Rbuildignore | Ignore doc and Meta |
Comments suppressed due to low confidence (2)
tests/testthat/test-Violin_Plots_by_Metadata.R:13
violin_testis used as if it were a ggplot (passed to.drawViolin()and checked forggplotclass), butviolinPlot()currently returns a list (list(plots=...)). Update the tests to useviolin_test$plots(and adjust the class assertion accordingly), or revertviolinPlot()to return a ggplot.
docs/pkgdown.yml:7docs/pkgdown.ymldeclares anIntro: Intro.htmlarticle, butdocs/articles/Intro.htmlis not present in this PR. This will break the pkgdown site navigation; either regenerate pkgdown so the article is emitted, or remove/rename the entry to match the committed HTML output.
articles:
CONTRIBUTING: CONTRIBUTING.html
README: README.html
SCWorkflow-Annotations: SCWorkflow-Annotations.html
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
phoman14
commented
Mar 18, 2026
Member
Author
phoman14
left a comment
There was a problem hiding this comment.
Changes look correct. The correct files were modified. unit tests were created and Vignette files appropriately updated
Co-authored-by: phoman14 <21298645+phoman14@users.noreply.github.com>
Co-authored-by: phoman14 <21298645+phoman14@users.noreply.github.com>
… supported dataset keys.
Add explicit else-stop to getParamCCP for unknown dataset names
Add default error branch to `getParamCCP()` for unknown dataset keys
removing unused references Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
removed violinPlot_mod references Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
….Rmd Co-authored-by: phoman14 <21298645+phoman14@users.noreply.github.com>
…-one Fix trailing comma in knitr chunk header
Metadata column validation happens before the code normalizes column names (replacing . with _ at line 158). If a caller passes annotation.column/group.column using underscores while the Seurat metadata still has dots, this will error even though the function later renames the columns. Consider normalizing object@meta.data colnames and the *.column arguments before computing missing.cols. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
remove violinPlot_mod Reference Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
createAnnoTable() builds cntTble by cbind()-ing unique(AnnoCol) with table(...). Because the initial matrix has numeric rownames (1..n) and table() may not return values in the same order (and can omit missing levels), this can silently misalign counts with clusters and produce an incorrect output table. Consider constructing counts with table(SO@meta.data[[AnnoCol]], SO@meta.data[[GroupCol]]) (or xtabs) so row/column names stay aligned, then compute frequencies from that matrix. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Created compareCellPopulations function from /inst/extdata/NIDAPjson/Compare_Cell_Populations.code-template.json
1)Added Roxygen documentation
2)created unit tests and Helper funcitions
3)Updated Vignette vignettes/SCWorkflow-Visualizations.Rmd
4)passed tests on for R 4.1.3 ON RStudio Workbench
1) restart R
2) .libPaths(c("/home/homanpj/R/x86_64-pc-linux-gnu-library/4.1",
"/opt/R/4.1.3/lib64/R/library",
"/rstudio-files/ccbr-data/renv_cache/single-cell-rna-seq-r4/Snapshot-environment_method/renv/library/R-4.1/x86_64-pc-linux-gnu"))
3)library(spatstat.core)
4)library(Seurat)
5)load_all()