heatmapplot | R Documentation |
assumes a normalized counts matrix, should work with TPM too. Currently, color depends on addding metadata. Later, will add support for manually defined colors.
heatmapplot( expmatrix, genes, metadata, heatmaptitle, legendtitle, do.log2, do.scale, change_gene_label, gene_label_equivalency, clustering_distance_columns, deres, pval_thres, lfc_thres, use_padj, ... )
expmatrix |
matrix or data.frame with rows = genes and columns = samples |
genes |
character vector of gene names (rownames) in the expmatrix |
metadata |
data.frame in DESeq2 "coldata" format. Needs a "Sample" column with sample IDs matching colnames of expmat, a "Condition" column with the associated conditon, and a "Color" column that has the sample colors |
heatmaptitle |
string, name of heatmap on top |
legendtitle |
string, what to call the values in the gene expression matrix. Will default to "Zscaled Normalized Counts" |
do.log2 |
T/F, whether to log2(x+1) transform gene expression values (rows) in the matrix |
do.scale |
T/F, whether to scale (z-transform, (x - mean(x) / sd(x))) the gene expression values (rows) of the matrix |
change_gene_label |
T/F, whether to change gene labels, defautl F |
gene_label_equivalency |
data.frame, if change_gene_label is set to T, need to provide a data.frame with two columns, first column with current gene labels (rownames of res) and second column with gene labels you want to plot as labels. Useful for when you have res with IDs but want to show gene symbols. |
clustering_distance_columns |
distance to use for ComplexHeatmap::Heatmap clustering of rows, default is pearson |
... |
Additionaly arguments to pass to ComplexHeatmap::Heatmap |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.