FlowCore openCyto: problem with summary(result)
1
0
Entering edit mode
noviello • 0
@noviello-23137
Last seen 19 months ago

Hi Everyone! I have a question regarding the FlowCore summary usage applied to the result of a filter. Here´s the thing. I am analysing Flow Cytometry data. I first gated for single cells using two types of automatic gates from OpenCyto (Boundarygate and SingletGate). Then I wanted to define the population of positive cells for a fluorophore in this way: take the neagtive control, without fluorophore, and define the gate that includes the 1% of cells with highest fluorescence. Then I apply this gate to all my other populations(frames). The gating per se works but I have problems in obtaining a summary of the results of the filtering process. Unfortunately this is quite an important information that I need to know. the weird thing is that the other gates that I applied, with similar coding, produced a nice summary with the percentage of cells within the gate. How come that with this specific filter it doesn´t work? And what could I do to solve the problem? I specify that I only started to use R quite recently.

chnl <- "DsRed.dt.Tomato...583.22...A" xistpos <- openCyto:::.quantileGate(TSingletsMyFlowSet[[29]], channels = chnl, probs = 0.99) p <- autoplot(TSingletsMyFlowSet[[29]], chnl) p + geomgate(xistpos) filter(TSingletsMyFlowSet[[29]], xistpos) A filterResult produced by the filter named '' #<-**It doesn´t recognize that the name of the gate is xistpos result3 = filter(TSingletsMyFlowSet[[29]], xistpos) #there's a bug that does not return me the result statistics result3 A filterResult produced by the filter named '' summary(result3) Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘identifier<-’ for signature ‘"NULL", "character"’

sessionInfo() R version 3.6.1 (2019-07-05) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 17763)

Matrix products: default

locale: [1] LCCOLLATE=EnglishUnited Kingdom.1252 [2] LCCTYPE=EnglishUnited Kingdom.1252
[3] LCMONETARY=EnglishUnited Kingdom.1252 [4] LCNUMERIC=C
[5] LC
TIME=English_United Kingdom.1252

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

other attached packages: [1] openCyto1.24.0 ggcyto1.14.1
[3] ncdfFlow2.32.0 BH1.72.0-3
[5] RcppArmadillo0.9.850.1.0 ggplot23.3.0
[7] flowCore1.52.1 flowWorkspace3.34.1
[9] flowStats3.44.0 flowAI1.16.0

loaded via a namespace (and not attached): [1] Biobase2.46.0 splines3.6.1 R.utils2.9.2
[4] ellipse
0.4.1 gtools3.8.1 RcppParallel5.0.0 [7] assertthat0.2.1 BiocManager1.30.10 stats43.6.1
[10] latticeExtra
0.6-29 RBGL1.62.1 robustbase0.93-6
[13] pillar1.4.3 lattice0.20-40 glue1.3.2
[16] digest
0.6.25 RColorBrewer1.1-2 colorspace1.4-1
[19] htmltools0.4.0 Matrix1.2-18 R.oo1.23.0
[22] plyr
1.8.6 pcaPP1.9-73 pkgconfig2.0.3
[25] fda2.4.8.1 zlibbioc1.32.0 purrr0.3.3
[28] corpcor
1.6.9 mvtnorm1.1-0 scales1.1.0
[31] jpeg0.1-8.1 tibble2.1.3 farver2.0.3
[34] withr
2.1.2 flowViz1.50.0 BiocGenerics0.32.0 [37] hexbin1.28.1 mnormt1.5-6 magrittr1.5
[40] crayon
1.3.4 IDPmisc1.1.20 mclust5.4.5
[43] evaluate0.14 ks1.11.7 R.methodsS31.8.0
[46] MASS
7.3-51.5 changepoint2.2.2 graph1.64.0
[49] tools3.6.1 data.table1.12.8 flowClust3.24.0
[52] lifecycle
0.2.0 matrixStats0.56.0 stringr1.4.0
[55] munsell0.5.0 cluster2.1.0 compiler3.6.1
[58] rlang
0.4.5 grid3.6.1 rstudioapi0.11
[61] labeling0.3 rmarkdown2.1 gtable0.3.0
[64] reshape2
1.4.3 rrcov1.5-2 R62.4.1
[67] zoo1.8-7 gridExtra2.3 knitr1.28
[70] dplyr
0.8.5 clue0.3-57 KernSmooth2.23-16 [73] Rgraphviz2.30.0 stringi1.4.6 parallel3.6.1
[76] Rcpp
1.0.3 png0.1-7 DEoptimR1.0-8
[79] tidyselect1.0.0 xfun0.12

Best, Gemma

flowCore openCyto Summary Result Filter • 173 views
ADD COMMENT
0
Entering edit mode
Jake Wagner ▴ 280
@jake-wagner-19995
Last seen 12 months ago

Sorry for the delayed response. I believe both of your issues (the lack of name and the error) are stemming from the filter having an empty filterId attribute. When gates are added to GatingSet objects, this slot is automatically filled with a default name, but this is not the case with the base flowCore approach you are taking here. Anyway, your problems should go away if you just add a filterId to xistpos right after it is created.

...
xistpos <- openCyto:::.quantileGate(TSingletsMyFlowSet[[29]], channels = chnl, probs = 0.99) 
xistpos@filterId <- "myQuantileGate"
...
ADD COMMENT

Login before adding your answer.

Traffic: 387 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