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

CytoML Xml File Parsing Issues #137

Open
upatel2 opened this issue Sep 28, 2021 · 8 comments
Open

CytoML Xml File Parsing Issues #137

upatel2 opened this issue Sep 28, 2021 · 8 comments

Comments

@upatel2
Copy link

upatel2 commented Sep 28, 2021

Hi,

I am working closely with .xml and .fcs files for research regarding extracting gates from a particular XML file.

I have followed your tutorial on GitHub regarding parsing a DIVA workspace file (i.e., extdata/diva/PE_2.xml) and it seems to work fine for me.
However, when I try to parse a local XML file that I have on my local drive, I get this error:

Diva Workspace Version Version 8.0.1
File location: .
File name: Patient4Template.xml
Workspace is open.

Groups in Workspace
Error in names(x) <- value :
'names' attribute [2] must be the same length as the vector [1]

I am not sure why I am getting this error and I can't seem to solve this particular issue.

Also, I wanted to ask another question regarding how your XML file has the correlated FCS file details. The XML file I have does not contain any fcs file detail, so is it still possible to extract gates from it? Or is that not possible?

It would be great if you can help me with understanding the issue I am having.

Thank You very much,
Utsav

@mikejiang
Copy link
Member

diva_to_gatingset function has an argument worksheet , can be set to either "normal" or "global". The latter use the global worksheet as the template, thus doesn't require fcs info.

@upatel2
Copy link
Author

upatel2 commented Sep 30, 2021

@mikejiang Thank you for clarifying that.
I was actually also encountering another issue. I am not sure whether this is due to my XML file or whether it is about errors in my code.

library(flowWorkspace)
library(flowWorkspaceData)
library(CytoML)
workspace <- ('C:/Users/utsav/Documents/Patient4Template.xml')
qw <- open_diva_xml(workspace)
qw
Diva Workspace Version Version 8.0.1
File location: C:/Users/utsav/Documents
File name: Patient4Template.xml
Workspace is open.

Groups in Workspace
Error in names(x) <- value :
'names' attribute [2] must be the same length as the vector [1]

Are you able to please help me find a way through this?

Thank You!

@mikejiang
Copy link
Member

Please provide a reproducible example for me to troubleshoot

@upatel2
Copy link
Author

upatel2 commented Oct 5, 2021

@mikejiang Hi Mike,

As the file I am working with is for research, I have asked my supervisors if I can send this to you. Should they respond yes, I can email it to you.

Can you please share your email until I wait for their response?

Thank You!

@mikejiang
Copy link
Member

mike@ozette.ai

@mikejiang
Copy link
Member

mikejiang commented Oct 16, 2021

sorry it took a while for me to get back to you. Looks like the current diva parser does require the normal worksheet that is associated with some fcs file to be present in order to proceed the global template worksheet parsing.
i.e. it expects something like
image
and yours seem to be the pure template that doesn't have data_filename field.

I am not sure if we have the bandwidth or resource to add this support. The workaround for you is to create some dummy normal worksheet to associate with one fcs in diva software and then re-export the xml so that diva parser will not error out.

@upatel2
Copy link
Author

upatel2 commented Oct 19, 2021 via email

@mikejiang
Copy link
Member

No. You don't want to manually edit this XML. This file is supposed to be generated and exported from diva software. What you need to do is to use diva software to recreate the analysis by adding both global and normal worksheet the normal worksheet should be associated with a particular fcs file.So that this will get our diva parser working properly. But real gates can be still stored in global worksheet as a template

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

2 participants