Fixes for ggplot2 version 4 and ggcyto breaking changes#12
Merged
Conversation
…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.
…v3 next to see if back-compatible or not.
…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.
…hin a GatingSet in one go if so desired
…d, updates Radio Button to select spanGate
… 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
approved these changes
Jul 2, 2026
NKInstinct
left a comment
Owner
There was a problem hiding this comment.
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!
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.
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