Plot a heatmap of differential genes. Code is adapted from Conos package. https://github.com/kharchenkolab/conos/blob/master/R/plot.R
plotDEheatmap_conos(
con,
groups,
container,
de = NULL,
min.auc = NULL,
min.specificity = NULL,
min.precision = NULL,
n.genes.per.cluster = 10,
additional.genes = NULL,
exclude.genes = NULL,
labeled.gene.subset = NULL,
expression.quantile = 0.99,
pal = (grDevices::colorRampPalette(c("dodgerblue1", "grey95", "indianred1")))(1024),
ordering = "-AUC",
column.metadata = NULL,
show.gene.clusters = TRUE,
remove.duplicates = TRUE,
column.metadata.colors = NULL,
show.cluster.legend = TRUE,
show_heatmap_legend = FALSE,
border = TRUE,
return.details = FALSE,
row.label.font.size = 10,
order.clusters = FALSE,
split = FALSE,
split.gap = 0,
cell.order = NULL,
averaging.window = 0,
...
)
ComplexHeatmap::Heatmap object (see return.details param for other output)
conos (or p2) object
groups in which the DE genes were determined (so that the cells can be ordered correctly)
environment Project container that stores sub-containers for each cell type as well as results and plots from all analyses
differential expression result (list of data frames)
optional minimum AUC threshold
optional minimum specificity threshold
optional minimum precision threshold
number of genes to show for each cluster
optional additional genes to include (the genes will be assigned to the closest cluster)
an optional list of genes to exclude from the heatmap
a subset of gene names to show (instead of all genes). Can be a vector of gene names, or a number of top genes (in each cluster) to show the names for.
expression quantile to show (0.98 by default)
palette to use for the main heatmap
order by which the top DE genes (to be shown) are determined (default "-AUC")
additional column metadata, passed either as a data.frame with rows named as cells, or as a list of named cell factors.
whether to show gene cluster color codes
remove duplicated genes (leaving them in just one of the clusters)
a list of color specifications for additional column metadata, specified according to the HeatmapMetadata format. Use "clusters" slot to specify cluster colors.
whether to show the cluster legend
whether to show the expression heatmap legend
show borders around the heatmap and annotations
if TRUE will return a list containing the heatmap (ha), but also raw matrix (x), expression list (expl) and other info to produce the heatmap on your own.
font size for the row labels
whether to re-order the clusters according to the similarity of the expression patterns (of the genes being shown)
logical If TRUE splits the heatmap by cell type (default=FALSE)
numeric The distance to put in the gaps between split parts of the heatmap if split=TRUE (default=0)
explicitly supply cell order
optional window averaging between neighboring cells within each group (turned off by default) - useful when very large number of cells shown (requires zoo package)
extra parameters are passed to pheatmap