plotFACSExample: Plot FACS data using pretty plotting defaults

Description Usage Arguments Value

View source: R/plotFACSExample.R

Description

This is meant to produce a publication-quality FACS plot, but can also be used for exploratory analysis. Note that this function expects to draw GATED data - you'll need to run a raw ggcyto call (or make a new function for ungated) if you don't have a gate in mind.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
plotFACSExample(
  data,
  x,
  y,
  gate,
  bins = 30,
  fontFix = TRUE,
  flowFix = TRUE,
  biex = "none",
  ...
)

Arguments

data

A GatingHierarchy (for one plot) or GatingSet (for multiple). This function will facet over the GatingSet as expected.

x

A string specifying the parameter to plot on the X axis (either as channel or marker name)

y

A string specifying the parameter to plot on the Y axis. Currently, this function does not support histograms, may update in the future.

gate

A string specifying the gate (or vector of strings, for multiple gates). Call gs_pop_get_paths on your GatingSet/Hierarchy for available options.

bins

A numeric specifying the number of bins to pass to geom_density2d. Remember that this number should be WAY lower than what is passed to geom_hex.

fontFix

Boolean specifying whether the fonts should be shrunk down as appropriate for figure publication-size plots. Defaults to TRUE so you don't forget to do it!

flowFix

Boolean specifying whether the FACS plots should be cleaned up by removing the faceting strips and axis numbers. Defaults to TRUE so you don't forget to do it!

biex

A string specifying which axes ("x", "y", or "both") to apply a default flowjo biex transform to. Leave it as "none" if you want no trasform OR if you want to apply a non-default one manually after the fact with scale_._flowjo_biex().

...

Additional arguments to pass to geom_stats. "adjust", "position", "size", and "type" are all useful here. See stat_position for info about adjust and position.

Value

A ggplot object containing the plotted FACS data


NKInstinct/manuscriptIL23R documentation built on Jan. 1, 2022, 1 p.m.