Skip to contents

plot_chord_diagram Helper function to plot a circlize circos chord diagram

Usage

plot_chord_diagram(
  data.mat,
  color.pal,
  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,
  ...,
  gg.output = TRUE
)

Arguments

data.mat

feature 1 (rows) x feature 2 (cols) matrix, with values being interaction counts

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")

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 circlize::chordDiagram()

gg.output

Whether to return the plot as a ggplot object (default is TRUE). If FALSE, an object is not returned; rather the chord diagram is plotted in the graphics device only (default behavior of circlize).

Scroll to top