Search
Question: Factor-related problem when creating new flowFrame
0
gravatar for Kipper Fletez-Brant
3.1 years ago by
United States
Kipper Fletez-Brant140 wrote:
Hi, I am having trouble understanding what is going wrong. I am trying to create a new flowFrame that is in every way identical to an old flowFrame, but with one additional, new parameter. I am able to reproduce it using the GvHD dataset. My issue is down there at the very end of my example code when I try to plot - somehow in the flowFrame creation process my new flowFrame is presumed to have a factor somewhere in it. As a result, I cannot plot with my new flowFrame. I discovered this problem in another context, in which the same factor-related problem came up during the call to estimateLogicle. I have absolutely no idea what is going on here, as calling str() doesn't show factors at all. Any help would be appreciated, Kipper Fletez-Brant ********* Begin Example Code *********** library(flowCore) library(flowViz) library(grid) ## look at given flowFrame, try to plot ff <- GvHD[[1]] > ff flowFrame object 's5a01' with 3420 cells and 8 observables: name desc range minRange maxRange $P1 FSC-H FSC-Height 1024 0 1023 $P2 SSC-H SSC-Height 1024 0 1023 $P3 FL1-H CD15 FITC 1024 1 10000 $P4 FL2-H CD45 PE 1024 1 10000 $P5 FL3-H CD14 PerCP 1024 1 10000 $P6 FL2-A <na> 1024 0 1023 $P7 FL4-H CD33 APC 1024 1 10000 $P8 Time Time (51.20 sec.) 1024 0 1023 153 keywords are stored in the 'description' slot lgcl <- estimateLogicle(ff, parameters(ff)$name[c(1:7)]) ff.l <- transform(ff, lgcl) > str(exprs(ff.l)) num [1:3420, 1:8] 4.06 3.77 3.64 3.71 3.6 ... - attr(*, "dimnames")=List of 2 ..$ : NULL ..$ : Named chr [1:8] "FSC-H" "SSC-H" "FL1-H" "FL2-H" ... .. ..- attr(*, "names")= chr [1:8] "$P1N" "$P2N" "$P3N" "$P4N" ... > xyplot(`Time` ~ `FL4-H`, data=ff.l, alpha=0.5, smooth=FALSE, abs=TRUE) Warning message: In grid.Call.graphics(L_points, x$x, x$y, x$pch, x$size) : semi-transparency is not supported on this device: reported only once per page ## create new flowFrame, try to plot a <- runif(length(exprs(ff)[,1]), 1, 1e4) p <- parameters(ff)$data p[9,] <- c("a", "a", 1024, 1, 1024) ex <- cbind(exprs(ff), a) ff2 <- new("flowFrame", exprs=ex, parameters=new("AnnotatedDataFrame", p), description=description(ff)) > ff2 flowFrame object 's5a01' with 3420 cells and 9 observables: name desc range minRange maxRange $P1 FSC-H FSC-Height 1024 0 1023 $P2 SSC-H SSC-Height 1024 0 1023 $P3 FL1-H CD15 FITC 1024 1 10000 $P4 FL2-H CD45 PE 1024 1 10000 $P5 FL3-H CD14 PerCP 1024 1 10000 $P6 FL2-A <na> 1024 0 1023 $P7 FL4-H CD33 APC 1024 1 10000 $P8 Time Time (51.20 sec.) 1024 0 1023 9 a a 1024 1 1024 153 keywords are stored in the 'description' slot lgcl <- estimateLogicle(ff2, channels=parameters(ff2)$name[c(1:7)]) ff2.l <- transform(ff2, lgcl) > str(exprs(ff2.l)) num [1:3420, 1:9] 6.77 6.48 6.35 6.42 6.31 ... - attr(*, "dimnames")=List of 2 ..$ : NULL ..$ : chr [1:9] "FSC-H" "SSC-H" "FL1-H" "FL2-H" ... > xyplot(`Time` ~ `FL4-H`, data=ff2.l, alpha=0.5, smooth=FALSE, abs=TRUE) Warning messages: 1: In Ops.factor(diff(tmp), 15) : / not meaningful for factors 2: In Ops.factor(tmp, c(-1, 1) * xd) : + not meaningful for factors 3: In Ops.factor(diff(tmp), 15) : / not meaningful for factors 4: In Ops.factor(tmp, c(-1, 1) * yd) : + not meaningful for factors 5: In Ops.factor(diff(tmp), 15) : / not meaningful for factors 6: In Ops.factor(tmp, c(-1, 1) * xd) : + not meaningful for factors 7: In Ops.factor(diff(tmp), 15) : / not meaningful for factors 8: In Ops.factor(tmp, c(-1, 1) * yd) : + not meaningful for factors *********** Begin Session Info ************* > sessionInfo() R version 3.0.0 (2013-04-03) Platform: x86_64-unknown-linux-gnu (64-bit) locale: [1] LC_CTYPE=C LC_NUMERIC=C [3] LC_TIME=C LC_COLLATE=C [5] LC_MONETARY=C LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=C LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] grid parallel stats graphics grDevices utils datasets [8] methods base other attached packages: [1] flowViz_1.24.0 lattice_0.20-27 BiocInstaller_1.10.4 [4] bit_1.1-11 changepoint_1.1.2 sfsmisc_1.0-25 [7] flowCore_1.26.3 rrcov_1.3-4 pcaPP_1.9-49 [10] mvtnorm_0.9-9997 robustbase_0.90-2 Biobase_2.20.1 [13] BiocGenerics_0.6.0 loaded via a namespace (and not attached): [1] DEoptimR_1.0-1 IDPmisc_1.1.17 KernSmooth_2.23-10 [4] MASS_7.3-26 RColorBrewer_1.0-5 feature_1.2.10 [7] graph_1.38.3 hexbin_1.26.3 ks_1.9.0 [10] latticeExtra_0.6-26 misc3d_0.8-4 rgl_0.93.996 [13] stats4_3.0.0 tools_3.0.0 zoo_1.7-11
ADD COMMENTlink written 3.1 years ago by Kipper Fletez-Brant140
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 224 users visited in the last hour