View source: R/plotOneFactor.r
| plotOneFactor | R Documentation |
Creates a bar plot of relative gene expression (fold change) values from a single-factor experiment, including standard error or confidence interval error bars and statistical significance.
plotOneFactor(
data,
x_col,
y_col,
Lower.se_col,
Upper.se_col,
letters_col = NULL,
letters_d = 0.2,
col_width = 0.8,
err_width = 0.15,
fill_colors = "grey40",
alpha = 1,
base_size = 12,
legend_position = "none",
...
)
data |
Data frame |
x_col |
Numeric. Column index for x-axis |
y_col |
Numeric. Column index for bar height |
Lower.se_col |
Numeric. Column index for lower SE |
Upper.se_col |
Numeric. Column index for upper SE |
letters_col |
Optional column index for grouping letters |
letters_d |
Numeric. Vertical offset for letters (default 0.2) |
col_width |
Numeric. Width of bars (default 0.8) |
err_width |
Numeric. Width of error bars (default 0.15) |
fill_colors |
Optional vector of fill colors |
alpha |
Numeric. Transparency of bars (default 1) |
base_size |
Numeric. Base font size for theme (default 12) |
legend_position |
Character. Legend position (default "right") |
... |
Additional valid ggplot2 layer arguments |
The plotOneFactor function generates a bar plot of fold change
values for target genes using the output expression tables produced by
functions such as ANOVA_DDCt() or ANOVA_DCt().
Error bars can represent either standard error (SE) or 95% confidence
intervals, and optional grouping letters from post hoc statistical
comparisons can be displayed above the bars.
ggplot2 plot object
Ghader Mirzaghaderi
a <- ANOVA_DCt(
data_1factor,
numberOfrefGenes = 1,
block = NULL
)
data <- a$Results
plotOneFactor(
data,
x_col = 1,
y_col = 2,
Lower.se_col = 7,
Upper.se_col = 8,
letters_col = 11,
letters_d = 0.1,
col_width = 0.7,
err_width = 0.15,
fill_colors = "skyblue",
alpha = 1,
base_size = 16
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.