# Simultaneously get data from multiple applied gates in flowCore

Using the Bioconductor flowCore package, I'm applying two parallel and non-overlapping gates to a gatingSet directly under "root":

library(flowCore)

# Import data
file.name <-system.file("extdata","0877408774.B08",package="flowCore")

# Create flowSet
fs <-as(list(x,x), "flowSet")

# Gate
library(flowWorkspace)
gs <- GatingSet(fs)

gate1 <- rectangleGate(filterId = "Gate1", list("FSC-H" = c(300,600), "SSC-H" = c(50,300)))

gate2 <- rectangleGate(filterId = "Gate2", list("FSC-H" = c(700,800), "SSC-H" = c(500,600)))

recompute(gs)

gs_get_pop_paths(gs)
# [1] "root" "/Gate1" "/Gate2"

# Plot
library(ggcyto)
autoplot(gs, gs_get_leaf_nodes(gs))

# Extract gated data
gs_pop_get_data(gs, "Gate1") # Works
gs_pop_get_data(gs, "Gate2") # Works
gs_pop_get_data(gs, c("Gate1", "Gate2")) # Does not work
gs_pop_get_data(gs, "Gate1", "Gate2") # Does not work


I want to get the data from the union of gates 1 and 2 but I can't figure out how. The flowCore documentation touches on this topic, but the examples shown are for filters, and I haven't figured out how to get it to work with gates.

If there is a more straightforward way of doing this using another package that would also be of interest, as long as it is compatible with flowSet/flowCore objects.