jmeskas / flowCut

Precise and Accurate Automated Removal of Outlier Events and Flagging of Files Based on Time Versus Fluorescence Analysis.
8 stars 9 forks source link

[Error: ] This file has 2 time channels. flowCut has selected to use TIME_MSWTIME_LSW - TIME_MSWTIME_LSW. Error: parameter names don't match colnames of the exprs matrix #8

Closed JAEYOONSUNG closed 1 year ago

JAEYOONSUNG commented 1 year ago

Hello jmeskas! I was analyzing FACS data and came across the issue of outliers. I found your great package that you created for addressing this issue.

I have loaded FCS data obtained from Bio-Rad S3e into R using flowCore to use flowCut.

flowCore::read.FCS("my_data.fcs") My data is in the flowFrame format, which is fully compatible with flowCut, but I am getting the following error.

my_data_processed <- flowCut(my_data) This file has 2 time channels. flowCut has selected to use TIME_MSWTIME_LSW - TIME_MSWTIME_LSW. Error: parameter names don't match colnames of the exprs matrix

colnames(my_data@exprs)

스크린샷 2023-05-13 15 59 54

my_data@parameters@data

스크린샷 2023-05-13 15 52 43

Perhaps the error is due to the mismatch between the values in the parameters. However, when I tried to convert it from S3 format using the following method, the format was changed and it was not recognized by flowCut.

my_data@parameters@data[["desc"]][1] <- "TIME_MSW" my_data@parameters@data[["desc"]][2] <- "TIME_LSW"

How can I fix this issue?

Thank you :)

JAEYOONSUNG commented 1 year ago
스크린샷 2023-05-13 16 13 07
jmeskas commented 1 year ago

Hello jaeyoonsung,

Thank you for creating this issue. There are two things going on here. 1) It appears like flowCut is selecting 2 time channels when it should be selecting only 1, however, the code itself is selecting 1 but telling the user it is selecting 2. I have begun to make a fork with that small correction that I will push soon. 2) The actual issue you are having is with the mismatch between your parameter names and your colnames of your exprs matrix. At a quick glance it seems like they are consistent. Perhaps the "my_data@description" also needs to be consistent? You should see the following:

$$P1N [1] "TIME_MSW" ... $$P10N [1] "FL1-AREA" ...

But I can't help you more unless you send me a reproducible example. Feel free to send it over anytime either via this issue or directly to my email at justinmeskas@gmail.com. Best of luck!

JAEYOONSUNG commented 1 year ago

Hello, I checked the description as you said, but I found it has the same name.

스크린샷 2023-05-19 14 24 49

I will send you an example FCS file extracted from Bio-Rad that I'm having trouble with, along with the R script.

Thank you. :)

jmeskas commented 1 year ago

Hello @JAEYOONSUNG,

I never received any email from you, so I will assumed you managed to fix your issue. I will go ahead and close this issue. Feel free to reopen it if your issue is not resolved. Thank you.