Closed northNomad closed 4 years ago
@northNomad, this is quite complex to implement in cyto_plot()
directly so it is unlikely that this will be supported any time soon.
You can however, accomplish this with a little bit of coding. For example, you could split your GatingSet into groups based on your experiment variables and then make a call to cyto_plot()
for each group and each parent:
# Split gs into groups
gs_groups <- cyto_group_by(gs, "name") # list of GatingSets
# parents
parents <- c("CD4 T Cells", "CD8 T Cells")
# Prepare plotting space
cyto_plot_custom(c(length(parents), length(gs_groups))) # parents by groups - c(nrow, ncol)
# Loop through groups and parents
lapply(names(gs_groups), function(group) {
lapply(parents, function(parent) {
cyto_plot(gs_groups[[group]], # GatingSet
parent = parent,
alias = "CD69+",
channels = c("CD44", "CD69"),
group_by = "all", # merge samples in group
title = paste0(group, "\n", parent))
}
}
# Signal plot is complete
cyto_plot_complete(c(1,1)) # reset grid dimensions to 1 x 1
Hope this helps!
Currently
cyto_plot
argumentparent
only takes one input.I have yet to find a way to compare
markerB
expression inmarker_A-HIGH
vsmarker_A-LOW
cells in onecyto_plot
call. Ie)cyto_plot
cannot take two parents argumentA-HIGH
vsA-LOW
What do you think about making it so that users can allow
cyto_plot
to take multipleparent