Plot basics

The base method, ggcyto, is deliberately designed to mirror the semantics of ggplot2, but with added support for cytoverse data structures and layers. Where there is no need for function to be extended for the cytoverse (like aes() for adding aesthetic mappings), the ggplot2 versions should function as expected.

ggcyto()

Plot cytometry data using the ggcyto API

`+`

overloaded '+' method for ggcyto

`%+%`

replace current cytometry data

as.ggplot()

It fortifies the data, fills some default settings and returns a regular ggplot object.

ggcyto_arrange()

Arrange a list of ggplot objects into gtable

Added layers

geom_gate and geom_overlay are layers for easy addition of the gate geometries and additional populations to ggcyto plots.

geom_gate()

Add a gate layer to a ggcyto plot.

transform() rescale_gate()

rescale methods for gates

geom_overlay()

Overlay a population on an existing ggcyto plot analogous to backgating.

geom_hvline()

Vertical or horizontal line.

geom_stats()

Add a popluation statistics layer to a ggcyto plot.

stat_position()

Compute the positions of the population statistics based on the geometic gate centroid for a ggcyto plot.

Added scales

A few additional scaling functions for determining axis scales and labels

labs_cyto()

Change axis labels and legend titles

axis_x_inverse_trans() axis_y_inverse_trans()

Display ggcyto axis labels using their raw values (as stored in the data structure)

scale_x_flowCore_fasinh() scale_y_flowCore_fasinh()

Add a flowCore inverse hyperbolic sine scale to the x or y axes of a ggcyto plot.

scale_x_flowjo_fasinh() scale_y_flowjo_fasinh()

Add a flowJo inverse hyperbolic sine scale to the x or y axes of a ggcyto plot.

flowCore_asinht_trans()

Inverse hyperbolic sine transformation(flowCore version).

scale_x_flowjo_biexp() scale_y_flowjo_biexp()

Add a flowJo biexponential scale to the x or y axes of a ggcyto plot.

scale_x_logicle() scale_y_logicle()

Add a logicle scale to the x or y axes of a ggcyto plot.

Programming with ggcyto

These functions provide tools for obtaining information from cytoverse data types to aid in constructing plots and also for explicitly generating plots

is.ggcyto()

Reports whether x is a ggcyto object

is.ggcyto_flowSet()

Reports whether x is a ggcyto_flowSet object

is.ggcyto_par()

Reports whether x is a ggcyto_par object

getFlowFrame()

extract flowFrame data structure from the given R object

compute_stats()

compute the statistics of the cell population defined by gates

marginalFilter()

Generate a marginal gate.

print(<ggcyto>) plot(<ggcyto>) show(<ggcyto>)

Draw ggcyto on current graphics device.

print(<ggcyto_GatingLayout>) show(<ggcyto_GatingLayout>)

print method for ggcyto_gate_layout class

Autoplot and fortify

autoplot() will quickly generate common default plots according for cytoverse data types and fortify() will turn cytoverse data types in to data.tables that can be used with ggplot2.

autoplot(<flowSet>) autoplot(<ncdfFlowList>) autoplot(<flowFrame>) autoplot(<GatingSetList>) autoplot(<GatingSet>) autoplot(<GatingHierarchy>)

Plot cytometry data in one or two dimension with the ggcyto package.

fortify(<flowFrame>) fortify(<flowSet>) fortify(<ncdfFlowList>) fortify(<GatingSetList>) fortify(<GatingSet>)

Convert a flowFrame/flowSet/GatingSet to a ggplot-compatible data.table

fortify(<polygonGate>)

Convert a polygonGate to a data.table useful for ggplot

fortify(<ellipsoidGate>)

Convert a ellipsoidGate to a data.table useful for ggplot

fortify(<rectangleGate>)

Convert a rectangleGate to a data.table useful for ggplot

fortify(<filterList>)

Convert a filterList to a data.table useful for ggplot

fortify_fs()

Fortify a model into flowSet object

Controlling ggcyto behavior

Specify the ggcyto settings/parameters for a plot or get the default settings

ggcyto_par_set()

Set some default parameters for ggcyto

ggcyto_par_default()

Return The default ggcyto settings