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

support exporting clustering results to flowJo #45

Open
mikejiang opened this issue Aug 23, 2018 · 4 comments
Open

support exporting clustering results to flowJo #45

mikejiang opened this issue Aug 23, 2018 · 4 comments

Comments

@mikejiang
Copy link
Member

@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)

@jspidlen
Copy link

jspidlen commented Aug 24, 2018 via email

@gfinak
Copy link
Member

gfinak commented Aug 24, 2018

Thanks, Josef, that's very helpful.

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
@mikejiang
Copy link
Member Author

mikejiang commented Aug 28, 2018

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

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

getPopStats(gs[[1]])[5:6,c(1,3,5)]
   openCyto.freq openCyto.count        node
1:     0.2998366          16336 flowclust_1
2:     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

new parameter

image

display cluster node flowclust_1

image

display it in different dimensions

image

@jspidlen
Copy link

jspidlen commented Aug 28, 2018 via email

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

3 participants