Takes four gene sets and visualizes the relative expression of these four gene sets for every barcode by computing it's respective x- and y- coordinates in the state plot. (See details.)

  • plotFourStates() Takes the spata-object as the starting point and creates the necessary data.frame from scratch according to additional parameters.

  • plotFourStates2() Takes a data.frame as input.

plotFourStates(
  object,
  of_sample = "",
  states,
  color_to = NULL,
  method_gs = "mean",
  average_genes = FALSE,
  pt_size = 1.5,
  pt_alpha = 0.9,
  pt_clrsp = "inferno",
  pt_clrp = "milo",
  display_labels = TRUE,
  assign = FALSE,
  assign_name,
  verbose = TRUE
)

plotFourStates2(
  data,
  states,
  color_to = NULL,
  pt_size = 1.5,
  pt_alpha = 0.9,
  pt_clrsp = "inferno",
  pt_clrp = "milo",
  display_labels = TRUE
)

Arguments

states

The gene sets defining the four states specified as a character vector of length 4.

color_to

The variable to be displayed by color:

  • Gene set as a single character value. Must be in getGeneSets()

  • Genes as a character vector. If more than one gene is specified the average expression of those genes will be calculated and displayed. Must be in getGenes()

  • Feature as a single character value. Must be in getFeaturenNames()

pt_size

The size of the points specified as a single numeric value.

pt_alpha

The transparency of the points specified as single numeric value.

pt_clrsp

The color spectrum to be used if the specified variable displayed by color is continuous. Run all_colorspectra() to see valid input..

pt_clrp

The color panel to be used if the specified variable displayed by color is categorical/discrete. Run all_colorpanels() to see valid input.

verbose

Logical. If set to TRUE informative messages regarding the computational progress will be printed.

(Warning messages will always be printed.)

data

A data.frame containing at least the variables barcodes, states.. Whereby the states-variables contain the respective expression values of the specified gene sets.

Value

Returns a ggplot-object that can be additionally customized according to the rules of the ggplot2-framework.