-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ODC-184 support split and duplicated dims in gs_add_gating_method(). #262
base: devel
Are you sure you want to change the base?
Conversation
@@ -77,6 +77,9 @@ gs_add_gating_method <- function(gs, alias = "*" | |||
preprocessing_args <- .argDeparser(preprocessing_args) | |||
} | |||
|
|||
# format split dims & drop duplicated dims | |||
dims <- paste(unique(dims), collapse = ",") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it OK if dims is more than 2-D?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
openCyto only supports 1D or 2D gating, but yes it will work with more than two dims.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
openCyto/R/csvTemplate-parser.R
Lines 291 to 296 in 323430e
dim_count <- length(strsplit(split = ",", dims)[[1]]) | |
if (!dim_count %in% c(1, 2)) { | |
if (!(dim_count == 0 && gm %in% c("polyFunctions", "boolGate", "refGate"))) { | |
stop(popName, " has invalid number of dimensions: ", dim_count) | |
} | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would love for us to support multiple dims (CytoExploreR uses a hacky way to get around this) but the issue is that the gating functions within openCyto don't perform a dims check so we'd need to update all of them to ensure that appropriate dimensions are supplied for each of the supported gating functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could possibly check the dims against the list of supported gating methods but that will have to be updated every time we add a new gating method.
@amcdavid adding PR here to implement features or fixes required by CytoExploreR please see https://ozette.atlassian.net/jira/software/c/projects/ODC/issues/ODC-184
This PR just makes it easier for users to interact with the
gs_add_gating_method()
API which currently expectsdims
to be supplied in a concatenated comma-separated string (i.e. "FSC-A,SSC-A") rather than the conventionalc("FSC-A", "SSC-A")
- both inputs will be supported after this change.