signatureGeneHeatmap | R Documentation |
This function takes the profiled gene expression data for a single signature and creates a heatmap based on the expression scores.
signatureGeneHeatmap(
inputData,
useAssay,
sigGenes,
name = "Signature",
signatureColNames = NULL,
annotationColNames = NULL,
scale = TRUE,
showColumnNames = TRUE,
showRowNames = TRUE,
colList = list(),
colorSets = c("Set1", "Set2", "Set3", "Pastel1", "Pastel2", "Accent", "Dark2",
"Paired"),
choose_color = c("blue", "gray95", "red"),
column_order = NULL,
...
)
inputData |
a |
useAssay |
a character string specifying the assay to use for the gene expression data. Required. |
sigGenes |
a vector identifying the genes in the signature to use in
the heatmap. For inbuilt signatures, you can use |
name |
a character string with the plot title of the heatmap. The
default is |
signatureColNames |
a vector of the column names in the |
annotationColNames |
a vector of the column names in the |
scale |
logical. Setting |
showColumnNames |
logical. Setting |
showRowNames |
logical. Setting |
colList |
a named |
colorSets |
a vector of names listing the color sets in the order
that they should be used in creating the heatmap. By default, this function
will use the color sets in the order listed in |
choose_color |
a vector of color names to be interpolated for the
heatmap gradient, or a |
column_order |
a vector of character strings indicating the order in
which to manually arrange the heatmap columns. Default is |
... |
Additional arguments to be passed to
|
A ComplexHeatmap
plot.
library(SummarizedExperiment)
# Generate some artificial data that shows a difference in Zak_RISK_16
mat_testdata <- rbind(matrix(c(rnorm(80), rnorm(80) + 5), 16, 10,
dimnames = list(TBsignatures$Zak_RISK_16,
paste0("sample", seq_len(10)))),
matrix(rnorm(1000), 100, 10,
dimnames = list(paste0("gene", seq_len(100)),
paste0("sample", seq_len(10)))))
# Create a SummarizedExperiment object that contains the data
testdataSE <- SummarizedExperiment(assays = SimpleList(data = mat_testdata),
colData = DataFrame(sample =
c(rep("down", 5),
rep("up", 5))))
# Run profiler using GSVA and ssGSEA on Zak_RISK_16
res <- runTBsigProfiler(testdataSE, useAssay = "data",
signatures = TBsignatures["Zak_RISK_16"],
algorithm = c("GSVA", "ssGSEA"), parallel.sz = 1,
combineSigAndAlgorithm = TRUE)
# Plot a heatmap of signature genes and pathway predictions
signatureGeneHeatmap(res, useAssay = "data",
sigGenes = TBsignatures[["Zak_RISK_16"]],
signatureColNames = c("GSVA_Zak_RISK_16",
"ssGSEA_Zak_RISK_16"),
annotationColNames = c("sample"), showColumnNames = FALSE,
name = "Zak_RISK_16")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.