multi_dittoPlot: Generates dittoPlots for multiple features.

Description Usage Arguments Details Value Slight tweaks to dittoPlot defaults Author(s) See Also Examples

View source: R/multi_plotters.R

Description

Generates dittoPlots for multiple features.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
multi_dittoPlot(
  object,
  vars,
  group.by,
  ncol = 3,
  nrow = NULL,
  main = "var",
  ylab = NULL,
  list.out = FALSE,
  OUT.List = NULL,
  ...,
  xlab = NULL,
  data.out = FALSE,
  do.hover = FALSE,
  legend.show = FALSE
)

Arguments

object

A Seurat, SingleCellExperiment, or SummarizedExperiment object.

vars

c("var1","var2","var3",...). A vector of gene or metadata names from which to generate the separate plots

group.by

String representing the name of a metadata to use for separating the cells/samples into discrete groups.

ncol, nrow

Integer or NULL. How many columns or rows the plots should be arranged into.

main, ylab

String which sets whether / how plot titles or y-axis labels should be added to each individual plot

  • When set to "var", the vars names alone will be used.

  • When set to "make", the default dittoPlot behavior will be observed: For y-axis labels, gene vars will become "'var' expression". Equivalent to "var" for main.

  • When set as any other string, that string will be used as the title / y-axis label for every plot.

  • When set to NULL, titles / axes labels will not be added.

list.out

Logical. (Default = FALSE) When set to TRUE, a list of the individual plots, named by the vars being shown in each, is output instead of the combined multi-plot.

OUT.List

Deprecated. Use list.out

..., xlab, data.out, do.hover, legend.show

other paramters passed along to dittoPlot.

Details

Given multiple 'var' parameters to vars, this function creates a dittoPlot for each one, with minor defaulting tweaks (see below).

By default, these dittoPlots are arranged into a grid. Alternatively, if list.out is set to TRUE, they are output as a list with each plot named as the vars being shown.

All parameters that can be adjusted in dittoPlot can be adjusted here, but the only input that will change between plots is the var.

Value

A set of dittoPlots either arranged into a grid (default), or output as a list.

Slight tweaks to dittoPlot defaults

Author(s)

Daniel Bunis

See Also

dittoPlot for the single plot version of this function and details on all accepted inputs.

dittoDotPlot and dittoPlotVarsAcrossGroups to show, in a single plot, per-group summaries of the values for multiple vars.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
example(importDittoBulk, echo = FALSE)
genes <- getGenes(myRNA)[1:4]

multi_dittoPlot(myRNA,
    vars = c("gene1", "gene2", "gene3", "gene4"),
    group.by = "clustering")

#To make it output a grid that is 2x2, to add y-axis labels
# instead of titles, and to show legends...
multi_dittoPlot(myRNA, c("gene1", "gene2", "gene3", "gene4"), "clustering",
    nrow = 2, ncol = 2,           #Make grid 2x2 (only one of these needed)
    main = NULL, ylab = "make",   #Add y axis labels instead of titles
    legend.show = TRUE)           #Show legends

# Output as list instead
multi_dittoPlot(myRNA, c("gene1", "gene2", "gene3", "gene4"), "clustering",
    list.out = TRUE)

dittoSeq documentation built on April 17, 2021, 6:01 p.m.