Description Usage Arguments Details Value Examples
This function takes a dataset of scored gene expression data as an input and returns a ComplexHeatmap plot for for visual comparison of signature performance.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | signatureHeatmap(
inputData,
annotationData = NULL,
name = "Signatures",
signatureColNames,
annotationColNames = NULL,
colList = list(),
scale = FALSE,
showColumnNames = TRUE,
showRowNames = TRUE,
colorSets = c("Set1", "Set2", "Set3", "Pastel1", "Pastel2", "Accent", "Dark2",
"Paired"),
choose_color = c("blue", "gray95", "red"),
split_heatmap = "disease",
annotationSignature = sigAnnotData,
...
)
|
inputData |
an input data object. It should either be of the class
|
annotationData |
a |
name |
a character string with the plot title of the heatmap. The
default is |
signatureColNames |
a vector of the column names in |
annotationColNames |
a vector of the column names in |
colList |
a named |
scale |
logical. Setting |
showColumnNames |
logical. Setting |
showRowNames |
logical. Setting |
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 |
split_heatmap |
a character string either giving the column title of
|
annotationSignature |
a |
... |
Additional arguments to be passed to
|
If both annotationData = NULL
and annotationColNames = NULL
,
no annotation bar will be drawn on the heatmap.
A ComplexHeatmap plot.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 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))))
res <- runTBsigProfiler(testdataSE, useAssay = "data",
signatures = TBsignatures["Zak_RISK_16"],
algorithm = c("GSVA", "ssGSEA"), parallel.sz = 1,
combineSigAndAlgorithm = TRUE)
signatureHeatmap(res, signatureColNames = c("GSVA_Zak_RISK_16",
"ssGSEA_Zak_RISK_16"),
annotationColNames = "sample", scale = TRUE,
showColumnNames = FALSE, split_heatmap = "none")
# Example using custom colors for the annotation information
color2 <- stats::setNames(c("purple", "black"), c("down", "up"))
color.list <- list("sample" = color2)
signatureHeatmap(res, signatureColNames = c("GSVA_Zak_RISK_16",
"ssGSEA_Zak_RISK_16"),
annotationColNames = "sample", scale = TRUE,
showColumnNames = FALSE,
colList = color.list, split_heatmap = "none")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.