ebecht / infinityFlow

25 stars 8 forks source link

Error in logicle_transform #15

Open Cicevk opened 1 year ago

Cicevk commented 1 year ago

Dear Mr. Becht,

Many thanks for this great package. I have successfully run the infinityFlow, and obtained all the required outputs. However, when I changed a bit gates in my .fcs files and tried to run the pipeline again, this message appeared:

Error in logicle_transform(as.double(x), as.double(t), as.double(w), as.double(m), : Logicle Exception: T = -65.336121, W = nan, M = 4.500000, A = 0.000000 IllegalParameter: T is not positive

Now, I am not sure what might be the problem as I checked and in the selected gate of interest and I do have events/cells.

Many thanks.

ebecht commented 1 year ago

Hello,

I don't think I've ever encountered this one.

If you check https://github.com/ebecht/infinityFlow/blob/master/R/02_logicle_transforms.R, you may see that the T parameter is set to max(data), where data represents the whole expression matrix concatenated from all the individual FCS files. It sounds really weird that the maximum of that matrix would be negative. This is also why you are seeing W = nan since W relies on log(T).

Could you make sure that 1. you are supplying untransformed data and 2. that you indeed have non-negative values in your expression data ?

Thank you, Etienne

Cicevk commented 1 year ago

Hi,

Yes, it is working, the issue was gating out accidentally marker which obtained negative MFI, while being still included in the backbone file. Thank you