spotPlot: Generate Spot Plot

View source: R/plot.R

spotPlotR Documentation

Generate Spot Plot

Description

Generate a spot barplot or dotplot.

Usage

spotPlot(
  interact.strength,
  interact.pval,
  which.cell = NULL,
  which.gene = NULL,
  aggregate = c("none", "row", "column"),
  counted = FALSE,
  color = "RdBu",
  color.bins = 7,
  type = c("dot", "bar"),
  order = FALSE,
  order.dist = "minkowski",
  p = 1,
  filter = FALSE,
  low.cutoff = -Inf,
  high.cutoff = Inf,
  dot.scale = 8,
  plot.y.axis = TRUE,
  fix.y.axis = TRUE,
  do.return = FALSE
)

Arguments

interact.strength

Interaction strength matrix.

interact.pval

Interaction p-value matrix.

which.cell

Interacting cell type name or index to plot. Default is NULL.

which.gene

Interacting gene name or index to plot. Default is NULL.

aggregate

Type of aggregation used.

  • row, aggregated by row (Default).

  • column, aggregated by column

  • none, no aggregation.

counted

Aggregate interactions counts instead of strengths. Default is FALSE.

color

Color palette name. Default is "RdBu" (reversed order), high values are in blue and low values in red See details brewer.pal.

color.bins

Number of differen colors in pallete. Default is 7. See detail brewer.pal.

type

Types of plot. Default is barplot.

  • dot, dotplot or bertin plot (Default).

  • bar, barplot.

order

Whether to order the input data. Default is TRUE. See details seriate.

order.dist

Distance measure to be used. Default is "minkowski". See details dist.

p

Power of Minkowski distance Default is 1, aka Manhattan distance. See details dist.

filter

Whether to filter the input data based on low.cutoff and high.cutoff. Default is FALSE.

low.cutoff

Lower cutoff bound below which will be removed. Default is negative infinity.

high.cutoff

Upper cutoff bound above which will be removed. Default is positive infinity.

dot.scale

Scale the size of the dots. Default is 8.

plot.y.axis

Whether to show y axis for each barplot. Default is TRUE.

fix.y.axis

Whether to fix the all barplot ticks or use the relative ticks for each barplot. Default is TRUE.

do.return

Whether to return the data used to plot. Default is FALSE.

Value

A ggplot object or a list with strength and p value data used to generate the plot.


stevexniu/scMatchmaker documentation built on June 2, 2022, 12:35 p.m.