Plots a common volcano plot with p-value on the y- and logfold change on the x-axis.

plotDeaVolcano(
  object,
  across = getDefaultGrouping(object),
  across_subset = NULL,
  relevel = TRUE,
  method_de = NULL,
  color_up = "tomato",
  color_down = "steelblue",
  color_insignif = "lightgrey",
  pt_alpha = 0.9,
  pt_size = 1,
  threshold_logFC = 1,
  threshold_pval = 0.01,
  label_genes = 5,
  label_insignificant = TRUE,
  label_side = c("up", "down"),
  label_size = 1,
  nrow = NULL,
  ncol = NULL,
  scales = "fixed",
  use_pseudolog = FALSE,
  ...
)

plotDeaVolcano1v1(
  object,
  across,
  method_de = NULL,
  clrp = NULL,
  clrp_adjust = NULL,
  color_insignif = "lightgrey",
  pt_alpha = 0.9,
  pt_size = 1,
  threshold_logFC = 1,
  threshold_pval = 0.01,
  col_pval = "p_val_adj",
  label_genes = 5,
  label_size = 1,
  use_pseudolog = FALSE,
  limits = NULL,
  display_title = TRUE,
  title_size = 2,
  digits = 2,
  ...
)

Arguments

object

An object of class spata2.

across

Character value or NULL. Specifies the grouping variable of interest.

Use getGroupingOptions() to obtain all variable names that group the barcode spots of your object in a certain manner.

across_subset

Character vector or NULL. Specifies the particular groups of interest the grouping variable specified in argument across contains.

If set to NULL all of them are chosen. You can prefix groups you are NOT interested in with a '-'. (Saves writing if there are more groups you are interested in than groups you are not interested in.)

Use getGroupNames() to obtain all valid input options.

relevel

Logical value. If set to TRUE the input order of across_subset determines the order in which the groups of interest are displayed. Groups that are not included are dropped which affects the colors with which they are displayed.

method_de

Character value. Denotes the method to according to which the de-analysis is performed. Given to argument test.use of the Seurat::FindAllMarkers()-function. Run SPATA::dea_methods to obtain all valid input options.

color_up

Character value. Color of points that represent upregulated genes.

color_down

Character value. Color of poitns that represent downregulated genes.

color_insignif

Character value. Color of points that fall below the threshold set via argument threshold_pval.

pt_alpha

Numeric value. Specifies the degree of transparency of all points.

pt_size

Numeric value. Specifies the size of all points.

threshold_logFC

Numeric value. Denotes the threshold for the logFC. Genes with a logFC below are displayed as not significant.

threshold_pval

Numeric value. Denotes the threshold for the p-value. Genes with a p-value above are displayed as not significant.

label_genes

Specify which genes are labeled in the plot. If numeric, specifies the number of genes that are labeled. E.g. if label_genes = 5, the default, the top 5 genes are labeled. If character, specifies the genes that are supposed to be labeled by name. If NULL or FALSE, no genes are labeled.

label_insignificant

Logical value. If FALSE, insignifcant genes are not labeled.

label_side

Character vector. Decides on which side to label genes. Valid input are 'up' and/or 'down'.

nrow, ncol

Numeric values or NULL. Used to arrange multiple plots.

use_pseudolog

Logical value. If TRUE, avglogFC is transformed with log10. Requires package ggallin to be installed.

...

Used to absorb deprecated arguments or functions.

clrp

Character value. Specifies the color palette to be used to represent groups of discrete variables. Run validColorPalettes() to obtain valid input options.

clrp_adjust

Named character vector or NULL. If character, it adjusts the color palette that is used to represent the groups. Names of the input vector must refer to the group and the respective named element denotes the color with which to represent the group.

display_title

Logical value. If set to TRUE an informative title is displayed.

Value

A ggplot.