Learn R Programming

flowWorkspace (version 3.16.0)

plotGate: Plot gates and associated cell population contained in a GatingHierarchy or GatingSet

Description

When applied to a GatingHierarchy,arrange is set as TRUE, then all the gates associated with it are plotted as different panel on the same page. If arrange is FALSE, then it plots one gate at a time. By default ,merge is set as TRUE, plot multiple gates on the same plot when they share common parent population and axis. When applied to a GatingSet, if lattice is TRUE,it plots one gate (multiple samples) per page , otherwise, one sample (with multiple gates) per page.

Usage

plotGate(x, y, ...)
"plotGate"(x, y, ...)
"plotGate"(x, y, ...)
"plotGate"(x, y, ...)

Arguments

x
GatingSet or GatingHierarchyobject
y
character the node name or full(/partial) gating path or numeric representing the node index in the GatingHierarchy. or missing which will plot all gates and one gate per page. It is useful for generating plots in a multi-page pdf. Nodes can be accessed with getNodes.
...
  • bool logical specifying whether to plot boolean gates.
  • arrange.main character The title of the main page of the plot. Default is the sample name. Only valid when x is GatingHierarchy
  • arrange logical indicating whether to arrange different populations/nodes on the same page via arrangeGrob call.
  • merge logical indicating whether to draw multiple gates on the same plot if these gates share the same parent population and same x,y dimensions/parameters;
  • projections list of character vectors used to customize x,y axis. By default, the x,y axis are determined by the respective gate parameters. The elements of the list are named by the population name or path (see y). Each element is a pair of named character specifying the channel name(or marker name) for x, y axis. Short form of channel or marker names (e.g. "APC" or "CD3") can be used as long as they can be uniquely matched to the dimentions of flow data. For example, projections = list("lymph" = c(x = "SSC-A", y = "FSC-A"), "CD3" = c(x = "CD3", y = "SSC-A"))
  • par.settings list of graphical parameters passed to lattice;

  • gpar list of grid parameters passed to grid.layout;

  • lattice logical deprecated;

  • formula formula a formula passed to xyplot function of flowViz, by default it is NULL, which means the formula is generated according to the x,y parameters associated with gate.

  • cond character the conditioning variable to be passed to lattice plot.

  • overlayNode names. These populations are plotted on top of the existing gates(defined by y argument) as the overlaid dots.
  • overlay.symbolA named (lattice graphic parameter) list that defines the symbol color and size for each overlaid population. If not given, we automatically assign the colors.
  • keyLattice legend paraemter for overlay symbols.

  • default.y character specifiying y channel for xyplot when plotting a 1d gate. Default is "SSC-A" and session-wise setting can be stored by 'flowWorkspace.par.set("plotGate", list(default.y = "FSC-A"))'

  • type character either "xyplot" or "densityplot". Default is "xyplot" and session-wise setting can be stored by 'flowWorkspace.par.set("plotGate", list(type = "xyplot"))'

  • fitGate used to disable behavior of plotting the gate region in 1d densityplot. Default is FALSE and session-wise setting can be stored by 'flowWorkspace.par.set("plotGate", list(fitGate = FALSE))'

  • strip ligcal specifies whether to show pop name in strip box,only valid when x is GatingHierarchy

  • raw.scale logical whether to show the axis in raw(untransformed) scale. Default is TRUE and can be stored as session-wise setting by 'flowWorkspace.par.set("plotGate", list(raw.scale = TRUE))'
  • xlim, ylim character can be either "instrument" or "data" which determines the x, y axis scale either by instrument measurement range or the actual data range. or numeric which specifies customized range. They can be stored as session-wise setting by 'flowWorkspace.par.set("plotGate", list(xlim = "instrument"))'

  • ...

    path A character or numeric scalar passed to getNodes method (used to control how the gating/node path is displayed)

    ... The other additional arguments to be passed to xyplot.

Value

a trellis object if arrange is FALSE,

References

http://www.rglab.org/

Examples

Run this code
## Not run: 
# projections <- list("cd3" = c(x = "cd3", y = "AViD")
#                     , "cd4" = c(x = "cd8", y = "cd4")
#                     , "cd4/IL2" = c(x = "IL2", y = "IFNg")
#                     , "cd4/IFNg" = c(x = "IL2", y = "IFNg")
#                 )
# plotGate(gh, c("cd3", "cd4", "cd4/IL2", "cd4/IFNg"), path = "auto", projections = projections, gpar = c(nrow = 2))
# 
# ## End(Not run)
## Not run: 
# 	#G is a GatingHierarchy
# 	plotGate(G,getNodes(G)[5]);#plot the gate for the  fifth node
# ## End(Not run)

Run the code above in your browser using DataLab