Skip to content

New fun compare cel pop#80

Merged
phoman14 merged 50 commits intoDEVfrom
NewFun_CompareCelPop
Mar 18, 2026
Merged

New fun compare cel pop#80
phoman14 merged 50 commits intoDEVfrom
NewFun_CompareCelPop

Conversation

@phoman14
Copy link
Member

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()

phoman14 and others added 24 commits February 17, 2026 14:08
…t work so run devtools::check(vignettes = FALSE)
… did not work so run devtools::check(vignettes = FALSE)
Copy link

Copilot AI left a comment

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 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 slotlayer, 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_test is used as if it were a ggplot (passed to .drawViolin() and checked for ggplot class), but violinPlot() currently returns a list (list(plots=...)). Update the tests to use violin_test$plots (and adjust the class assertion accordingly), or revert violinPlot() to return a ggplot.
    docs/pkgdown.yml:7
  • docs/pkgdown.yml declares an Intro: Intro.html article, but docs/articles/Intro.html is 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.

Copy link
Member Author

@phoman14 phoman14 left a comment

Choose a reason for hiding this comment

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

Changes look correct. The correct files were modified. unit tests were created and Vignette files appropriately updated

Copy link

Copilot AI commented Mar 18, 2026

@phoman14 I've opened a new pull request, #81, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits March 18, 2026 01:02
Co-authored-by: phoman14 <21298645+phoman14@users.noreply.github.com>
Copy link

Copilot AI commented Mar 18, 2026

@phoman14 I've opened a new pull request, #82, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 12 commits March 18, 2026 01:04
Co-authored-by: phoman14 <21298645+phoman14@users.noreply.github.com>
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>
Copy link

Copilot AI commented Mar 18, 2026

@phoman14 I've opened a new pull request, #83, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 6 commits March 18, 2026 01:39
….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>
@phoman14 phoman14 merged commit 098f36d into DEV Mar 18, 2026
6 of 7 checks passed
@phoman14 phoman14 deleted the NewFun_CompareCelPop branch March 19, 2026 19:27
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.

3 participants