Create a heatmap with either CFB or CPM averaged across individual samples.
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"
)
A wide-format dataframe with geneid rownames, sample column
names, and fill data matching input.type
.
A long-format dataframe with any pertinent treatment data about
the samples. The only required column is one titled the sample.id
value with values matching the column names of sample IDs in data
.
Additional columns can contain information such as treament
compounds, dates of sample collection, or dosage quantities.
The column name to specify sample ID.
A vector of column names corresponding to column names
in annot
which will be used to define the x-axis for the heatmap.
Default = c("day", "dose")
.
The gene id format in data
should be one of:
ACCNUM, ALIAS, ENSEMBL, ENSEMBLPROT, ENSEMBLTRANS,
ENTREZID, ENZYME, EVIDENCE, EVIDENCEALL, GENENAME, GO, GOALL, IPI,
MAP, OMIM, ONTOLOGY, ONTOLOGYALL, PATH, PFAM, PMID, PROSITE, REFSEQ,
SYMBOL, UCSCKG, UNIGENE, UNIPROT.
The gene id format of gene.names
, should be one of:
ACCNUM, ALIAS, ENSEMBL, ENSEMBLPROT, ENSEMBLTRANS,
ENTREZID, ENZYME, EVIDENCE, EVIDENCEALL, GENENAME, GO, GOALL, IPI,
MAP, OMIM, ONTOLOGY, ONTOLOGYALL, PATH, PFAM, PMID, PROSITE, REFSEQ,
SYMBOL, UCSCKG, UNIGENE, UNIPROT.
A character vector or list of ensembl IDs for which to
display gene information. If NULL
, all genes will be included.
Default = NULL
.
The number of genes to include, where genes are selected
based on ranking by values in fill
. Default = 10.
A title for the heatmap. Default = "RVA Heatmap".
One of c("CPM", "CFB")
to fill the heatmap cells with.
Default = "CFB".
A character vector of column names. If fill = "CFB"
,
these columns in annot
contain the values to compare
across. Ignored if fill = "CPM"
. Default = "timepoint".
A character vector of values. This vector must be the
same length as baseline.flag
, and the value at each index must
represent a value from the column given by the corresponding index
in baseline.flag
. The samples corresponding to these values will
be used as a baseline when calculating CFB. Ignored if
fill = "CPM"
. Default = "Week 0".
The address to save the heatmap plot.
One of count
or cpm
indicating what the input data type
is. If count
, the CPM of the input data will be calculated using
edgeR::cpm()
. Default = count
.
The function returns a list with 2 items:
"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
A Heatmap object from ComplexHeatmap which can be plotted
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.
Xingpeng Li,Tatiana Gelaf Romer & Aliyah Olaniyan, RVA - RNAseq Visualization Automation tool.
# NOT RUN {
plot <- plot_heatmap.expr(data = count_table[,1:20],annot = sample_annotation[1:20,])
# }
Run the code above in your browser using DataLab