Description Usage Arguments Details Value Examples
This method plots regulon activity for a given regulon in all samples and adds covariate tracks to evaluate the regulon activity distribution. The samples are order by regulon activity for that particular regulon.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
tns |
A A TNS object. |
regs |
An optional string vector specifying regulons to plot. |
attribs |
A character vector of attributes listed in the column names of the survivalData. All attributes should be either binary encoded or categorical variables for plotting. Available attributes can be checked by running colnames(tnsGet(tns, "survivalData")). Alternatively, attributes can be grouped when provided within a list. |
fname |
A string. The name of the file in which the plot will be saved |
fpath |
A string. The path to the directory where the plot will be saved |
ylab |
A string. The label of the y-axis, describing what is represented. |
xlab |
A string. The label of the x-axis. |
plotpdf |
A logical value. If TRUE, a pdf file is created instead of plotting to the graphics device. |
plotbatch |
A logical value. If TRUE, plots for all regulons are saved in the same file. If FALSE, each plot for each regulon is saved in a different file. |
panelHeights |
A numeric vector of length 2 specifying the relative heights of the panels (regulon activity plot, and covariate tracks) |
width |
A numeric value. Represents the width of the plot. |
height |
A numeric value. Represents the height of the plot. |
dummyEncode |
A logical value. If TRUE, all categorical variables are dummy encoded. If FALSE, categorical variables are represented as one track and a legend is added to the plot. |
divs |
A numeric vector of division positions in the covariate tracks. |
Automatic dummy encoding is available for categorical variables.
A plot of regulon activity and covariate tracks.
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 | # load survival data
data(survival.data)
# load TNI-object
data(stni, package = "RTN")
# create TNS object
stns <- tni2tnsPreprocess(stni, survivalData = survival.data,
keycovar = c('Grade','Age'), time = 1, event = 2)
stns <- tnsGSEA2(stns)
# plot only binary covariates
tnsPlotCovariates(stns, "MYB",
attribs = c("ER+", "ER-", "PR+", "PR-", "LumA", "LumB", "Basal",
"Her2", "Normal"), divs = c(2, 4))
# also dummy encode categorical variables (LN and Grade)
tnsPlotCovariates(stns, "MYB",
attribs = c("ER+", "ER-", "PR+", "PR-", "LumA", "LumB", "Basal",
"Her2", "Normal", "LN", "Grade"), divs = c(2, 4, 9, 12))
# don't dummy encode categorical variables
tnsPlotCovariates(stns, "MYB", attribs = c("ER+", "ER-", "PR+", "PR-",
"LumA", "LumB", "Basal", "Her2", "Normal", "Grade"), divs = c(2, 4, 9),
dummyEncode = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.