RGLab / flowCore

Core flow cytometry infrastructure
44 stars 25 forks source link

No plots printing #155

Closed humzakhan340 closed 5 years ago

humzakhan340 commented 5 years ago

Describe the bug Flowcore/Flowworkspace will take in the workspace I want it to and will give me all the population statistics, but will not plot them in Rstudio.

To Reproduce --> library(flowWorkspace) library(flowCore) setwd("~/Desktop/UCLA116 CyTOF") flowDataPath <- "16-May-2019.wsp" ws<-openWorkspace(flowDataPath)

make a flowFrame

gs <- parseWorkspace(ws, name=1)

show(ws) plot(gs[[1]]) print(plotGate(gs[[1]], getNodes(gs[[4]])[8])) plotGate(gs, "191Ir, 193Ir subset")

Expected behavior I'd expect it to print out the plot just fine. This is a pretty major impediment.

Screenshots image

image

sessionInfo(): Warning messages: 1: In min(x) : no non-missing arguments to min; returning Inf 2: In max(x) : no non-missing arguments to max; returning -Inf 3: In min(x) : no non-missing arguments to min; returning Inf 4: In max(x) : no non-missing arguments to max; returning -Inf 5: In min(x) : no non-missing arguments to min; returning Inf 6: In max(x) : no non-missing arguments to max; returning -Inf

Additional context Add any other context about the problem here.

mikejiang commented 5 years ago

Are you using the latest bioc release 3.9? what's the output of getPopStats(gs[[1]])?how about use ggcyto::autoplot(gs[[1]])

humzakhan340 commented 5 years ago

I have now updated to 3.9. Output of getPopStats(gs[[1]]) is image

ggcyto::autoplot(gs[[1]]) yields image

print(plotGate(gs[[1]], getNodes(gs[[4]])[8])) still gives the error packet1 message.

Unsure of how to troubleshoot.

mikejiang commented 5 years ago

paste your sessionInfo() and if possible, share the link to the example xml and fcs file for troubleshooting

mikejiang commented 5 years ago

also what is the output of getData(gs[[1]]), range(getData(gs[[1]])) and range(getData(gs[[1]]), "data")

humzakhan340 commented 5 years ago

sessionInfo() :

sessionInfo() R version 3.6.0 (2019-04-26) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS Mojave 10.14

Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

Random number generation: RNG: Mersenne-Twister Normal: Inversion Sample: Rounding

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages: [1] ggcyto_1.12.0 ggplot2_3.1.1 openCyto_1.22.0
[4] hexbin_1.27.3 CytoML_1.10.0 flowWorkspace_3.32.0
[7] ncdfFlow_2.30.0 BH_1.69.0-1 RcppArmadillo_0.9.400.3.0 [10] flowCore_1.50.0

loaded via a namespace (and not attached): [1] Biobase_2.44.0 splines_3.6.0 jsonlite_1.6 R.utils_2.8.0
[5] ellipse_0.4.1 gtools_3.8.1 RcppParallel_4.4.3 assertthat_0.2.1
[9] BiocManager_1.30.4 stats4_3.6.0 latticeExtra_0.6-28 RBGL_1.60.0
[13] yaml_2.2.0 robustbase_0.93-5 pillar_1.4.1 lattice_0.20-38
[17] glue_1.3.1 RUnit_0.4.32 digest_0.6.19 RColorBrewer_1.1-2 [21] colorspace_1.4-1 Matrix_1.2-17 R.oo_1.22.0 plyr_1.8.4
[25] pcaPP_1.9-73 XML_3.98-1.19 pkgconfig_2.0.2 fda_2.4.8
[29] zlibbioc_1.30.0 purrr_0.3.2 corpcor_1.6.9 mvtnorm_1.0-10
[33] scales_1.0.0 flowStats_3.42.0 tibble_2.1.1 withr_2.1.2
[37] flowViz_1.48.0 BiocGenerics_0.30.0 lazyeval_0.2.2 mnormt_1.5-5
[41] magrittr_1.5 crayon_1.3.4 IDPmisc_1.1.19 mclust_5.4.3
[45] ks_1.11.5 R.methodsS3_1.7.1 MASS_7.3-51.4 graph_1.62.0
[49] tools_3.6.0 data.table_1.12.2 flowClust_3.22.0 matrixStats_0.54.0 [53] stringr_1.4.0 munsell_0.5.0 cluster_2.0.9 flowUtils_1.48.0
[57] compiler_3.6.0 rlang_0.3.4 grid_3.6.0 base64enc_0.1-3
[61] gtable_0.3.0 rrcov_1.4-7 R6_2.4.0 gridExtra_2.3
[65] dplyr_0.8.1 clue_0.3-57 KernSmooth_2.23-15 Rgraphviz_2.28.0
[69] stringi_1.4.3 parallel_3.6.0 Rcpp_1.0.1 DEoptimR_1.0-8
[73] tidyselect_0.2.5

getData(gs[[1]]) : flowFrame object '20190515_IFNa_Phospho_Patient_UCLA116_01_1.fcs' with 195678 cells and 64 observables: name desc range minRange maxRange $P1 Time 0.000 0.000 0.00 $P2 Event_length 9071.929 1755.415 10827.34 $P3 Y89Di 89Y_CD45 9071.929 1755.415 10827.34 $P4 Pd102Di 102Pd 9828.078 1755.415 11583.49 $P5 Pd104Di 104Pd 9828.078 1755.415 11583.49 $P6 Pd105Di 105Pd 9828.078 1755.415 11583.49 $P7 Pd106Di 106Pd 9071.929 1755.415 10827.34 $P8 Pd108Di 108Pd 9071.929 1755.415 10827.34 $P9 Pd110Di 110Pd 9071.929 1755.415 10827.34 $P10 In115Di 115In_KI67 9071.929 1755.415 10827.34 $P11 Sn120Di 120Sn 9071.929 1755.415 10827.34 $P12 I127Di 127I 9071.929 1755.415 10827.34 $P13 Xe131Di 131Xe 9071.929 1755.415 10827.34 $P14 Cs133Di 133Cs 9071.929 1755.415 10827.34 $P15 Ba138Di 138Ba 9071.929 1755.415 10827.34 $P16 La139Di 139La 9071.929 1755.415 10827.34 $P17 Ce140Di 140Ce 9828.078 1755.415 11583.49 $P18 Pr141Di 141Pr_IgM 10584.161 1755.415 12339.58 $P19 Ce142Di 142Ce 9071.929 1755.415 10827.34 $P20 Nd143Di 143Nd_CD127_IL7RA 9071.929 1755.415 10827.34 $P21 Nd144Di 144Nd_pAKT_S473 9071.929 1755.415 10827.34 $P22 Nd145Di 145Nd_CD4 9071.929 1755.415 10827.34 $P23 Nd146Di 146Nd_IgD 9071.929 1755.415 10827.34 $P24 Sm147Di 147Sm_pSTAT5_Y694 9071.929 1755.415 10827.34 $P25 Nd148Di 148Nd_CD16 9071.929 1755.415 10827.34 $P26 Sm149Di 149Sm_CD25_IL2R 11340.210 1755.415 13095.63 $P27 Nd150Di 150Nd_CD20 9071.929 1755.415 10827.34 $P28 Eu151Di 151Eu_CD123_IL2R 9828.078 1755.415 11583.49 $P29 Sm152Di 152Sm_CD66B 9071.929 1755.415 10827.34 $P30 Eu153Di 153Eu_pSTAT1_Y701 9828.078 1755.415 11583.49 $P31 Sm154Di 154Sm_HLADR 9071.929 1755.415 10827.34 $P32 Gd155Di 155Gd_CD45RA 9071.929 1755.415 10827.34 $P33 Gd156Di 156Gd_pP38_T180_Y182 9071.929 1755.415 10827.34 $P34 Gd158Di 158Gd_pSTAT3_Y705 9071.929 1755.415 10827.34 $P35 Tb159Di 159Tb_CD141 9071.929 1755.415 10827.34 $P36 Gd160Di 160Gd_CD11c 9071.929 1755.415 10827.34 $P37 Dy162Di 162Dy_FoxP3 9071.929 1755.415 10827.34 $P38 Dy163Di 163Dy_CD56_NCAM 9071.929 1755.415 10827.34 $P39 Dy164Di 164Dy_IkBa 9071.929 1755.415 10827.34 $P40 Ho165Di 165Ho_IRF7 9828.078 1755.415 11583.49 $P41 Er166Di 166Er_Caspase3_Cleaved 9071.929 1755.415 10827.34 $P42 Er167Di 167Er_CD27 9071.929 1755.415 10827.34 $P43 Er168Di 168Er_CD8a 9071.929 1755.415 10827.34 $P44 Tm169Di 169Tm_CD19 9071.929 1755.415 10827.34 $P45 Er170Di 170Er_CD3 9071.929 1755.415 10827.34 $P46 Yb171Di 171Yb_pERK1_2_T202_Y204 9071.929 1755.415 10827.34 $P47 Yb172Di 172Yb_CD38 9071.929 1755.415 10827.34 $P48 Yb173Di 173Yb_CD14 9071.929 1755.415 10827.34 $P49 Yb174Di 174Yb_CD21 9071.929 1755.415 10827.34 $P50 Lu175Di 175Lu_pS6_S235_S236 9828.078 1755.415 11583.49 $P51 Lu176Di 176Lu 9071.929 1755.415 10827.34 $P52 Yb176Di 176Yb_pCREB_S133 9071.929 1755.415 10827.34 $P53 BCKG190Di 190BCKG 9071.929 1755.415 10827.34 $P54 Ir191Di 191Ir 10584.161 1755.415 12339.58 $P55 Ir193Di 193Ir 11340.210 1755.415 13095.63 $P56 Pt194Di 194Pt 10584.161 1755.415 12339.58 $P57 Pt195Di 195Pt 10584.161 1755.415 12339.58 $P58 Pt198Di 198Pt 9071.929 1755.415 10827.34 $P59 Pb208Di 208Pb 9071.929 1755.415 10827.34 $P60 Bi209Di 209Bi_CD11b_Mac1 9071.929 1755.415 10827.34 $P61 Center 9828.078 1755.415 11583.49 $P62 Offset 9071.929 1755.415 10827.34 $P63 Width 9071.929 1755.415 10827.34 $P64 Residual 9071.929 1755.415 10827.34 464 keywords are stored in the 'description' slot

range(getData(gs[[1]])) : Time Event_length Y89Di Pd102Di Pd104Di Pd105Di Pd106Di Pd108Di Pd110Di In115Di min 0 1755.415 1755.415 1755.415 1755.415 1755.415 1755.415 1755.415 1755.415 1755.415 max 0 10827.344 10827.344 11583.493 11583.493 11583.493 10827.344 10827.344 10827.344 10827.344 Sn120Di I127Di Xe131Di Cs133Di Ba138Di La139Di Ce140Di Pr141Di Ce142Di min 1755.415 1755.415 1755.415 1755.415 1755.415 1755.415 1755.415 1755.415 1755.415 max 10827.344 10827.344 10827.344 10827.344 10827.344 10827.344 11583.493 12339.576 10827.344 Nd143Di Nd144Di Nd145Di Nd146Di Sm147Di Nd148Di Sm149Di Nd150Di Eu151Di min 1755.415 1755.415 1755.415 1755.415 1755.415 1755.415 1755.415 1755.415 1755.415 max 10827.344 10827.344 10827.344 10827.344 10827.344 10827.344 13095.626 10827.344 11583.493 Sm152Di Eu153Di Sm154Di Gd155Di Gd156Di Gd158Di Tb159Di Gd160Di Dy162Di min 1755.415 1755.415 1755.415 1755.415 1755.415 1755.415 1755.415 1755.415 1755.415 max 10827.344 11583.493 10827.344 10827.344 10827.344 10827.344 10827.344 10827.344 10827.344 Dy163Di Dy164Di Ho165Di Er166Di Er167Di Er168Di Tm169Di Er170Di Yb171Di min 1755.415 1755.415 1755.415 1755.415 1755.415 1755.415 1755.415 1755.415 1755.415 max 10827.344 10827.344 11583.493 10827.344 10827.344 10827.344 10827.344 10827.344 10827.344 Yb172Di Yb173Di Yb174Di Lu175Di Lu176Di Yb176Di BCKG190Di Ir191Di Ir193Di min 1755.415 1755.415 1755.415 1755.415 1755.415 1755.415 1755.415 1755.415 1755.415 max 10827.344 10827.344 10827.344 11583.493 10827.344 10827.344 10827.344 12339.576 13095.626 Pt194Di Pt195Di Pt198Di Pb208Di Bi209Di Center Offset Width Residual min 1755.415 1755.415 1755.415 1755.415 1755.415 1755.415 1755.415 1755.415 1755.415 max 12339.576 12339.576 10827.344 10827.344 10827.344 11583.493 10827.344 10827.344 10827.344 range(getData(gs[[1]]), "data") : Time Event_length Y89Di Pd102Di Pd104Di Pd105Di Pd106Di Pd108Di Pd110Di In115Di min 0 91.25533 37.44886 120.2131 120.2484 120.2054 37.44886 37.44886 37.44886 37.44886 max 0 133.85837 178.09653 232.4211 231.4589 232.4542 181.29369 182.43573 178.96159 177.50229 Sn120Di I127Di Xe131Di Cs133Di Ba138Di La139Di Ce140Di Pr141Di Ce142Di min 37.44886 37.44886 37.44886 37.44886 37.44886 37.44886 37.44886 37.44886 37.44886 max 169.11707 181.34061 108.34167 166.79225 226.76451 178.86494 239.22801 249.50441 188.46239 Nd143Di Nd144Di Nd145Di Nd146Di Sm147Di Nd148Di Sm149Di Nd150Di Eu151Di min 37.44886 37.44886 37.44886 37.44886 37.44886 37.44886 37.44886 37.44886 37.44886 max 207.14647 161.32687 163.85126 210.61440 204.78671 189.41962 263.88983 208.73395 234.99101 Sm152Di Eu153Di Sm154Di Gd155Di Gd156Di Gd158Di Tb159Di Gd160Di Dy162Di min 37.44886 37.44886 37.44886 37.44886 37.44886 37.44886 37.44886 37.44886 37.44886 max 195.98438 239.15625 227.93875 230.01561 186.68214 171.12775 207.83195 195.35391 169.30504 Dy163Di Dy164Di Ho165Di Er166Di Er167Di Er168Di Tm169Di Er170Di Yb171Di min 37.44886 37.44886 37.44886 37.44886 37.44886 37.44886 37.44886 37.44886 37.44886 max 209.10091 171.91228 238.35493 173.97954 175.44891 185.66281 193.45647 195.29120 183.42497 Yb172Di Yb173Di Yb174Di Lu175Di Lu176Di Yb176Di BCKG190Di Ir191Di Ir193Di min 37.44886 37.44886 37.44886 37.44886 37.44886 37.44886 37.44886 86.40204 105.5577 max 169.04192 169.27820 186.55605 239.34271 209.62782 209.61601 104.14588 260.97015 272.3668 Pt194Di Pt195Di Pt198Di Pb208Di Bi209Di Center Offset Width Residual min 37.44886 37.44886 37.44886 37.44886 37.44886 37.44886 37.44886 37.44886 37.44886 max 247.73047 247.50284 206.68878 213.27591 214.06598 233.71597 187.08797 167.81908 188.97383

It seems to be loading my data fine...

mikejiang commented 5 years ago

looks like the instrument range (returned from range()) is at a entirely different scale from the actual data range (i.e. range(fr, 'data')) in your original FCS file. Since the autoplot set the plot scale by instrument range by default, this may be the reason why the data is not visible. Try to change the default scale to data scale by autoplot(gs[[1]]) + ggcyto_par_set(limits = "data")

humzakhan340 commented 5 years ago

This works--thank you so much!