library(KRSA)
library(knitr)
library(tidyverse)
#> ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
#>  ggplot2 3.3.6       purrr   0.3.5 
#>  tibble  3.1.8       dplyr   1.0.10
#>  tidyr   1.2.1       stringr 1.4.1 
#>  readr   2.1.3       forcats 0.5.2 
#> ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
#>  dplyr::filter() masks stats::filter()
#>  dplyr::lag()    masks stats::lag()

Using Enrichr and KRSA

You can perform gene set enrichment analysis using Enrichr by using either a set of PamChip peptide IDs or gene symbols.

Using Peptide IDs


example_peptide_list <- c("ACM5_494_506", "ADDB_696_708", "ADRB2_338_350", "ANXA1_209_221")

enrichr_results <- krsa_enrichr(peptides = example_peptide_list)
#> GO_Biological_Process_2021 ...
#> GO_Cellular_Component_2021 ...
#> GO_Molecular_Function_2021 ...
#> WikiPathway_2021_Human ...
#> Reactome_2016 ...
#> KEGG_2021_Human ...
#> BioPlanet_2019 ...


head(enrichr_results, 10)
#> # A tibble: 10 × 8
#>    index term                         pvalue odds_…¹ combi…² genes adjus…³ lib  
#>    <int> <chr>                         <dbl>   <dbl>   <dbl> <chr>   <dbl> <chr>
#>  1     1 positive regulation of org… 1.58e-5    644.   7120. ANXA… 0.00267 GO_B…
#>  2     2 G protein-coupled receptor… 6.21e-5    316.   3065. ANXA… 0.00525 GO_B…
#>  3     3 positive regulation of AMP… 1.00e-3   1666   11509. ADRB2 0.0113  GO_B…
#>  4     4 negative regulation of smo… 1.00e-3   1666   11509. ADRB2 0.0113  GO_B…
#>  5     5 positive regulation of cAM… 1.00e-3   1666   11509. ADRB2 0.0113  GO_B…
#>  6     6 alpha-beta T cell differen… 1.00e-3   1666   11509. ANXA1 0.0113  GO_B…
#>  7     7 positive regulation of pro… 1.00e-3   1666   11509. ANXA1 0.0113  GO_B…
#>  8     8 positive regulation of aut… 1.20e-3   1333.   8964. ADRB2 0.0113  GO_B…
#>  9     9 activation of transmembran… 1.20e-3   1333.   8964. ADRB2 0.0113  GO_B…
#> 10    10 hepatocyte differentiation… 1.20e-3   1333.   8964. ANXA1 0.0113  GO_B…
#> # … with abbreviated variable names ¹​odds_ratio, ²​combined_score,
#> #   ³​adjusted_pvalue

Using Gene Symbols

Alternatively, the input coould be gene symbols instead of peptide ids:



enrichr_results_genes <- krsa_enrichr(genes = c("AKT1", "AKT2", "AKTe"))
#> GO_Biological_Process_2021 ...
#> GO_Cellular_Component_2021 ...
#> GO_Molecular_Function_2021 ...
#> WikiPathway_2021_Human ...
#> Reactome_2016 ...
#> KEGG_2021_Human ...
#> BioPlanet_2019 ...


head(enrichr_results_genes, 10)
#> # A tibble: 10 × 8
#>    index term                         pvalue odds_…¹ combi…² genes adjus…³ lib  
#>    <int> <chr>                         <dbl>   <dbl>   <dbl> <chr>   <dbl> <chr>
#>  1     1 regulation of long-chain f… 2.25e-7   9996. 153020. AKT2… 3.45e-5 GO_B…
#>  2     2 positive regulation of mit… 3.15e-7   7997. 119719. AKT2… 3.45e-5 GO_B…
#>  3     3 mammary gland epithelial c… 4.20e-7   6664.  97844. AKT2… 3.45e-5 GO_B…
#>  4     4 positive regulation of mem… 5.40e-7   5711.  82427. AKT2… 3.45e-5 GO_B…
#>  5     5 negative regulation of tra… 6.75e-7   4997.  71005. AKT2… 3.45e-5 GO_B…
#>  6     6 positive regulation of cel… 1.17e-6   3634.  49634. AKT2… 3.66e-5 GO_B…
#>  7     7 regulation of fatty acid b… 1.36e-6   3331.  44982. AKT2… 3.66e-5 GO_B…
#>  8     8 positive regulation of glu… 1.36e-6   3331.  44982. AKT2… 3.66e-5 GO_B…
#>  9     9 positive regulation of gly… 1.36e-6   3331.  44982. AKT2… 3.66e-5 GO_B…
#> 10    10 mammary gland epithelium d… 1.57e-6   3074.  41080. AKT2… 3.66e-5 GO_B…
#> # … with abbreviated variable names ¹​odds_ratio, ²​combined_score,
#> #   ³​adjusted_pvalue

Visualization

The results could be plotted using the krsa_enrichr_plot function:


krsa_enrichr_plot(enrichr_results)

Showing only top 5 terms per library: `


krsa_enrichr_plot(enrichr_results, terms_to_plot = 5)