OpenCyto - getting the gates correct
0
1
Entering edit mode
@ulrik-stervbo-1723
Last seen 8.6 years ago
Germany

Hello Everyone,

I am trying to construct a GatingSet and apply it to a few samples. I have difficulties getting the gates to end where they should. In particular I often find the CD8+ gate being utterly wrong (see the attached bitmap). Is there any way I can modify things so the gates end up in a more correct place?

I would also like to gate on CD45, but so far the only thing I can get working is `mindensity` and I am not happy with the result. I have tried `flowClust.2d` but it dies on me (https://support.bioconductor.org/p/81247/). For the CD45 gate, For now I would like to eventually capture lymphocytes and monocytes in one gate, but later I would also like to look at the eosinophils/neutrophils as well as the basophils and rectangular gates are not aproppriate. Any suggestions on the gates I can use?

I would like to do it all data driven.

The data is from a Beckman Coulter Navios.

Thanks for any suggestions.

Best wishes,
Ulrik

library(openCyto)

gs <- GatingSet(panel.set.norm)

# Get singlets
thisData <- getData(gs)
singlet_gate <- fsApply(thisData, function(fr){
  print(keyword(fr)$`$FIL`)
  openCyto:::.singletGate(fr, channel = c("FS INT LIN", "FS PEAK LIN"))
})
add(gs, singlet_gate, parent = "root", name = "singlets")
recompute(gs)

# Get CD45pos
# Rm("cd45.pos", gs)
thisData <- getData(gs, "singlets")
cd45pos_gate <- fsApply(thisData, function(fr){
  openCyto::mindensity(fr, channel = c("FL10 INT LOG"))
  # openCyto::flowClust.2d(fr, xChannel = "FL10 INT LOG", yChannel = "SS INT LIN")
#   sqrcut <- matrix(c(4.5, 0, 4.5, 280, 5.3, 400, 5.6, 600, 7.4, 600, 7.4, 200, 6.5, 0), ncol = 2, byrow = TRUE)
#   colnames(sqrcut) <- c("FL10 INT LOG", "SS INT LIN")
  # polygonGate(boundaries = sqrcut)#"FL6 INT LOG"=c(0, 4), "FL7 INT LOG"=c(6, 9), filterId = "cd8.pos")
})
add(gs, cd45pos_gate, parent = "singlets", name = "cd45.pos")
recompute(gs)

# Get CD3pos
thisData <- getData(gs, "cd45.pos")
cd3pos_gate <- fsApply(thisData, function(fr){
  print(keyword(fr)$`$FIL`)
  openCyto::mindensity(fr, channel = c("FL8 INT LOG"))
})
add(gs, cd3pos_gate, parent = "cd45.pos", name = "cd3.pos")
recompute(gs)

# CD4 CD8
thisData <- getData(gs, "cd3.pos")
cd4cd8_gate <- fsApply(thisData, function(fr){
  print(keyword(fr)$`$FIL`)
  openCyto::quadGate.seq(fr, 
                         channel = c("FL6 INT LOG", "FL7 INT LOG"),
                         gFunc = "mindensity")
})
add(gs, cd4cd8_gate, parent = "cd3.pos", name = c("cd8+", "cd4+_cd8+", "cd4+", "cd4-_cd8-"))
recompute(gs)

> sessionInfo()
R version 3.2.5 (2016-04-14)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 15.10

locale:
 [1] LC_CTYPE=de_DE.UTF-8       LC_NUMERIC=C               LC_TIME=de_DE.UTF-8        LC_COLLATE=de_DE.UTF-8     LC_MONETARY=de_DE.UTF-8   
 [6] LC_MESSAGES=de_DE.UTF-8    LC_PAPER=de_DE.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] openCyto_1.8.4            flowWorkspace_3.16.15     gridExtra_2.2.1           ncdfFlow_2.16.1           BH_1.60.0-1               RcppArmadillo_0.6.600.4.0
[7] flowViz_1.34.1            lattice_0.20-33           flowCore_1.36.9          

loaded via a namespace (and not attached):
 [1] nlme_3.1-127          mcmc_0.9-4            matrixStats_0.50.1    pbkrtest_0.4-6        RColorBrewer_1.1-2    Rgraphviz_2.14.0      tools_3.2.5          
 [8] R6_2.1.2              KernSmooth_2.23-15    DBI_0.3.1             BiocGenerics_0.16.1   mgcv_1.8-12           colorspace_1.2-6      nnet_7.3-12          
[15] sp_1.2-2              GGally_1.0.1          chron_2.3-47          sgeostat_1.0-27       graph_1.48.0          quantreg_5.21         Biobase_2.30.0       
[22] flowClust_3.8.0       SparseM_1.7           sROC_0.1-2            flowStats_3.28.1      scales_0.4.0          lmtest_0.9-34         DEoptimR_1.0-4       
[29] hexbin_1.27.1         mvtnorm_1.0-5         robustbase_0.92-5     RBGL_1.46.0           stringr_1.0.0         multicool_0.1-9       minqa_1.2.4          
[36] R.utils_2.2.0         MCMCpack_1.3-5        rrcov_1.3-11          lme4_1.1-11           zoo_1.7-12            jsonlite_0.9.19       gtools_3.5.0         
[43] dplyr_0.4.3           car_2.1-2             R.oo_1.20.0           magrittr_1.5          Matrix_1.2-5          Rcpp_0.12.4           munsell_0.4.3        
[50] R.methodsS3_1.7.1     yaml_2.1.13           stringi_1.0-1         cvTools_0.3.2         MASS_7.3-45           zlibbioc_1.16.0       plyr_1.8.3           
[57] grid_3.2.5            misc3d_0.8-4          parallel_3.2.5        pls_2.5-0             splines_3.2.5         knitr_1.12.3          RUnit_0.4.31         
[64] fda_2.4.4             corpcor_1.6.8         codetools_0.2-14      stats4_3.2.5          XML_3.98-1.4          latticeExtra_0.6-28   data.table_1.9.6     
[71] vcd_1.4-1             nloptr_1.0.4          MatrixModels_0.4-1    VIM_4.4.1             gtable_0.2.0          clue_0.3-51           reshape_0.8.5        
[78] assertthat_0.1        ks_1.10.2             ggplot2_2.1.0         e1071_1.6-7           coda_0.18-1           flowUtils_1.34.0      class_7.3-14         
[85] IDPmisc_1.1.17        pcaPP_1.9-60          robCompositions_2.0.0 mvoutlier_2.0.6       cluster_2.0.4         rgl_0.95.1441   
opencyto gating • 1.6k views
ADD COMMENT

Login before adding your answer.

Traffic: 875 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6