Skip to contents

plotChordDiagram Plot chord diagrams based on pairwise adjacency results.

Usage

plotChordDiagram(
  object,
  nn,
  feature,
  color.pal = NULL,
  group.1 = NULL,
  group.2 = NULL,
  start.degree = 90,
  cell.padding = c(0.02, 0, 0.02, 0),
  circle.margin = 1,
  facing = "clockwise",
  adj = c(0, 0.5),
  cex = 0.8,
  ...,
  analyze = "regions"
)

Arguments

object

A SpatialMap object

nn

The name of a nearestNeighborGraph from object (character).

feature

The name of a cellMetadata column (character).

color.pal

A named vector of colors. Names correspond to unique feature values, e.g. for cell type features, c("tumor_cell" = "red", "epithelial_cell" = "blue")

group.1

Vector of Region names, or a column name in projectMetadata used for grouping. If a projectMetadata column name is passed, group.2 should be NULL. In this case, for each categorical level in the given column, two cohorts are defined:

  1. All regions matching that categorical level in the specified projectMetadata column

  2. All regions not matching that level

group.2

Vector of Region names. If NULL, looks in projectMetadata for a column name matching group.1 to create cohorts.

start.degree

Passed to circlize::circos.par()

cell.padding

Passed to circlize::circos.par()

circle.margin

Passed to circlize::circos.par()

facing

Passed to circlize::circos.text()

adj

Passed to circlize::circos.text()

cex

Passed to circlize::circos.text()

...

Additional arguments passed to plot_chord_diagram()

analyze

Argument passed to .smapply. See note below on how to use this argument for sample-level analysis.

Scroll to top