addFreqBars {treekoR} | R Documentation

## Title

### Description

a function to add the frequency bars for each cluster

### Usage

    addFreqBars(
      p,
      clusters,
      offset = 0.75,
      bar_length = 3,
      bar_width = 0.4,
      freq_labels = FALSE
    )

### Arguments

`p` | a phylogenetic tree plot created from the ggtree() function
`clusters` | a vector representing the cell type or cluster of each cell (can be character or numeric)
`offset` | distance between the heatmap and frequency bars
`bar_length` | length of bar with max frequency
`bar_width` | width of each frequency bar
`freq_labels` | boolean indicated whether or not to show frequency bar labels

### Value

an interactive ggplot graph object with frequency bars of clusters alongside heatmap of cluster median expression

[Package treekoR version 1.2.1 Index]