Hi, I'm using flowCore and flowStats to transform a few parameters and normalize them to 'line up the peaks' using the gaussNorm function in the flowStats package. I'd like to be able to apply an inverse logicle when I'm finished to undo the transformation so I can re-export the normalized files and then transform several parameters of my choosing in a 3rd party clustering application downstream of this step.
However, I'm not clear on how to correctly use inverseLogicleTransform in my workflow. It seems that estimateLogicle results in a transformlist object but inverseLogicleTransform expects an object of the class "transform". What am I missing here? It seems that the parameters for the logicle transformation don't exist yet at the step of having the transformlist object, but it seems I need them to define a proper transform object to use for the argument to inverseLogicleTransform.
Example code:
myflowset <- read.flowSet(pattern = ".fcs", path = ".", alter.names = TRUE, transformation = FALSE, emptyValue = FALSE)
mycolnames <- as.character(colnames(exprs(myflowset[[1]])))
ChnlsToTrans <- mycolnames[c(29,33,34)]
translist <- estimateLogicle(myflowset[[2]], ChnlsToTrans)
myflowset <- transform(myflowset, translist)
#...other code here to do normalization on exprs data...
invLgcl <- inverseLogicleTransform(trans = translist) #inverse logicle
Last line above results in this error:
"Error in inverseLogicleTransform(trans = translist) :
trans has to be an object of class "transform"
created using the "logicleTransform" function"
Output of sessionInfo():
R version 3.3.3 (2017-03-06)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] splines stats graphics grDevices utils datasets methods base
other attached packages:
[1] hexbin_1.27.1 stringr_1.2.0 ggjoy_0.3.0 ggcyto_1.2.3
[5] ggplot2_2.2.1 flowStats_3.32.0 flowWorkspace_3.20.5 ncdfFlow_2.20.2
[9] BH_1.62.0-1 RcppArmadillo_0.7.900.2.0 cluster_2.0.6 fda_2.4.4
[13] Matrix_1.2-10 flowCore_1.40.6
loaded via a namespace (and not attached):
[1] Biobase_2.34.0 jsonlite_1.5 shiny_1.0.3 assertthat_0.2.0 stats4_3.3.3 latticeExtra_0.6-28
[7] robustbase_0.92-7 lattice_0.20-35 glue_1.1.1 digest_0.6.12 RColorBrewer_1.1-2 colorspace_1.3-2
[13] htmltools_0.3.6 httpuv_1.3.5 plyr_1.8.4 multicool_0.1-10 pcaPP_1.9-72 XML_3.98-1.9
[19] pkgconfig_2.0.1 misc3d_0.8-4 zlibbioc_1.20.0 purrr_0.2.3 xtable_1.8-2 corpcor_1.6.9
[25] mvtnorm_1.0-6 scales_0.4.1 tibble_1.3.3 flowViz_1.38.0 BiocGenerics_0.20.0 lazyeval_0.2.0
[31] magrittr_1.5 IDPmisc_1.1.17 mime_0.5 ks_1.10.7 MASS_7.3-47 FNN_1.1
[37] graph_1.52.0 tools_3.3.3 data.table_1.10.4 matrixStats_0.52.2 munsell_0.4.3 bindrcpp_0.2
[43] rlang_0.1.1 grid_3.3.3 htmlwidgets_0.9 labeling_0.3 gtable_0.2.0 codetools_0.2-15
[49] DBI_0.7 rrcov_1.4-3 R6_2.2.2 gridExtra_2.2.1 knitr_1.16 dplyr_0.7.2
[55] bindr_0.1 KernSmooth_2.23-15 Rgraphviz_2.18.0 stringi_1.1.5 parallel_3.3.3 Rcpp_0.12.12
[61] rgl_0.98.1 DEoptimR_1.0-8