Hello, I am trying to code in a gating strategy in flowCore and I cannot figure out why my last gates are not showing up. I have followed the flowcore guide to a T, and yet my displayed plots/gates are not applying to the transformed fluorescent channels. Has anyone seen this before?
Here is my workflow from start to finish.
`require(flowAI) require(flowCore) require(ggcyto) require(flowStats) require(flowWorkspace) require(openCyto) require(flowViz)
Incorporation of FCS files
fcs.dir <- file.path("C:", "Users", "very.confused", "FCSfiles") frames <- lapply(dir(fcs.dir, full.names=TRUE), read.FCS, transformation=FALSE, emptyValue = FALSE, min.limit=0) fs <-as(frames, "flowSet")
Check FSC SSC plot
autoplot(fs[[1]], "FSC-H", "SSC-H")
Setting up for gating
fs <- as(fs, "flowSet") gs <- GatingSet(fs)
Data transformation
gh <- gs[[1]] fr <- ghpopget_data(gh) chnls <- markernames(gh) trans <- estimateLogicle(gh, chnls) gs <- transform(gs, trans)
HEK gating
gsgetpoppaths(gs) HEKgate <- rectangleGate("FSC-A"=c(80000, Inf),"SSC-A"=c(30000,Inf)) gspop_add(gs, HEKgate, parent = "root", name = "HEKgate") recompute(gs) autoplot(gs[[1]], "HEKgate")
Setting singlet gate
mat <-matrix(c(70000,70894,252144,252144,5037,61224,196501,155613), nrow = 4) colnames(mat) <-c("FSC-A", "FSC-H") singgate <- polygonGate(mat) gspopadd(gs, singgate, parent = "HEKgate", name = "singlet") recompute(gs,"HEKgate") autoplot(gs[[1]], "singlet")
Setting PE-A gate
rg2 <-rectangleGate("FL4-A"=c(2000, Inf)) gspopadd(gs, rg2, parent = "singlet", name = "PEGate") recompute(gs,"singlet") plot(gs)
autoplot(gs[[2]])
Setting APC gate
rg3 <-rectangleGate("FL7-A"=c(2000, Inf)) gspopadd(gs, rg3, parent = "singlet", name = "APCGate") recompute(gs,"PEGate")
autoplot(gs[[2]])`
Whenever I run the autoplot or the stats on either of the final two gates, I am not able to see any gate on the plot, or on the data itself. Does this have to do with the transformation performed? Or maybe how the data is incorporated into the flowset? Any help would be greatly appreciated.
Ah okay that solved it. So the gate after the transformation was set by a log scale value, not that value itself. Thank you!!