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

Using FlowJo gating on pre-compensated, pre-transformed FCS files #146

Open
timmocking opened this issue Oct 19, 2022 · 5 comments
Open

Comments

@timmocking
Copy link

Hi all,

In my experiment I'm compensating and transforming individual FCS files using flowCore before aggregating these FCS files into one big concatenated flowframe using FlowSOM's AggregateFlowFrames. I want to gate this data in FlowJo and import this using flowjo_to_gatingset. However, I get the following error:

library(CytoML)

wsfile <- FILENAME
ws <- open_flowjo_xml(file=wsfile, options = 0, sample_names_from = "keyword" )
gs <- flowjo_to_gatingset(ws, name = 1, includeGates = T, path=path)
Error in (function (ws, group_id, subset, execute, path, cytoset, backend_dir,  : 
  please call buildHash() first to build the hash map for column index!

It should be noted that my files do not contain a spillover matrix (due to the aggregation) and are already transformed. I suspect that his has something to do with the error.

Is there some way to get to gating labels without applying trying to re-apply compensation and transformation FlowJo?

@gfinak
Copy link
Member

gfinak commented Oct 19, 2022

Not that I'm aware of a the moment. flowJo to gating set conversion was built for importing data analyzed using a standard widespread workflow from flowJo, it makes some assumptions about what that workflow is, including that that data has been transformed and compensated in flowJo.

@mikejiang
Copy link
Member

Your error message seems to be indicating something wrong with fcs files you feed to this converter, which could be due to the reason Greg mentioned. Is the fcs written by flowcore or flowjo? Feel free to share the reproducible example data for troubleshooting

@timmocking
Copy link
Author

The FCS file is written by FlowCore and is like I said pretty abnormal (e.g., no spillover matrix etc.) compared to a regular FCS file. Unfortunately I cannot share the file due some restrictions in this study. However, I think any FCS file generated by the AggregateFlowFrames function of FlowSOM would result in the same errors..

I managed to solve my issue by using execute=FALSE after which I wrote a small script to browse through the gating hierachy in order to get the correct labeling based on the leaf nodes. Do you know of any functions that can do the same thing? My implementation works but I would like to use something a bit less "hacky".

@mikejiang
Copy link
Member

maybe you can try to export fcs from flowjo, and use that together with wsp file to see if that works. I am not asking for the original data, any reproducible example will help us to further assist you

@SamGG
Copy link

SamGG commented Oct 22, 2022

Could you send directly to Mike a FCS with 20 events? I don't think this will reveal much of you study.

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

4 participants