flowCore estimate logicle - error in getChannelMarker
1
0
Entering edit mode
Andrew Box ▴ 10
@andrew-box-13730
Last seen 5.7 years ago
Kansas City, MO - Stowers Institute for…

Hi, I'm trying to use an approach I've used in the past to transform parameters in flowCore, but I get an error after running estimateLogicle that states

Error in getChannelMarker(x, channel) : can't find *593/40 [YG]

I get this message whether I specify one or several channels to transform, I've tried both indexing my 'mycolnames' list and also manually specifying a string for the parameter name(s).  This is data from our BD Influx and it's running Sortware (i.e. not Spigot) for acquisision.

myfile <- list.files(pattern = "*.fcs")
myframe <- read.FCS(myfile) #read in an fcs file
mycolnames <-  colnames(myframe) #get new list of parm names
ChnlsToTrans <- mycolnames[c(12,14:23)] #which parms to transform 
translist <- estimateLogicle(myframe, ChnlsToTrans) #estimate logicle transform from data

Does anyone see an issue with my code?  Or is this an issue with the file header?  Example files are here.

----------------------

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] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] ggcyto_1.2.3              flowWorkspace_3.20.5      ncdfFlow_2.20.2           BH_1.65.0-1               RcppArmadillo_0.8.100.1.0
[6] ggplot2_2.2.1             flowCore_1.40.6          

loaded via a namespace (and not attached):
 [1] pcaPP_1.9-72        Rcpp_0.12.13        bindr_0.1           DEoptimR_1.0-8      RColorBrewer_1.1-2  plyr_1.8.4          tools_3.3.3        
 [8] zlibbioc_1.20.0     tibble_1.3.4        gtable_0.2.0        lattice_0.20-35     pkgconfig_2.0.1     rlang_0.1.2         graph_1.52.0       
[15] DBI_0.7             Rgraphviz_2.18.0    parallel_3.3.3      mvtnorm_1.0-6       hexbin_1.27.1       bindrcpp_0.2        gridExtra_2.3      
[22] stringr_1.2.0       dplyr_0.7.4         cluster_2.0.6       IDPmisc_1.1.17      stats4_3.3.3        grid_3.3.3          glue_1.1.1         
[29] robustbase_0.92-7   Biobase_2.34.0      data.table_1.10.4-2 R6_2.2.2            rrcov_1.4-3         XML_3.98-1.9        latticeExtra_0.6-28
[36] magrittr_1.5        corpcor_1.6.9       scales_0.5.0        matrixStats_0.52.2  BiocGenerics_0.20.0 MASS_7.3-47         assertthat_0.2.0   
[43] colorspace_1.3-2    KernSmooth_2.23-15  stringi_1.1.5       flowViz_1.38.0      lazyeval_0.2.0      munsell_0.4.3      

 

flowcore flow cytometry transformation • 1.6k views
ADD COMMENT
1
Entering edit mode
SamGG ▴ 350
@samgg-6428
Last seen 7 hours ago
France/Marseille/Inserm

Hi,

The code of the getChannelMarker function tries to find an exact match using of the .flowParamMatch function. By default the matching is not in fix mode (fix = FALSE) but considers the query as a regular expression. This leads to a call to the grepl() function. As the mentioned channel contains special characters, the channel is not taken asis. The "[YD]" is searched as a Y or D character. Therefore, the getChannelMarker fails. IMHO, the fix option should be set to TRUE in the getChannelMarker. While the estimateLogicle function allow extra parameters ..., those parameters are transferred to the logicle transformation, not to getChannelMarker.

Let's wait for Mike's opinion.

HTH

 

ADD COMMENT
0
Entering edit mode

Thanks for the reply and explanation - this makes sense. And sorry for the late response, I wasn't getting notifications for some reason.  From inspecting the getChannelMarker function, it seems matching uses fix = TRUE in the current version of flowCore.  Which explains why I am no longer encountering this issue when working with Influx instrument data where compensated channel names always begin with "*".  I don't recall how I solved this originally unfortunately.  Running this below now works fine:

library(flowCore)

myfile <- list.files(pattern = "*.fcs")
myframe <- read.FCS(myfile) #read in an fcs file
mycolnames <-  colnames(myframe) #get list of parm names
toKeep <- mycolnames[c(11:30)] #fluorescence and scatter parameters
myframe <- myframe[,toKeep] #index to keep only these
mycolnames <-  colnames(myframe) #get new list of parm names
toKeep <- grepl("\\*|FSC|SSC",mycolnames) #generate logical to index and keep only scatter and * containing params
toKeep <- mycolnames[toKeep] #index parameter list by logical of which to keep
myframe <- myframe[,toKeep]
mycolnames <-  colnames(myframe) #get new list of parm names
ChnlsToTrans <- mycolnames #which parms to transform 
translist <- estimateLogicle(myframe, ChnlsToTrans) #estimate logicle transform from data

 

 

ADD REPLY

Login before adding your answer.

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