| olink_volcano_plot | R Documentation |
Generates a volcano plot using the results of the olink_ttest function using ggplot and ggplot2::geom_point. The estimated difference is plotted on the x-axis and the negative 10-log p-value on the y-axis. The horizontal dotted line indicates p-value=0.05. Dots are colored based on the Benjamini-Hochberg adjusted p-value cutoff 0.05 and can optionally be annotated by OlinkID.
olink_volcano_plot(p.val_tbl, x_lab = "Estimate", olinkid_list = NULL, ...)
p.val_tbl |
a data frame of results generated by olink_ttest() |
x_lab |
Optional. Character value to use as the X-axis label |
olinkid_list |
Optional. Character vector of proteins (by OlinkID) to label in the plot. If not provided, default is to label all significant proteins. |
... |
Optional. Additional arguments for olink_color_discrete() |
An object of class "ggplot", plotting significance (y-axis) by estimated difference between groups (x-axis) for each protein.
if (rlang::is_installed(pkg = c("broom", "ggrepel"))) {
npx_df <- npx_data1 |>
dplyr::filter(
!grepl(pattern = "control",
x = .data[["SampleID"]],
ignore.case = TRUE
)
)
check_log <- check_npx(df = npx_df)
ttest_results <- OlinkAnalyze::olink_ttest(
df = npx_df,
check_log = check_log,
variable = "Treatment",
alternative = "two.sided"
)
OlinkAnalyze::olink_volcano_plot(
p.val_tbl = ttest_results
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.