[BioC] flowCore workflows and logical operations on gate views

rmailing at di-cara.com rmailing at di-cara.com
Mon Feb 7 18:08:02 CET 2011


 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(),transformationId="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



More information about the Bioconductor mailing list