deg_ovl {spatialHeatmap}R Documentation

Plot Overlap of Spatially-Enriched Genes Across Methods

Description

In spatial_enrich, the spatially-enriched genes are detected within each method (edgeR, limma, DESeq2, distinct). This function plot the overlap of these detected genes across methods in form of upset plot (Nils, 2019) and overlap matrix.

Usage

deg_ovl(
  lis.up.down,
  type = "up",
  plot = "upset",
  order.by = "degree",
  nintersects = 40,
  point.size = 3,
  line.size = 1,
  mb.ratio = c(0.6, 0.4),
  text.scale = 1.5
)

Arguments

lis.up.down

The list of all up- and down-regulated genes organized by methods (edgeR, limma, DESeq2, distinct), which comes from the returned value by spatial_enrich.

type

One of up (default) or down, which refers to up- or down-regulated genes.

plot

One of upset (default) or matrix, which corresponds to upset plot or overlap matrix in the output plot.

order.by

How the intersections in the matrix should be ordered by. Options include frequency (entered as "freq"), degree, or both in any order.

nintersects

Number of intersections to plot. If set to NA, all intersections will be plotted.

point.size

Size of points in matrix plot

line.size

Width of lines in matrix plot

mb.ratio

Ratio between matrix plot and main bar plot (Keep in terms of hundredths)

text.scale

Numeric, value to scale the text sizes, applies to all axis labels, tick labels, and numbers above bar plot. Can be a universal scale, or a vector containing individual scales in the following format: c(intersection size title, intersection size tick labels, set size title, set size tick labels, set names, numbers above bars)

Value

An upset plot or matrix plot, which displays overlap of spatially-enriched genes across methods.

Author(s)

Jianhai Zhang jzhan067@ucr.edu; zhang.jianhai@hotmail.com
Dr. Thomas Girke thomas.girke@ucr.edu

References

Cardoso-Moreira, Margarida, Jean Halbert, Delphine Valloton, Britta Velten, Chunyan Chen, Yi Shao, Angélica Liechti, et al. 2019. “Gene Expression Across Mammalian Organ Development.” Nature 571 (7766): 505–9 Nils Gehlenborg (2019). UpSetR: A More Scalable Alternative to Venn and Euler Diagrams for Visualizing Intersecting Sets. R package version 1.4.0. https://CRAN.R-project.org/package=UpSetR

See Also

spatial_enrich

Examples


data(lis.deg.up.down)
# Overlap of up-regulated brain-specific genes across methods.
deg_ovl(lis.deg.up.down, type='up', plot='upset')
deg_ovl(lis.deg.up.down, type='up', plot='matrix')
# Overlap of down-regulated brain-specific genes across methods.
deg_ovl(lis.deg.up.down, type='down', plot='upset')
deg_ovl(lis.deg.up.down, type='down', plot='matrix')
# See detailed examples in the function spatial_enrich.

[Package spatialHeatmap version 2.0.0 Index]