1
1
Entering edit mode
@ekaterina-terskikh-12710
Last seen 5.7 years ago
Switzerland/Zurich/University of Zurich

Hi,

I recently started to work with flowworkspace package in R and have the constant problem.

While opening the xml file, which I exported from FlowJo it gives me errow:

ws <- openWorkspace(wsfile)

Error in xpathApply(x, "/Workspace", function(x) xmlGetAttr(x, "version"))[[1]] :
subscript out of bounds

I would really appreciate if someone could help me to find out the mistake.

Best,

Ekaterina

flowworkspace xml R flowjo • 1.7k views
0
Entering edit mode
Abby Moore • 0
@abby-moore-22382
Last seen 3.1 years ago
University of Georgia

This is an old post that I came across when I encountered the same error. I'm sharing my solution in case it helps someone else avoid a simple mistake.

In the above issue, it appears that the user is trying to read-in a .xml with the function openWorkspace from the flowWorkspace package, which has now moved to the CytoML package. Within this package, there are a couple options for opening workspace data, namely open_flowjo_xml and open_diva_xml.

In my case, I was trying to read-in public data with the open_flowjo_xml function when I received the above error:

flowDataPath <- "~/my_dir"
wsfile <- list.files(flowDataPath, pattern="Fig_1_expt.xml",full = TRUE)
path <-  open_flowjo_xml(wsfile)


The error was produced because my files were actually produced with Diva, not FlowJo, so the following worked:

flowDataPath <- "~/my_dir"
wsfile <- list.files(flowDataPath, pattern="Fig_1_expt.xml",full = TRUE)
path <- open_diva_xml(wsfile)