Description Usage Arguments Value Examples
plot_score()
takes a summary data frame (presumably generated by
integrate_score()
), and plot a line plot or heatmap to
visualize the change of scores in different experiments.
1 2 3 |
x |
a data frame, presumably generated by
|
facet |
a character string. Options are "predictor" and "target". If set, the line plot will be separated into multiple panel according to the value of predictor or target |
exp.order |
a character vector containing the column names provided to
|
cols.use |
a character vector containing 3 colors to indicate the color used in a heatmap to represent low, mid, and high value respectively |
predictors.use |
a character vector indicating the predictors to plot |
targets.use |
a character vector indicating the predictors to plot |
plot.type |
a character string indicating whether a lineplot
( |
title |
a character string indicating the title of the plot |
k.groups |
a numeric value indicating the number of clusters to form in hierarchical clustering for the predictor-target pairs |
a ggplot2
object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # Generating a dummy data frame containing predictor, target, and columns of
# scores
intedf <- data.frame(
"predictor" = c("tf_1", "tf_2", "tf_3", "tf_4"),
"target" = c("gene_1", "gene_2", "gene_1", "gene_2"),
"t1" = c(0, 5, 1, 5),
"t2" = c(0, 3, 0, 1),
"t3" = c(0, 6, 2, 6),
"t4" = c(2, 7, 8, 9),
"t5" = c(9, 2, 2, 7),
stringsAsFactors = FALSE
)
# Plot a line plot
plot_score(x = intedf, plot.type = "line")
# Plot a heatmap
plot_score(x = intedf, plot.type = "heatmap")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.