plot_phylo_heatmap: Plot single-cell CNV calls along with the clonal phylogeny

View source: R/vis.R

plot_phylo_heatmapR Documentation

Plot single-cell CNV calls along with the clonal phylogeny

Description

Plot single-cell CNV calls along with the clonal phylogeny

Usage

plot_phylo_heatmap(
  gtree,
  joint_post,
  segs_consensus,
  annot = NULL,
  pal_annot = NULL,
  annot_title = "Annotation",
  annot_scale = NULL,
  clone_dict = NULL,
  clone_bar = FALSE,
  pal_clone = NULL,
  clone_title = "Genotype",
  clone_legend = TRUE,
  p_min = 0.9,
  line_width = 0.1,
  tree_height = 1,
  branch_width = 0.2,
  tip_length = 0.2,
  clone_line = FALSE,
  superclone = FALSE,
  exclude_gap = FALSE,
  root_edge = TRUE,
  raster = FALSE
)

Arguments

gtree

tbl_graph The single-cell phylogeny

joint_post

dataframe Joint single cell CNV posteriors

segs_consensus

datatframe Consensus segment dataframe

annot

named vector Cell annotations, keys are cell names

pal_annot

named vector Colors for cell annotations

annot_title

character Legend title for the annotation bar

annot_scale

ggplot scale Color scale for the annotation bar

clone_dict

named vector Clone annotations, mapping from cell name to clones

clone_bar

logical Whether to display clone bar plot

pal_clone

named vector Clone colors

clone_title

character Legend title for the clone bar

clone_legend

logical Whether to display the clone legend

p_min

numeric Probability threshold to display CNV calls

line_width

numeric Line width for CNV heatmap

tree_height

numeric Relative height of the phylogeny plot

branch_width

numeric Line width in the phylogeny

tip_length

numeric Length of tips in the phylogeny

clone_line

logical Whether to display borders for clones in the heatmap

superclone

logical Wehether to display superclones in the clone bar

exclude_gap

logical Whether to mark gap regions

root_edge

logical Whether to plot root edge

raster

logical Whether to raster images

Value

ggplot panel

Examples

p = plot_phylo_heatmap(
    gtree = phylogeny_example, 
    joint_post = joint_post_example, 
    segs_consensus = segs_example)

whtns/numbat documentation built on Nov. 8, 2022, 10:48 a.m.