mdsplot: Create sample-level MDS plot

Description Usage Arguments Value Author(s) Examples

View source: R/mdsplot.R

Description

Multi-Dimensional Scaling (MDS) plot computed across median marker expression in each sample or metadata grouping.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
mdsplot(
  data,
  grouping = "group",
  feature = NULL,
  markers = NULL,
  colkey = NULL,
  legendPosition = "right",
  legendLabSize = 12,
  legendIconSize = 5,
  xlim = NULL,
  ylim = NULL,
  labSize = 3,
  labhjust = 1.5,
  labvjust = 0,
  drawConnectors = TRUE,
  widthConnectors = 0.5,
  colConnectors = "black",
  xlab = dimColnames[1],
  xlabAngle = 0,
  xlabhjust = 0.5,
  xlabvjust = 0.5,
  ylab = dimColnames[2],
  ylabAngle = 0,
  ylabhjust = 0.5,
  ylabvjust = 0.5,
  axisLabSize = 16,
  title = "Metadata plot",
  subtitle = "",
  caption = "MDS Plot",
  titleLabSize = 16,
  subtitleLabSize = 12,
  captionLabSize = 12,
  hline = NULL,
  hlineType = "longdash",
  hlineCol = "black",
  hlineWidth = 0.4,
  vline = NULL,
  vlineType = "longdash",
  vlineCol = "black",
  vlineWidth = 0.4,
  gridlines.major = TRUE,
  gridlines.minor = TRUE,
  borderWidth = 0.8,
  borderColour = "black"
)

Arguments

data

a SingleCellExperiment.

grouping

a character string representaing which metadata slot to group the individual samples by.

feature

a character string represnting a feature to label the heatmap with.

markers

a character string specifying which markers to include.

colkey

a vector of grouping ids the colour strings to indicate the feature labelling.

legendPosition

a string for ggplot2 legend position.

legendLabSize

ggplot2 legend label size

legendIconSize

ggplot2 legend icon size

xlim

ggplot2 x limit specification

ylim

ggplot2 y limit specification

xlabAngle

specify the x lab angle

xlabhjust

Specify the horizontal justification of the x axis (0 = left jsutified, 1 = right justified)

xlabvjust

Specify the vertical justification of the x axis (0 = left jsutified, 1 = right justified)

ylab

specify the y axis label

ylabAngle

specify the y lab angle

ylabhjust

Specify the horizontal justification of the y axis (0 = left jsutified, 1 = right justified)

ylabvjust

Specify the vertical justification of the y axis (0 = left jsutified, 1 = right justified)

axisLabSize

specify the axis label size

title

specify the title text of the plot

subtitle

specify the subtitle text of the plot

caption

specify the caption text of the plot

titleLabSize

specify the title text size

subtitleLabSize

specify the subtitle text size

captionLabSize

specify the caption text size

stripLabSize

specify the facet labels of a plot

Value

a ggplot object.

Author(s)

James Opzoomer

Examples

1
2
3
4
5
# Download complete ImmunoCluster SCE object from zenodo
sce_gvhd = readRDS(url("https://zenodo.org/record/3801882/files/sce_gvhd.rds"))

# Generate sample level MDS plot with all markers
mdsplot(sce_gvhd, feature = "condition", colkey = c(None = 'royalblue', GvHD = 'red2'))

kordastilab/ImmunoCluster documentation built on May 10, 2021, 7:41 a.m.