RGLab / flowWorkspace

flowWorkspace
GNU Affero General Public License v3.0
44 stars 21 forks source link

Opening FlowJo V10 WSP with no Gates #264

Closed dubayc2 closed 4 years ago

dubayc2 commented 5 years ago

Hello,

We are moving from FlowJo (FJ) V9 to V10. To do this we are creating FJ V10 workspaces with the set of FCS files we want to apply flowDensity (etc.) to for automated gating.

When we go to open these new FJ V10 .WSP files, they appear to open with flowWorkspace: **

ws <- openWorkspace("NIRT03 W0 020618 Tcell.wsp") ws FlowJo Workspace Version 20.0 File location: . File name: NIRT03 W0 020618 Tcell.wsp Workspace is open. Groups in Workspace Name Num.Samples 1 All Samples 3 getSamples(ws) sampleID name count 1 1 WBA 020618_T-Cell NIRT03 D0_T-Cell FM3_C02_001.fcs 99774 2 2 WBA 020618_T-Cell NIRT03 D0_T-Cell Test 1_C03_002.fcs 107801 3 3 WBA 020618_T-Cell NIRT03 D0_T-Cell Test 2_C04_003.fcs 89910 pop.counts 1 0 2 0 3 0 **

However when we look at gating (the list of groups of samples is blank):

**

gs <- parseWorkspace(ws,name = 1) Error in .preprocessor(obj, ...) : Invalid sample group index. gs <- parseWorkspace(ws) Choose which group of samples to import: : Selection: 1 Enter an item from the menu, or 0 to exit **

If we apply a single gate (any gate) to the .WSP and re-save it, flowWorkspace loads the .WSP.

Is there any reason not to have flowWorkspace just allow WSP Workspaces with zero gates to just load everything to a root 'gate'?

Thank you in advance for your time responding to this query...

Christopher

Other Info: R version 3.5.1 (2018-07-02) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 14.04.5 LTS flowWorkspace "3.30.0"

gfinak commented 5 years ago

I think we can make this happen.

dubayc2 commented 5 years ago

Cool!

Just one more edge case :0

Thanks...

Christopher

Christopher Dubay, PhD Biomedical Informatics Laboratory of Molecular and Tumor Immunology Earle A. Chiles Research Institute Providence Cancer Center 4805 NE Glisan St.- 2N57 Portland, OR 97213 USA T: (503) 215-7981 F: (503) 215-6841

Christopher.dubay@providence.orgmailto:Christopher.dubay@providence.org

From: Greg Finak [mailto:notifications@github.com] Sent: Thursday, November 01, 2018 3:40 PM To: RGLab/flowWorkspace flowWorkspace@noreply.github.com Cc: Dubay, Christopher J Christopher.Dubay@providence.org; Author author@noreply.github.com Subject: Re: [RGLab/flowWorkspace] Opening FlowJo V10 WSP with no Gates (#264)

I think we can make this happen.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_RGLab_flowWorkspace_issues_264-23issuecomment-2D435211063&d=DwMCaQ&c=KoC5GYBOIefzxGAm2j6cjFf-Gz7ANghQIP9aFG9DuBs&r=SwwENx4hiyqKhcT1amceL9WbM3_fS_XzSxyXuFD3Rao&m=OROCSdYmYu6uZUParJFDGN26GerlbEuRgeAz7oFkh_0&s=w1GB7SlqHWstPgD916VFfeJdIlnqF1kLMvz6-c5NmSg&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ANdef7iT3SJnHuJpUp3ys5qN3QpPxQjIks5uq3gygaJpZM4YJlaj&d=DwMCaQ&c=KoC5GYBOIefzxGAm2j6cjFf-Gz7ANghQIP9aFG9DuBs&r=SwwENx4hiyqKhcT1amceL9WbM3_fS_XzSxyXuFD3Rao&m=OROCSdYmYu6uZUParJFDGN26GerlbEuRgeAz7oFkh_0&s=KmsyjjvIBdyX9c3VYjWdJ2l9lQBVZl17qgLpSfmHCfs&e=.


This message is intended for the sole use of the addressee, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the addressee you are hereby notified that you may not use, copy, disclose, or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete this message.

deborah-chasman commented 4 years ago

I encountered the same issue -- trying to import a workspace with no gates and getting the error message "Error in .preprocessor(obj, ...) : Invalid sample group index." I figured out after reading this post and the source code that the error message means that the sample group table emptied out when it filtered out the ungated files. So the fix is to give parseWorkspace the argument "requiregates=F".

Would it be possible to make the error message more descriptive? Something like "Workspace contains no gated files. Perhaps you meant to use requiregates=F?" This would have been a big help for me as it's the first time I've worked with Flowjo workspaces.

Thanks a lot for considering!

mikejiang commented 4 years ago

Parsing samples that has no gates is now supported in latest CytoML trunk by switching on include_empty_tree flag. e.g.

library(CytoML)
wsFile <- file.path(path, "no-gate.wsp")
ws <- open_flowjo_xml(wsFile)
gs <- flowjo_to_gatingset(ws, name = 1, include_empty_tree = TRUE)
gs_get_pop_paths(gs)
[1] "root"