flowCore workflows and logical operations on gate views
1
0
Entering edit mode
@alessandro-di-cara-4470
Last seen 10.2 years ago
Dear List, I am using the flowCore and flowViz packages to perform some flow cytometry analyses on clinical data. I find the packages extremely useful. Some of the gating strategies I have to implement are quite tricky and I would like to use the "Work Flows" system described in the flowCore reference manual. So far, I find this approach very efficient, not only for accessing the intermediate analysis steps of my analysis but also for solving memory issues when loading many FCS files. I am stuck with the implementation of logical operations on the gate views of a workflow For example let's say I have a workflow object "wf" with two gate views wf[["Lymphocytes+"]] wf[["Monocytes-"]] I would like to apply a filter on cells that are in the wf[["Lymphocytes+"]] OR wf[["Monocytes-"]] gate views. Can this be done using the work flows system? Would these operations be reflected in the work flow graph plot ? Thank you in advance for you help All the best, Alessandro Di Cara / / [[alternative HTML version deleted]]
graph flowCore flowViz graph flowCore flowViz • 1.9k views
ADD COMMENT
0
Entering edit mode
Chao-Jen Wong ▴ 580
@chao-jen-wong-3603
Last seen 9.9 years ago
USA/Seattle/Fred Hutchinson Cancer Reseā€¦
Hi, Alessandro, What kind of filter you are going to apply to wf[["Lymphocytes+"]] or wf[["Monocytes-"]]? There are four types of actions you can apply to a work flow object. They are compensation, transformation (logicle, asinh, and etc.), normalization, and gating/filtering (rectangleGate, rangeGate, norm2Filter, kmeansFilter and etc.) actions. As long as your filtering actions are in these categories, and then of course you can apply them to any of the gate views (by specifying the "parent" argument). There are some extra gating/filtering actions implemented in the flowStats packages that you might find useful. Chao-Jen ----- Original Message ----- From: "Alessandro Di Cara" <rmailing@di-cara.com> To: bioconductor at r-project.org Sent: Thursday, February 3, 2011 2:38:13 PM Subject: [BioC] flowCore workflows and logical operations on gate views Dear List, I am using the flowCore and flowViz packages to perform some flow cytometry analyses on clinical data. I find the packages extremely useful. Some of the gating strategies I have to implement are quite tricky and I would like to use the "Work Flows" system described in the flowCore reference manual. So far, I find this approach very efficient, not only for accessing the intermediate analysis steps of my analysis but also for solving memory issues when loading many FCS files. I am stuck with the implementation of logical operations on the gate views of a workflow For example let's say I have a workflow object "wf" with two gate views wf[["Lymphocytes+"]] wf[["Monocytes-"]] I would like to apply a filter on cells that are in the wf[["Lymphocytes+"]] OR wf[["Monocytes-"]] gate views. Can this be done using the work flows system? Would these operations be reflected in the work flow graph plot ? Thank you in advance for you help All the best, Alessandro Di Cara / / [[alternative HTML version deleted]] _______________________________________________ Bioconductor mailing list Bioconductor at r-project.org https://stat.ethz.ch/mailman/listinfo/bioconductor Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- Chao-Jen Wong Program in Computational Biology Division of Public Health Sciences Fred Hutchinson Cancer Research Center 1100 Fairview Avenue N., M1-B514 PO Box 19024 Seattle, WA 98109 206.667.4485 cwon2 at fhcrc.org
ADD COMMENT
0
Entering edit mode
Dear Chao-Jen, Thanks for the prompt reply. At the moment I am planning to use a simple rectangle gate. What I don't yet understand is how I can specify as the "parent" gateview, the union of two gateviews in the workflow. If at all possible. I've tried to come up with a toy example. I don't pretend it makes any biological sense, but hopefully it will demonstrate what I am trying to achieve. As you will see I am stuck with the implementation of "gateZ" at the end of the script. Any suggestions welcome. Thanks in advance Alessandro ############################## library(flowCore) library(flowViz) library(flowUtils) library(flowStats) data(GvHD) myFCS <- GvHD[[1]] # Get a sample Flow Frame # Create Gates gateA <- rectangleGate(`FSC-H`=c(330,600),`SSC-H`=c(0,200),filterId="GateA") gateB <- rectangleGate(`FSC-H`=c(150,320),`SSC-H`=c(0,200),filterId="GateB") #Initialize workflow and apply transformations # to non(FSC,SSC) parameters wf <- workFlow(myFCS) t.logicle <- transformList(from=colnames(myFCS)[4:7],logicleTransform(),transforma tionId="logicle") add(wf,t.logicle) # Applt gateA and gateB add(wf,gateA,parent="logicle") add(wf,gateB,parent="logicle") # Use lymphGate to the positive selections of gate A and gate B gateC <- lymphGate(Data(wf[['GateA+']]), channels=c("SSC-H", "FSC-H"), eval=FALSE, filterId="GateC") add(wf,gateC$n2gate,parent="GateA+") gateD <- lymphGate(Data(wf[['GateB+']]), channels=c("SSC-H", "FSC-H"), eval=FALSE, filterId="GateD") add(wf,gateD$n2gate,parent="GateB+") # Plot the diagram (very cool feature btw) plot(wf) # Apply GateZ to the UNION of cells in GateD+ and GateC+ gateZ <- rectangleGate(`FL2-H`=c(1.6,5)) ## ## I am stuck HERE :0) ## ?? add(wf,gateZ ,parent=(GateD+ | GateC+)) ?? ## ############################## On Fri, 4 Feb 2011 13:41:07 -0800 (PST), "Wong, Chao-Jen" <cwon2 at="" fhcrc.org=""> wrote: > Hi, Alessandro, > > What kind of filter you are going to apply to wf[["Lymphocytes+"]] or > wf[["Monocytes-"]]? There are four types of actions you can apply to > a work flow object. They are compensation, transformation (logicle, > asinh, and etc.), normalization, and gating/filtering (rectangleGate, > rangeGate, norm2Filter, kmeansFilter and etc.) actions. As long as > your filtering actions are in these categories, and then of course > you > can apply them to any of the gate views (by specifying the "parent" > argument). There are some extra gating/filtering actions implemented > in the flowStats packages that you might find useful. > > > Chao-Jen > > ----- Original Message ----- > From: "Alessandro Di Cara" <rmailing at="" di-cara.com=""> > To: bioconductor at r-project.org > Sent: Thursday, February 3, 2011 2:38:13 PM > Subject: [BioC] flowCore workflows and logical operations on gate > views > > Dear List, > > I am using the flowCore and flowViz packages to perform some flow > cytometry analyses on clinical data. > I find the packages extremely useful. > > Some of the gating strategies I have to implement are quite tricky > and I > would like to use the "Work Flows" system > described in the flowCore reference manual. So far, I find this > approach > very efficient, not only for accessing the intermediate analysis > steps > of my analysis but also for solving memory issues when loading many > FCS > files. > > I am stuck with the implementation of logical operations on the gate > views of a workflow > > For example let's say I have a workflow object "wf" with two gate > views > > wf[["Lymphocytes+"]] > wf[["Monocytes-"]] > > I would like to apply a filter on cells that are in the > wf[["Lymphocytes+"]] OR wf[["Monocytes-"]] gate views. > > Can this be done using the work flows system? Would these operations > be > reflected in the work flow graph plot ? > > Thank you in advance for you help > > All the best, > > Alessandro Di Cara > / > > / > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD REPLY
0
Entering edit mode
Alessandro, # Apply GateZ to the UNION of cells in GateD+ and GateC+ gateZ <- rectangleGate(`FL2-H`=c(1.6,5)) ## ## I am stuck HERE :0) ## ?? add(wf,gateZ ,parent=(GateD+ | GateC+)) ?? ## ############################## You have to apply gateZ to GateD+ and GateC- separately. Every time when you add an action to a workFlow, it create a couple flowSet instances. In plot(wf), each node is a flowSet instance, and you cannot "union" the cells in two different objects. > gateZ <- rectangleGate(`FL2-H`=c(1.6,5), filterId="gateZonD") > add(wf,gateZ, parent="GateD+") > gateZ <- rectangleGate(`FL2-H`=c(1.6,5), filterId="gateZonC") > add(wf,gateZ, parent="GateC+") > plot(wf) On Fri, 4 Feb 2011 13:41:07 -0800 (PST), "Wong, Chao-Jen" <cwon2 at="" fhcrc.org=""> wrote: > Hi, Alessandro, > > What kind of filter you are going to apply to wf[["Lymphocytes+"]] or > wf[["Monocytes-"]]? There are four types of actions you can apply to > a work flow object. They are compensation, transformation (logicle, > asinh, and etc.), normalization, and gating/filtering (rectangleGate, > rangeGate, norm2Filter, kmeansFilter and etc.) actions. As long as > your filtering actions are in these categories, and then of course > you > can apply them to any of the gate views (by specifying the "parent" > argument). There are some extra gating/filtering actions implemented > in the flowStats packages that you might find useful. > > > Chao-Jen > > ----- Original Message ----- > From: "Alessandro Di Cara" <rmailing at="" di-cara.com=""> > To: bioconductor at r-project.org > Sent: Thursday, February 3, 2011 2:38:13 PM > Subject: [BioC] flowCore workflows and logical operations on gate > views > > Dear List, > > I am using the flowCore and flowViz packages to perform some flow > cytometry analyses on clinical data. > I find the packages extremely useful. > > Some of the gating strategies I have to implement are quite tricky > and I > would like to use the "Work Flows" system > described in the flowCore reference manual. So far, I find this > approach > very efficient, not only for accessing the intermediate analysis > steps > of my analysis but also for solving memory issues when loading many > FCS > files. > > I am stuck with the implementation of logical operations on the gate > views of a workflow > > For example let's say I have a workflow object "wf" with two gate > views > > wf[["Lymphocytes+"]] > wf[["Monocytes-"]] > > I would like to apply a filter on cells that are in the > wf[["Lymphocytes+"]] OR wf[["Monocytes-"]] gate views. > > Can this be done using the work flows system? Would these operations > be > reflected in the work flow graph plot ? > > Thank you in advance for you help > > All the best, > > Alessandro Di Cara > / > > / > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor -- Chao-Jen Wong Program in Computational Biology Division of Public Health Sciences Fred Hutchinson Cancer Research Center 1100 Fairview Avenue N., M1-B514 PO Box 19024 Seattle, WA 98109 206.667.4485 cwon2 at fhcrc.org
ADD REPLY

Login before adding your answer.

Traffic: 944 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6