signatureBoxplot {TBSignatureProfiler} | R Documentation |
Plot a boxplot of signature genes.
signatureBoxplot( inputData, annotationData, signatureColNames, annotationColName, name = "Signatures", scale = FALSE, violinPlot = FALSE, includePoints = TRUE, notch = FALSE, rotateLabels = FALSE, nrow = NULL, ncol = NULL, fill_colors = NULL )
inputData |
an input data object. It should either be of the class
|
annotationData |
a |
signatureColNames |
a |
annotationColName |
a character string naming the column name in the
|
name |
a character string giving the title of the boxplot. The default
is |
scale |
logical. Setting |
violinPlot |
logical. Setting |
includePoints |
logical. If |
notch |
logical. Notches are used to compare groups; if the notches of
two boxes do not overlap, this suggests that the medians are significantly
different. If |
rotateLabels |
logical. If |
nrow |
integer giving the number of rows in the resulting array. |
ncol |
integer giving the number of columns in the resulting array. |
fill_colors |
a vector of color names to be used as the fill colors for
the boxplot. If |
A ggplot2
boxplot of the signature data using the provided
annotation information.
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 signature res <- runTBsigProfiler(testdataSE, useAssay = "data", signatures = TBsignatures["Zak_RISK_16"], algorithm = c("GSVA", "ssGSEA"), parallel.sz = 1, combineSigAndAlgorithm = TRUE) signatureBoxplot(res, signatureColNames = c("GSVA_Zak_RISK_16", "ssGSEA_Zak_RISK_16"), annotationColName = "sample", name = "Zak_RISK_16 Signature")