Skip to contents

analyze_enrichments() is a GGplot2 implementation for plotting the expression differences as foldchange ~ statistical significance. See also plot_proportion(). This function can take either a tidyproteomics data object or a table with the required headers.

Usage

analyze_enrichments(
  data = NULL,
  top_n = 50,
  significance_max = 0.05,
  enriched_up_color = "blue",
  enriched_down_color = "red",
  height = 6.5,
  width = 10
)

Arguments

data

a character defining the column name of the log2 foldchange values.

top_n

a numerical value defining the number of terms to display in the plot

significance_max

a numeric defining the maximum statistical significance to highlight.

enriched_up_color

a color to assign the up enriched values

enriched_down_color

a color to assign the down enriched values

width

a numeric

Value

a tidyproteomics data object

Examples

library(dplyr, warn.conflicts = FALSE)
library(tidyproteomics)
hela_proteins %>%
   expression(knockdown/control) %>%
   analyze_expressions(log2fc_min = 0.5, significance_column = "p_value")
#>  .. expression::t_test testing knockdown / control
#>  .. expression::t_test testing knockdown / control [3.3s]
#> 
#>  Saved plot_volcano.png
#> 
#> ── Quantitative Proteomics Data Object ──
#> 
#> Origin          ProteomeDiscoverer 
#>                 proteins (11.40 MB) 
#> Composition     6 files 
#>                 2 samples (control, knockdown) 
#> Quantitation    7055 proteins 
#>                 4 log10 dynamic range 
#>                 28.8% missing values 
#>  *imputed        
#> Accounting      (4) num_peptides num_psms num_unique_peptides imputed 
#> Annotations     (9) description biological_process cellular_component molecular_function
#>                 gene_id_entrez gene_name wiki_pathway reactome_pathway
#>                 gene_id_ensemble 
#> Analyses        (1) 
#>                 knockdown/control -> expression  
#>