You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
autoplot.GatingSet has a few cases where failures result in very opaque errors. We should first assess whether these use cases should fail at all (or if we instead switch to reasonably expected behavior) and otherwise at least make the errors more helpful.
First example. When called on a GatingHierarchy or GatingSet with a specified subpopulation, the expected behavior is to plot the geometric representation of the gate overlaying the data of the parent (plotting the gate). But in the case of the root population, there is no parent and no gate determining it.
Error in .cpp_getGate(obj@pointer, sampleNames(obj), y) :
no gate associated with root node.
which is reasonably descriptive, but could be improved for clarity and could maybe drop the call information. However, we should consider whether the default behavior should be to plot the ungated data at the root node. That is, within the call do something like this:
autoplot(gh_pop_get_data(gs[[1]], "root"))
where the user could then specify channels for a particular 1-D or 2-D plot. This kind of changes the nature of what autoplot is expected to do for a GatingSet object, however. Currently, first getting the cytoframe or cytoset from the GatingSet in that mannerer is a required intermediate step, but we could also consider adding a flag for gate vs data to autoplot.GatingSet or even adding gateplot and dataplot methods.
This results in an error because of how the method attempts to access the subpopulations:
Error in which(boolInd) : argument to 'which' is not logical
In this case we should at the very least give a better error message. But again we could think about whether we should default to the behavior of plotting the ungated data.
In each of these cases, even if we don't want to change default plotting behavior, we could just have a message prompting the user to first get the appropriate cytoframe or cytoset object first.
The text was updated successfully, but these errors were encountered:
autoplot.GatingSet
has a few cases where failures result in very opaque errors. We should first assess whether these use cases should fail at all (or if we instead switch to reasonably expected behavior) and otherwise at least make the errors more helpful.GatingHierarchy
orGatingSet
with a specified subpopulation, the expected behavior is to plot the geometric representation of the gate overlaying the data of the parent (plotting the gate). But in the case of the root population, there is no parent and no gate determining it.This results in an error:
which is reasonably descriptive, but could be improved for clarity and could maybe drop the call information. However, we should consider whether the default behavior should be to plot the ungated data at the
root
node. That is, within the call do something like this:where the user could then specify channels for a particular 1-D or 2-D plot. This kind of changes the nature of what
autoplot
is expected to do for aGatingSet
object, however. Currently, first getting thecytoframe
orcytoset
from theGatingSet
in that mannerer is a required intermediate step, but we could also consider adding a flag forgate
vsdata
toautoplot.GatingSet
or even addinggateplot
anddataplot
methods.GatingSet
without gates:This results in an error because of how the method attempts to access the subpopulations:
In this case we should at the very least give a better error message. But again we could think about whether we should default to the behavior of plotting the ungated data.
In each of these cases, even if we don't want to change default plotting behavior, we could just have a message prompting the user to first get the appropriate
cytoframe
orcytoset
object first.The text was updated successfully, but these errors were encountered: