-
Notifications
You must be signed in to change notification settings - Fork 14
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
support exporting clustering results to flowJo #45
Comments
Hi Mike,
This information isn't stored in the XML or the plugin nodes. It's
typically based on a derived parameter (such as some sort of a cluster id)
that lives in a separate file, which is merged-in with the corresponding
data file, and then gates are placed on the cluster id parameter to define
populations. The XML workspace (.wsp) file will describe what derived
parameters should be merged in with what FCS samples, and how the
populations are defined on those.
For you, the easiest may be to reverse-engineer the details from a plugin
that does that. For example,
1) Save a simple workspace.
2) Take for example the PhenoGraph plugin and run it on a population.
3) Delete the PhenoGraph node once the run has completed successfully. (You
don't need it, you only need the resulting phenograph cluster id derived
parameter and the gates placed around distinct values of that parameter)
4) Save the workspace as a new version.
5) Compare the workspaces saved in step 1 and 5, this should tell you how
to modify a workspace to specify that a CSV file with derived parameters
should be merged in as well as how to place gates on that derived parameter
to define populations. Also, look at the CSV file to figure out the details
of how to store the values of the derived parameter/cluster ids.
Hope that helps.
Best,
Josef
…On Thu, Aug 23, 2018, 1:44 PM Mike Jiang ***@***.***> wrote:
@jspidlen <https://github.com/jspidlen>, Does flowJo xml have a general
way to annotate the bool or integer event indices representing the cell
memberships produced by the clustering algorithm? We'd like to run some
in-house clustering method and store the cluster membership or labels in
GatingSet and then export to flowJo.
I know flowJo supports several specific plugins. Are these population
nodes generated by these plugins only meaningful for the existing
plugins?(Thus not suitable for storing results from other clustering
methods)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#45>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAaU2v0PHg4g2S3Ykqxb0FB1YjsyLo34ks5uTxRIgaJpZM4WKUbC>
.
|
Thanks, Josef, that's very helpful. |
mikejiang
pushed a commit
that referenced
this issue
Aug 28, 2018
mikejiang
pushed a commit
to RGLab/RProtoBufLib
that referenced
this issue
Aug 28, 2018
mikejiang
pushed a commit
to RGLab/flowWorkspace
that referenced
this issue
Aug 28, 2018
mikejiang
pushed a commit
to RGLab/cytolib
that referenced
this issue
Aug 28, 2018
Here is the preliminary results: load the gatingsetlibrary(flowWorkspace)
liibrary(CytoML)
dataDir <- system.file("extdata",package="flowWorkspaceData")
gs <- load_gs(list.files(dataDir, pattern = "gs_manual",full = TRUE))
gh <- gs[[1]]
params <- parameters(getGate(gh, "CD4"))
Rm("CD4", gs)
Rm("CD8", gs) run
|
Great, thanks Mike, glad it has worked!
Josef
…On Tue, Aug 28, 2018 at 2:01 PM Mike Jiang ***@***.***> wrote:
Here is the preliminary results:
load the gatingset
library(flowWorkspace)
liibrary(CytoML)
dataDir <- system.file("extdata",package="flowWorkspaceData")
gs <- load_gs(list.files(dataDir, pattern = "gs_manual",full = TRUE))
gh <- gs[[1]]
params <- parameters(getGate(gh, "CD4"))
Rm("CD4", gs)
Rm("CD8", gs)
run flowClust on cd3 parent
fr <- getData(gh, "CD3+")
library(flowClust)
res <- flowClust(fr, varNames = params, K = 2, nu = 1, trans = 0)
plot(res, data = fr)
[image: image]
<https://user-images.githubusercontent.com/1385649/44749660-0d698380-aac8-11e8-8eb0-74afc9dab8b4.png>
add clustering results as a factor vector
res <- Map(res)
res <- as.factor(res)
add(gh, res, parent = "CD3+", name = "flowclust")
plot(gs, "CD3+")
[image: image]
<https://user-images.githubusercontent.com/1385649/44749843-9a144180-aac8-11e8-809e-bbdd21702a5b.png>
getPopStats(gs[[1]])[5:6,c(1,3,5)]
openCyto.freq openCyto.count node1: 0.2998366 16336 flowclust_12: 0.6687407 36435 flowclust_2
output to flowJo
outFile <- "~/test.wsp"
GatingSet2flowJo(gs, outFile)> DerivedParameter: /home/wjiang2/CytoTrol_CytoTrol_1.fcs.flowclust.CD3+.EPA.csv
[1] "~/test.wsp"
load ws in flowJo
[image: image]
<https://user-images.githubusercontent.com/1385649/44750623-b4e7b580-aaca-11e8-98c2-0ce52f1558e6.png>
new parameter
[image: image]
<https://user-images.githubusercontent.com/1385649/44750699-e9f40800-aaca-11e8-8343-9fc0fb9d2ad5.png>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#45 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAaU2pc5bdEJXdbU_CfjhvHLoQlLbu_rks5uVa_GgaJpZM4WKUbC>
.
|
mikejiang
pushed a commit
that referenced
this issue
Aug 29, 2018
mikejiang
pushed a commit
to RGLab/cytolib
that referenced
this issue
Sep 24, 2018
mikejiang
pushed a commit
to RGLab/flowWorkspace
that referenced
this issue
Sep 24, 2018
mikejiang
pushed a commit
to RGLab/RProtoBufLib
that referenced
this issue
Sep 24, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@jspidlen, Does flowJo xml have a general way to annotate the bool or integer event indices representing the cell memberships produced by the clustering algorithm? We'd like to run some in-house clustering method and store the cluster membership or labels in
GatingSet
and then export to flowJo.I know flowJo supports several specific plugins. Are these population nodes generated by these plugins only meaningful for the existing plugins?(Thus not suitable for storing results from other clustering methods)
The text was updated successfully, but these errors were encountered: