Description Usage Arguments Value Examples
Draws a (directed) Manhattan plot of p-values and versus e.g. retention time or mass-to-charge ratio. If effect size and direction is supplied, the -log10(p-value) on the y-axis will be multiplied by the direction (sign) of the effect, so part of the points will "drop" from the p = 1 (-log10(p) = 0) line. This results in a so-called directed Manhattan plot.
1 2 3 4 |
data |
a data frame with the effect size and p-values |
x, p |
the column names of effect size (x-axis) and p-values |
effect |
column name of effect size (should have negative and positive values). |
p_fdr |
column name of FDR corrected p-values, used to draw a line showing the fdr-corrected significance level |
color |
column name used to color the plots |
p_breaks |
a numerical vector of the p_values to show on the y-axis |
fdr_limit |
the significance level used in the experiment |
x_lim, ylim |
numerical vectors of length 2 for manually setting the axis limits |
color_scale |
the color scale as returned by a ggplot function |
title, subtitle |
the title and subtitle of the plot |
... |
parameters passed to |
a ggplot object
1 2 3 4 5 6 7 8 9 10 11 | # naturally, this looks messy as there are not enough p-values
lm_results <- perform_lm(drop_qcs(merged_sample), formula_char = "Feature ~ Group")
lm_data <- dplyr::left_join(fData(merged_sample), lm_results)
# Traditional Manhattan plot
manhattan_plot(data = lm_data, x = "Average.Mz",
p = "GroupB_P", p_fdr = "GroupB_P_FDR",
fdr_limit = 0.1)
# Directed Manhattan plot
manhattan_plot(data = lm_data, x = "Average.Mz", effect = "GroupB_Estimate",
p = "GroupB_P", p_fdr = "GroupB_P_FDR",
fdr_limit = 0.1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.