I'm trying to process a whole heap of flow data files (obviously), and I've set up gating strategies. My problem is that due to the nature of my research, in some files, a gated population will be empty, and this causes errors when I try to create a density plot (plots that population for each file until it reaches an empty population, then stops). It's inefficient for me to identify and remove the files, and there are other populations of interest aside from the population that is empty.
How can I remove or skip empty populations, so that I don't have to go back each time and find/delete the FCS files?
fn <-list.files(pattern=".fcs") fs <- read.flowSet(fn,alter.names=TRUE) qg1 <- quadrantGate(fs,stains=c("CD19","CD3")) fsqg1 <- split(fs,qg1) bc <- fsqg1$`CD19+CD3-` dpl <- densityplot(IndividualID~`FITC.A`,bc)