Skip to contents

Plot either old, new or total RNA of a gene in a row, per condition.

Usage

PlotGeneGroupsPoints(
  data,
  gene,
  group = "Condition",
  mode.slot = DefaultSlot(data),
  columns = NULL,
  log = TRUE,
  show.CI = FALSE,
  aest = NULL,
  size = 2,
  transform = NULL
)

Arguments

data

the grandR object to get the data to be plotted from

gene

the gene to plot

group

how to group the genes (default: Condition)

mode.slot

the mode.slot of the grandR object to get the data from

columns

which columns (i.e. samples or cells) to show (see details)

log

show the y axis in log scale

show.CI

show confidence intervals; one of TRUE/FALSE (default: FALSE)

aest

parameter to set the visual attributes of the plot

size

the point size used for plotting; overridden if size is defined via aest

transform

function that is called on the data frame directly before plotting (can be NULL)

Value

a ggplot object.

Details

The value of the aest parameter must be an Aesthetic mapping as generated by aes.

To refer to data slots, the mode.slot syntax can be used: Each name is either a data slot, or one of (new,old,total) followed by a dot followed by a slot. For new or old, the data slot value is multiplied by ntr or 1-ntr. This can be used e.g. to obtain the new counts.

The table used for plotting is the table returned by GetData with coldata set to TRUE, i.e. you can use all names from the Coldata table for aest.

By default, aest is set to aes(color=Condition,shape=Replicate) (if both Condition and Replicate are names in the Coldata table).

Columns can be given as a logical, integer or character vector representing a selection of the columns (samples or cells). The expression is evaluated in an environment having the Coldata, i.e. you can use names of Coldata as variables to conveniently build a logical vector (e.g., columns=Condition=="x").