Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flowCore::read.FCS works but CytoML::flowjo_to_gatingset fails; no valid FCS file #152

Closed
Close-your-eyes opened this issue May 3, 2023 · 11 comments

Comments

@Close-your-eyes
Copy link

Close-your-eyes commented May 3, 2023

Dear community,

I have a few problematic FCS files which have been converted from .mqd files on a MacsQuant machine. Anyhow, not all files are affected.
For some of them CytoML::flowjo_to_gatingset throws an error:

Error in (function (ws, group_id, subset, execute, path, cytoset, backend_dir, :
This does not seem to be a valid FCS2.0, FCS3.0 or FCS3.1 file

But the files can be read with flowCore::read.FCS (setting emptyValue = F though).

Any idea how to approach the conflicting results and how to find out what's the issue?

Thanks.

@Close-your-eyes
Copy link
Author

Here you can find a respective FCS file (https://www.dropbox.com/s/t3qaixahp6vze78/test.fcs?dl=0).

As described, flowCore::read.FCS works. But when the file is within a flowjo workspace and one tries to read the workspace with CytoML::flowjo_to_gatingset the above mentioned error comes up. Any ideas?

@Close-your-eyes
Copy link
Author

I am also having a hard time to find out where this is triggered. I think it is somewhere in the C++ routine which I am not familiar with. I wonder what exactly makes the function think this is not a valid FCS file.

@gfinak
Copy link
Member

gfinak commented May 11, 2023

What happens if you pass emptyValue = F to CytoML::flowjo_to_gatingset instead when reading the file?

@Close-your-eyes
Copy link
Author

Same error.

@SamGG
Copy link

SamGG commented May 12, 2023

Incidentally, a colleague was facing a similar error using read.flowSet(path = "somedir"). In fact, there was a non FCS hidden file in the dir, which leads to the same error. As read.flowset does not show the file being invalid, it tooks me a few minutes before finding it, as all FCS files were correctly read with read.FCS. Maybe the same problem...
Best,
Samuel

@Close-your-eyes
Copy link
Author

I tried to trace the error. So I isolated a respective FCS file and the related workspace. Hence I would say this is unlikely. Thanks for your input though.

@SamGG
Copy link

SamGG commented May 12, 2023

Your OS is MacOS, Linux or Windows?

@Close-your-eyes
Copy link
Author

MacOS

@SamGG
Copy link

SamGG commented May 12, 2023

I cannot test this OS.
I don't see why the FCS could be invalid. The raised error depends only checking the first bytes of the file. So very strange.
I would apply list.files() to the directory that contains the FCS files. I think this the same directory as the workspace file. It might be surprising.
What you could try is to add one of the following arguments to https://rdrr.io/bioc/CytoML/man/flowjo_to_gatingset.html():

  • specify the fcs_extension to be "\.fcs$" in case it is currently not strict enough
  • use subset to specify explicitly the FCS files to load (IIUC)
    Hope this help.

@Close-your-eyes
Copy link
Author

Thanks for your input I think I figured it out:
It may have been a malformatted special character in the $FIL-Keyword. Some system along the way must have turned an Ü into something different. When I changed the $FIL-Keyword without extraordinary characters it worked.

While additional keywords can be added to identify FCS files by flowjo_to_gatingset(), the $FIL keyword appears to be obligatory.

I thought I tried to fix the issue that way earlier but it did not help then. When I tried again it did help.

Sorry for disturbing you.

@SamGG
Copy link

SamGG commented May 17, 2023

That's OK to try helping as long as the helpers get some feedback in the end. It's good to keep a track in order to help if the case occurs again.
Your feedback really shows that only basic characters should be used from the very beginning, ie the acquisition.
Thanks for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants