plot_heatmap.expr {RVA} | R Documentation |
Plot Heatmap From Raw CPM
Description
Create a heatmap with either CFB or CPM averaged across individual samples.
Usage
plot_heatmap.expr(
data = ~count,
annot = ~meta,
sample.id = "sample_id",
annot.flags = c("day", "Treatment", "tissue"),
ct.table.id.type = "ENSEMBL",
gene.id.type = "SYMBOL",
gene.names = NULL,
gene.count = 10,
title = "RVA Heatmap",
fill = "CFB",
baseline.flag = "day",
baseline.val = "0",
plot.save.to = NULL,
input.type = "count"
)
Arguments
data |
A wide-format dataframe with geneid rownames, sample column
names, and fill data matching |
annot |
A long-format dataframe with any pertinent treatment data about
the samples. The only required column is one titled the |
sample.id |
The column name to specify sample ID. |
annot.flags |
A vector of column names corresponding to column names
in |
ct.table.id.type |
The gene id format in |
gene.id.type |
The gene id format of |
gene.names |
A character vector or list of ensembl IDs for which to
display gene information. If |
gene.count |
The number of genes to include, where genes are selected
based on ranking by values in |
title |
A title for the heatmap. Default = "RVA Heatmap". |
fill |
One of |
baseline.flag |
A character vector of column names. If |
baseline.val |
A character vector of values. This vector must be the
same length as |
plot.save.to |
The address to save the heatmap plot. |
input.type |
One of |
Details
The function takes raw CPM data and returns both a list containing a data frame with values based on the fill parameter and a heatmap plot.
Value
The function returns a list with 2 items:
df.sub |
"A data frame of change from baselines values (fill = CFB in this example) for each gene id that is divided by a combination of treatment group and time point |
gp |
A Heatmap object from ComplexHeatmap which can be plotted |
References
Xingpeng Li,Tatiana Gelaf Romer & Aliyah Olaniyan, RVA - RNAseq Visualization Automation tool.
Examples
plot <- plot_heatmap.expr(data = count_table[,1:20],annot = sample_annotation[1:20,])