Error in the use of flowTrans: L-BFGS-B needs finite values of 'fn'
0
0
Entering edit mode
hamiltond ▴ 10
@2d6d9163
Last seen 12 months ago
United States

Let me preface this with the admission that I am not an "expert" here by any means, which means I'm learning as I'm going. I have been tasked with the analysis of high dimensional (spectral) flow cytometry data with 32 parameters (time, six linear parameters (FSC and SSC) and 24 fluorescent channels. The data is from a Cytek Aurora, and it has been unmixed and compensated. I took it through FlowJo to eliminate doublets and dead/debris, and then cleaned using FlowAI (in FlowJo) prior to exporting the data.

Everything goes well enough, I guess: I get a sample data set of 8 fcs files set up in a flowSet, I am able to get the logicle parameters and do the logicle transformation ... except I also want to look at using the biexponential transformation (similar to what FlowJo shows as most folks around work are used to seeing that representation) as well.

Here is the problem. When I try to get the parameters for the biexponential transformation using flowTrans, I get an the error. (sam.bi_ex is a flowSet, so it may not be appropriate here, so if it isn't please let me know.)

ft<-flowTrans(sam.bi_ex[[1]], "mclMultivBiexp",
+                   colnames(sam.bi_ex[[1]]), n2f=FALSE, parameters.only=TRUE)

Error in optim(par = p.ab, mclMultivBiexpAB, y = y, c = p.cd[1], d = p.cd[2],  : 
  L-BFGS-B needs finite values of 'fn'
Error in optim(par = p.ab, mclMultivBiexpAB, y = y, c = p.cd[1], d = p.cd[2],  : 
  L-BFGS-B needs finite values of 'fn'

and it eventually dumps out or I get tired of waiting and just kill it.

I have done several on-line searches, and tried various "solutions". I have tried re-downloading flowTrans using

devtools::install_github("RGLab/flowTrans", ref = "trunk")

but it didn't work.

I have tried using a flowFrame "lg_data" which is the first of the 8 fcs files in the flowSet:

ft<-flowTrans(lg_data, "mclMultivBiexp",
+                   colnames(lg_data)[1:32], n2f=FALSE, parameters.only=TRUE)

as was suggested, but that didn't work. Some people suggested that the solution flowTrans was looking for lies in a "radius of convergence" of nearly-correct parameters, and if you start outside of that radius it won't converge and will throw the error. Someone else suggested that not enough data, since some 24 (or perhaps 32?) parameters are to be examined there should be that many flowFrames. A check of the column names follows:

cn <- colnames(lg_data)
> cn
 [1] "Time"               "SSC.H"              "SSC.A"              "FSC.H"              "FSC.A"              "SSC.B.H"           
 [7] "SSC.B.A"            "BUV395.A"           "LIVE.DEAD.Blue.A"   "BUV496.A"           "BUV563.A"           "BUV661.A"          
[13] "BUV737.A"           "BUV805.A"           "BV421.A"            "BV510.A"            "BV605.A"            "BV650.A"           
[19] "BV711.A"            "BV750.A"            "BV785.A"            "FITC.A"             "PerCP.A"            "PerCP.eFluor.710.A"
[25] "PE.A"               "PE.Dazzle594.A"     "PE.Cy7.A"           "APC.A"              "APC.R700.A"         "APC.H7.A"          
[31] "APC.Fire.810.A"     "AF.A" 

I think this error points to somewhere an INF is in the data, or more likely, in the data calculation. If it were in the data itself, then wouldn't the calculations for the logicle also have problems, since the logicle is a derivative of the biexponential? I'm hoping its something as newbie-ish as ( ) vs [ ] or perhaps I'm trying to feed the function the wrong type of input.

Quite frankly, there isn't a lot of information out there regarding this problem. Others have done this with no issue, apparently, so there is something I am missing. Any help will be appreciated. Any direction you can point me will also be most appreciated.

flowCore FlowCytometryData flowTrans flow • 963 views
ADD COMMENT

Login before adding your answer.

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