plotMetaPrograms | R Documentation |
Generates a clustered heatmap for meta-program similarities (by Jaccard
index or Cosine similarity). This function is intended to be run on the object
generated by getMetaPrograms
, which contains a pre-calculated
tree of pairwise similarities between clusters (as a 'hclust' object).
plotMetaPrograms(
mp.res,
similarity.cutoff = c(0, 1),
scale = "none",
downsample = 1000,
showtree = TRUE,
palette = viridis(100, option = "A", direction = -1),
annotation_colors = NULL,
main = "Clustered Heatmap",
show_rownames = FALSE,
show_colnames = FALSE,
...
)
mp.res |
The meta-programs object generated by |
similarity.cutoff |
Min and max values for similarity metric |
scale |
Heatmap rescaling (passed to pheatmap as 'scale') |
downsample |
Limit max number of samples in heatmap, to avoid overloading the graphics |
showtree |
Whether to plot the hierarchical clustering tree |
palette |
Heatmap color palette (passed to pheatmap as 'color') |
annotation_colors |
Color palette for MP annotations |
main |
Heatmap title |
show_rownames |
Whether to display individual program names as rows |
show_colnames |
Whether to display individual program names as cols |
... |
Additional parameters for pheatmap |
Returns a clustered heatmap of MP similarities, in ggplot2 format
library(Seurat)
data(sampleObj)
geneNMF_programs <- multiNMF(list(sampleObj), k=5)
geneNMF_metaprograms <- getMetaPrograms(geneNMF_programs, nMP=3)
plotMetaPrograms(geneNMF_metaprograms)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.