Plot proportional expression values
plot_proportion.Rd
plot_proportion()
is a GGplot2 implementation for plotting the expression differences
as foldchange ~ scaled abundance. This allows for the visualization of selected
proteins See also plot_volcano()
. This function can
take either a tidyproteomics data object or a table with the required headers.
Usage
plot_proportion(
data = NULL,
...,
log2fc_column = "log2_foldchange",
log2fc_min = 2,
significance_column = "adj_p_value",
significance_max = 0.05,
proportion_column = "proportional_expression",
proportion_min = 0.01,
labels_column = NULL,
label_significance = TRUE,
show_pannels = FALSE,
show_lines = TRUE,
show_fc_scale = TRUE,
point_size = NULL,
color_positive = "dodgerblue",
color_negative = "firebrick1",
destination = "plot",
height = 5,
width = 8
)
Arguments
- data
a tidyproteomics data object
- ...
two sample comparison
- log2fc_column
a character defining the column name of the log2 foldchange values.
- log2fc_min
a numeric defining the minimum log2 foldchange to highlight.
- significance_column
a character defining the column name of the statistical significance values.
- significance_max
a numeric defining the maximum statistical significance to highlight.
- proportion_column
a character defining the column name of the proportional expression values.
- proportion_min
a numeric defining the minimum proportional expression to highlight.
- labels_column
a character defining the column name of the column for labeling.
- label_significance
a boolean for labeling values below the significance threshold.
- show_pannels
a boolean for showing colored up/down expression panels.
- show_lines
a boolean for showing threshold lines.
- show_fc_scale
a boolean for showing the secondary foldchange scale.
- point_size
a numeric for shanging the point size.
- color_positive
a character defining the color for positive (up) expression.
- color_negative
a character defining the color for negative (down) expression.
- destination
a character string
- height
a numeric
- width
a numeric
Examples
library(dplyr, warn.conflicts = FALSE)
library(tidyproteomics)
hela_proteins %>%
expression(knockdown/control) %>%
plot_proportion(knockdown/control, log2fc_min = 0.5, significance_column = 'p_value')
#> ℹ .. expression::t_test testing knockdown / control
#> ✔ .. expression::t_test testing knockdown / control [3.7s]
#>
#> ℹ proportional_expression appears to sum to 1 adjusting values to 100(%)
#> Warning: ggrepel: 381 unlabeled data points (too many overlaps). Consider increasing max.overlaps
# generates the same out come
# hela_proteins %>%
# expression(knockdown/control) %>%
# export_analysis(knockdown/control, .analysis = 'expression) %>%
# plot_proportion(log2fc_min = 0.5, significance_column = 'p_value')
# display the gene name instead
hela_proteins %>%
expression(knockdown/control) %>%
plot_proportion(knockdown/control, log2fc_min = 0.5, significance_column = 'p_value', labels_column = "gene_name")
#> ℹ .. expression::t_test testing knockdown / control
#> ✔ .. expression::t_test testing knockdown / control [3.2s]
#>
#> ℹ proportional_expression appears to sum to 1 adjusting values to 100(%)
#> Warning: Removed 13 rows containing missing values or values outside the scale range
#> (`geom_text_repel()`).
#> Warning: ggrepel: 367 unlabeled data points (too many overlaps). Consider increasing max.overlaps