Skip to content

Fixes for ggplot2 version 4 and ggcyto breaking changes#12

Merged
NKInstinct merged 16 commits into
NKInstinct:masterfrom
DavidRach:master
Jul 2, 2026
Merged

Fixes for ggplot2 version 4 and ggcyto breaking changes#12
NKInstinct merged 16 commits into
NKInstinct:masterfrom
DavidRach:master

Conversation

@DavidRach

Copy link
Copy Markdown
Contributor

Hi Andrew,

Here are my changes to flowGate (GitHub version 0.99.2-3) restoring Shiny app functionality following the ggplot2 version 4 changes to S7, and subsequent ggcyto changes. This modified version has been working well for both myself and the Cytometry in R course participants since February.

In addition to these fixes, where appropriate, I switched from @ import tags to @importFrom tags in the roxygen, and updated the namespace accordingly. Several additional unit tests were also added (more than happy to provide additional ones for the remaining functions)

Also, added a gs_apply_gate_check() function, which when provided a gate, will iterate through the GatingSet, allowing you to edit the gates on a per individual specimen basis, without needing to redraw the gate across the board. Also have a gs_to_openCyto function which allows flowGate drawn gates to be translated to an openCyto template for future reuse.

Checked last night what the differences between the original GitHub repo version was tvs. the current Bioconductor branch version (1.13.0), and incorporated the couple differences I found, with exception of the preparePlots.R file, which on the Bioconductor branch was broken up into helper functions (I still need to check these vs. the ggcyto changes individually).

Let me know if any changes are needed, and more than happy to edit the pull request.

Best Wishes-
David

…n favor of @importFrom and still have everything work. Will pull request any useful changes (and some additional unit test). Best- David. Change Log: Bunch importFroms; a landing page for ?flowGate, some updates Description, the GitHub branch is behind the Bioconductor, not sure if anything different, or just the rolling release updating the version, some minor roxygen for internals. Passing all CRAN and Bioc Checks with just notes
…on shiny launch. Creating unit test systematically as I go (as likely will need to refer some of this up to ggcyto as well).
… returns a ggplot2 object. Gates are still not recording correctly.
…rning a colname not found on recompute from flowWorkspace.
…broke as.ggplot. The second was a ggplot2 v4 change that resulted in no column names getting pulled from data of the ggplot. With those two elements fixed, gate gets added correctly to the GatingSet.
…h a specific gate allowing adjustments. Currently, the existing gate is not shown, so everything ends up being redrawn, so need to modify that
…e is clicked directly exit out without any adjustments being conducted. Seems to be recalculating correctly, as the downstream plots are showing the appearance of singlets subsequently, and when viewing gate coordinates the vertices are specimen specific. So one object off the list, wooh! Updating to 0.99.3 for internal tracking.
…tten out as a polygon (and registering the new method via openCyto). Will see whether works for other gate types.
…eClose to break. Reason is they were ending up within gg$data, which threw off the fix instituted following ggcyto break in the spring. Ended up using tail argument to identify the last one or two last items according to gate type. Appears working for both initial and regating attempts so far, need to verify different metadata or fluor names still work, and not just alphabetical in nature.
… both GitHub and Bioconductor brances to being equivalent (except for preparePlot, which still double checking with unit tests for the Bioconductor version vs the ggcyto changes).

@NKInstinct NKInstinct left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Looks good, and thanks for the fixes with ggplot2's changes. I also like what you did with gs_apply_gate_check; very in line with the ethos of this package and clearly useful to the cytometry community. Thanks!

@NKInstinct NKInstinct merged commit 2cd5cf6 into NKInstinct:master Jul 2, 2026
1 check failed
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