library(gprofiler2)
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(ggplot2)
library(plotly)
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
library(ggplotify)
library(magrittr)

Kidney

Kidney g:profiler analysis

k1 <- gost(query = c(
  
  'Q64213' ,
 'Q9CQC6' ,
 'Q9CWK8' ,
 'P70460' ,
 'Q62448' ,
 'P62806' ,
 'Q61686' ,
 'P27546' ,
 'Q3U182' ,
 'P05213' ,
 'Q08093' ,
 'Q61074' ,
 'Q8K1B8' ,
 'Q921M7' ,
 'Q9CQC6' ,
 'D0QMC3' ,
 'Q8K352' ,
 'P61028' ,
 'Q61937' ,
 'P60762' ,
 'Q9JLQ0' ,
 'P70315' ,
 'Q99PM3' ,
 'Q9ESZ8' ,
 'Q8VEK3' ,
 'Q921M7' ,
 'P20444' ,
 'P70460' 

),
organism = 'mmusculus')
head(k1$result)
##     query significant     p_value term_size query_size intersection_size
## 1 query_1        TRUE 0.005366026      1390         21                 9
## 2 query_1        TRUE 0.015838901      6090         21                16
## 3 query_1        TRUE 0.016084613      3798         21                13
## 4 query_1        TRUE 0.016457989       533         21                 6
## 5 query_1        TRUE 0.023906342      6270         21                16
## 6 query_1        TRUE 0.034987264       354         21                 5
##   precision      recall    term_id source
## 1 0.4285714 0.006474820 GO:0007010  GO:BP
## 2 0.7619048 0.002627258 GO:0016043  GO:BP
## 3 0.6190476 0.003422854 GO:0006996  GO:BP
## 4 0.2857143 0.011257036 GO:0051493  GO:BP
## 5 0.7619048 0.002551834 GO:0071840  GO:BP
## 6 0.2380952 0.014124294 GO:0010639  GO:BP
##                                       term_name effective_domain_size
## 1                     cytoskeleton organization                 21118
## 2               cellular component organization                 21118
## 3                        organelle organization                 21118
## 4       regulation of cytoskeleton organization                 21118
## 5 cellular component organization or biogenesis                 21118
## 6 negative regulation of organelle organization                 21118
##   source_order                            parents
## 1         2946                         GO:0006996
## 2         5665                         GO:0071840
## 3         2933                         GO:0016043
## 4        15932             GO:0007010, GO:0033043
## 5        19815                         GO:0009987
## 6         4797 GO:0006996, GO:0033043, GO:0051129
p <- gostplot(k1, capped = FALSE, interactive = 1)
p

Liver

l1 <- gost(query = c(
  
'Q9CZ69' ,
 'Q9QZ73' ,
 'Q9CWK8' ,
 'Q8CGC7' ,
 'Q99K48' ,
 'O54931' ,
 'Q99KJ8' ,
 'P63038' ,
 'Q9JLQ0' ,
 'O08585' ,
 'A3KGB4' ,
 'P05213' ,
 'P61028' ,
 'Q9DAW9' ,
 'P70158' ,
 'P98078' ,
 'Q64213' ,
 'Q99K30' ,
 'Q9JMB0' ,
 'Q9QUH0' ,
 'Q9WVB0' ,
 'Q9Z2C8' ,
 'Q3UMF0' ,
 'Q61937' ,
 'Q62415' ,
 'Q64152' ,
 'Q8K310' ,
 'Q6AW69' ,
 'Q91Y97' ,
 'P98078' ,
 'Q8N7N5' ,
 'P17225' ,
 'P63038' ,
 'Q6IRU5' ,
 'Q8CAY6' ,
 'Q8BSY0' ,
 'P16546' 


),
organism = 'mmusculus')
head(l1$result)
##     query significant      p_value term_size query_size intersection_size
## 1 query_1        TRUE 2.278106e-03      2897         29                15
## 2 query_1        TRUE 1.142951e-02      2416         29                13
## 3 query_1        TRUE 1.347587e-02      2452         29                13
## 4 query_1        TRUE 3.968715e-02      1535         29                10
## 5 query_1        TRUE 2.493956e-06      3849         28                19
## 6 query_1        TRUE 1.158446e-03     11093         28                26
##   precision      recall    term_id source                   term_name
## 1 0.5172414 0.005177770 GO:0033036  GO:BP  macromolecule localization
## 2 0.4482759 0.005380795 GO:0071702  GO:BP organic substance transport
## 3 0.4482759 0.005301794 GO:0008104  GO:BP        protein localization
## 4 0.3448276 0.006514658 GO:0015031  GO:BP           protein transport
## 5 0.6785714 0.004936347 GO:0005829  GO:CC                     cytosol
## 6 0.9285714 0.002343820 GO:0005737  GO:CC                   cytoplasm
##   effective_domain_size source_order                            parents
## 1                 21118         9231                         GO:0051179
## 2                 21118        19737                         GO:0006810
## 3                 21118         3542                         GO:0033036
## 4                 21118         5363 GO:0045184, GO:0071702, GO:0071705
## 5                 21016          470             GO:0005737, GO:0110165
## 6                 21016          385             GO:0005622, GO:0110165
p <- gostplot(l1, capped = FALSE, interactive = 1)
p

Spleen

COFRADIC data from spleen in g:profiler

s1 <- gost(query = c(
  
  'Q64213' ,
 'Q9CQC6' ,
 'Q9CWK8' ,
 'Q9CXF0' ,
 'Q62448' ,
 'Q9DBP5' ,
 'Q9CY58' ,
 'P60762' ,
 'O08585' ,
 'Q8VDJ3' ,
 'O35490' ,
 'O55022' ,
 'P05213' ,
 'P17225' ,
 'P30115' ,
 'Q4VAA2' ,
 'Q6IRU5' ,
 'Q99KJ8' ,
 'Q9D8Y0' ,
 'Q9QXD6' ,
 'P08113' ,
 'Q8R0Y6' ,
 'P22907' ,
 'Q9DBG7' ,
 'Q3U182' 

),
organism = 'mmusculus')
head(s1$result)
##     query significant     p_value term_size query_size intersection_size
## 1 query_1        TRUE 0.001309112      3849         18                12
## 2 query_1        TRUE 0.026077633     11093         18                17
##   precision      recall    term_id source term_name effective_domain_size
## 1 0.6666667 0.003117693 GO:0005829  GO:CC   cytosol                 21016
## 2 0.9444444 0.001532498 GO:0005737  GO:CC cytoplasm                 21016
##   source_order                parents
## 1          470 GO:0005737, GO:0110165
## 2          385 GO:0005622, GO:0110165
p <- gostplot(s1, capped = FALSE, interactive = 1)
p