Source: https://github.com/markziemann/SurveyEnrichmentMethods

Intro

This script is designed to generate the results of the manuscript figure 4.

Panels A-D are generated with “example1.Rmd” and “example1-7.Rmd” are required for panel E.

Here are the datasets considered.

Dataset SRA accesion genes in annotation set genes detected genes differentially expressed
1. SRP128998 39297 15635 3472
2. SRP038101 39297 13926 3589
3. SRP096178 39297 15477 9488
4. SRP038101 39297 15607 5150
5. SRP247621 39297 14288 230
6. SRP253951 39297 15182 8588
7. SRP068733 39297 14255 7365
suppressPackageStartupMessages({
library("kableExtra")
library("beeswarm")
})

Execute the examples

Here I’m running the scripts to analyse each of the example datasets shown in the above table.

rmarkdown::render("example1.Rmd")
## 
## 
## processing file: example1.Rmd
## 
  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |..                                                                    |   3%
##    inline R code fragments
## 
## 
  |                                                                            
  |.....                                                                 |   7%
## label: begin
## 
  |                                                                            
  |.......                                                               |  10%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.........                                                             |  13%
## label: getdata
## 
  |                                                                            
  |............                                                          |  17%
##   ordinary text without R code
## 
## 
  |                                                                            
  |..............                                                        |  20%
## label: filter
## 
  |                                                                            
  |................                                                      |  23%
##   ordinary text without R code
## 
## 
  |                                                                            
  |...................                                                   |  27%
## label: mds
## 
  |                                                                            
  |.....................                                                 |  30%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.......................                                               |  33%
## label: deseq2
## 
  |                                                                            
  |..........................                                            |  37%
##   ordinary text without R code
## 
## 
  |                                                                            
  |............................                                          |  40%
## label: deplots (with options) 
## List of 2
##  $ fig.width : num 7
##  $ fig.height: num 7
## 
  |                                                                            
  |..............................                                        |  43%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.................................                                     |  47%
## label: reactome
## 
  |                                                                            
  |...................................                                   |  50%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.....................................                                 |  53%
## label: mitch1
## 
  |                                                                            
  |........................................                              |  57%
##   ordinary text without R code
## 
## 
  |                                                                            
  |..........................................                            |  60%
## label: cp1
## 
  |                                                                            
  |............................................                          |  63%
##   ordinary text without R code
## 
## 
  |                                                                            
  |...............................................                       |  67%
## label: cp2
## 
  |                                                                            
  |.................................................                     |  70%
##   ordinary text without R code
## 
## 
  |                                                                            
  |...................................................                   |  73%
## label: cp3
## 
  |                                                                            
  |......................................................                |  77%
##   ordinary text without R code
## 
## 
  |                                                                            
  |........................................................              |  80%
## label: cp4
## 
  |                                                                            
  |..........................................................            |  83%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.............................................................         |  87%
## label: venn1
## 
  |                                                                            
  |...............................................................       |  90%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.................................................................     |  93%
## label: jacc1
## 
  |                                                                            
  |....................................................................  |  97%
##   ordinary text without R code
## 
## 
  |                                                                            
  |......................................................................| 100%
## label: session
## output file: example1.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS example1.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output example1.html --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --standalone --section-divs --table-of-contents --toc-depth 3 --variable toc_float=1 --variable toc_selectors=h1,h2,h3 --variable toc_collapsed=1 --variable toc_smooth_scroll=1 --variable toc_print=1 --template /usr/local/lib/R/site-library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --include-in-header /tmp/Rtmp4AKZEm/rmarkdown-str1fbb6a2fbef740.html --mathjax --variable 'mathjax-url:https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --variable code_folding=hide --variable code_menu=1
## 
## Output created: example1.html
rmarkdown::render("example2.Rmd")
## 
## 
## processing file: example2.Rmd
## 
  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |..                                                                    |   3%
##    inline R code fragments
## 
## 
  |                                                                            
  |.....                                                                 |   7%
## label: begin
## 
  |                                                                            
  |.......                                                               |  10%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.........                                                             |  13%
## label: getdata (with options) 
## List of 2
##  $ fig.width : num 7
##  $ fig.height: num 7
## 
## 
  |                                                                            
  |............                                                          |  17%
##   ordinary text without R code
## 
## 
  |                                                                            
  |..............                                                        |  20%
## label: filter
## 
  |                                                                            
  |................                                                      |  23%
##   ordinary text without R code
## 
## 
  |                                                                            
  |...................                                                   |  27%
## label: mds
## 
  |                                                                            
  |.....................                                                 |  30%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.......................                                               |  33%
## label: deseq2
## 
  |                                                                            
  |..........................                                            |  37%
##   ordinary text without R code
## 
## 
  |                                                                            
  |............................                                          |  40%
## label: deplots (with options) 
## List of 2
##  $ fig.width : num 7
##  $ fig.height: num 7
## 
  |                                                                            
  |..............................                                        |  43%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.................................                                     |  47%
## label: reactome
## 
  |                                                                            
  |...................................                                   |  50%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.....................................                                 |  53%
## label: mitch1
## 
  |                                                                            
  |........................................                              |  57%
##   ordinary text without R code
## 
## 
  |                                                                            
  |..........................................                            |  60%
## label: cp1
## 
  |                                                                            
  |............................................                          |  63%
##   ordinary text without R code
## 
## 
  |                                                                            
  |...............................................                       |  67%
## label: cp2
## 
  |                                                                            
  |.................................................                     |  70%
##   ordinary text without R code
## 
## 
  |                                                                            
  |...................................................                   |  73%
## label: cp3
## 
  |                                                                            
  |......................................................                |  77%
##   ordinary text without R code
## 
## 
  |                                                                            
  |........................................................              |  80%
## label: cp4
## 
  |                                                                            
  |..........................................................            |  83%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.............................................................         |  87%
## label: venn1
## 
  |                                                                            
  |...............................................................       |  90%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.................................................................     |  93%
## label: jacc1
## 
  |                                                                            
  |....................................................................  |  97%
##   ordinary text without R code
## 
## 
  |                                                                            
  |......................................................................| 100%
## label: session
## output file: example2.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS example2.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output example2.html --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --standalone --section-divs --table-of-contents --toc-depth 3 --variable toc_float=1 --variable toc_selectors=h1,h2,h3 --variable toc_collapsed=1 --variable toc_smooth_scroll=1 --variable toc_print=1 --template /usr/local/lib/R/site-library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --include-in-header /tmp/Rtmp4AKZEm/rmarkdown-str1fbb6ad3be675.html --mathjax --variable 'mathjax-url:https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --variable code_folding=hide --variable code_menu=1
## 
## Output created: example2.html
rmarkdown::render("example3.Rmd")
## 
## 
## processing file: example3.Rmd
## 
  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |..                                                                    |   3%
##    inline R code fragments
## 
## 
  |                                                                            
  |.....                                                                 |   7%
## label: begin
## 
  |                                                                            
  |.......                                                               |  10%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.........                                                             |  13%
## label: getdata (with options) 
## List of 2
##  $ fig.width : num 7
##  $ fig.height: num 7
## 
## 
  |                                                                            
  |............                                                          |  17%
##   ordinary text without R code
## 
## 
  |                                                                            
  |..............                                                        |  20%
## label: filter
## 
  |                                                                            
  |................                                                      |  23%
##   ordinary text without R code
## 
## 
  |                                                                            
  |...................                                                   |  27%
## label: mds
## 
  |                                                                            
  |.....................                                                 |  30%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.......................                                               |  33%
## label: deseq2
## 
  |                                                                            
  |..........................                                            |  37%
##   ordinary text without R code
## 
## 
  |                                                                            
  |............................                                          |  40%
## label: deplots (with options) 
## List of 2
##  $ fig.width : num 7
##  $ fig.height: num 7
## 
  |                                                                            
  |..............................                                        |  43%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.................................                                     |  47%
## label: reactome
## 
  |                                                                            
  |...................................                                   |  50%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.....................................                                 |  53%
## label: mitch1
## 
  |                                                                            
  |........................................                              |  57%
##   ordinary text without R code
## 
## 
  |                                                                            
  |..........................................                            |  60%
## label: cp1
## 
  |                                                                            
  |............................................                          |  63%
##   ordinary text without R code
## 
## 
  |                                                                            
  |...............................................                       |  67%
## label: cp2
## 
  |                                                                            
  |.................................................                     |  70%
##   ordinary text without R code
## 
## 
  |                                                                            
  |...................................................                   |  73%
## label: cp3
## 
  |                                                                            
  |......................................................                |  77%
##   ordinary text without R code
## 
## 
  |                                                                            
  |........................................................              |  80%
## label: cp4
## 
  |                                                                            
  |..........................................................            |  83%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.............................................................         |  87%
## label: venn1
## 
  |                                                                            
  |...............................................................       |  90%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.................................................................     |  93%
## label: jacc1
## 
  |                                                                            
  |....................................................................  |  97%
##   ordinary text without R code
## 
## 
  |                                                                            
  |......................................................................| 100%
## label: session
## output file: example3.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS example3.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output example3.html --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --standalone --section-divs --table-of-contents --toc-depth 3 --variable toc_float=1 --variable toc_selectors=h1,h2,h3 --variable toc_collapsed=1 --variable toc_smooth_scroll=1 --variable toc_print=1 --template /usr/local/lib/R/site-library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --include-in-header /tmp/Rtmp4AKZEm/rmarkdown-str1fbb6a259363f0.html --mathjax --variable 'mathjax-url:https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --variable code_folding=hide --variable code_menu=1
## 
## Output created: example3.html
rmarkdown::render("example4.Rmd")
## 
## 
## processing file: example4.Rmd
## 
  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |..                                                                    |   3%
##    inline R code fragments
## 
## 
  |                                                                            
  |.....                                                                 |   7%
## label: begin
## 
  |                                                                            
  |.......                                                               |  10%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.........                                                             |  13%
## label: getdata (with options) 
## List of 2
##  $ fig.width : num 7
##  $ fig.height: num 7
## 
## 
  |                                                                            
  |............                                                          |  17%
##   ordinary text without R code
## 
## 
  |                                                                            
  |..............                                                        |  20%
## label: filter
## 
  |                                                                            
  |................                                                      |  23%
##   ordinary text without R code
## 
## 
  |                                                                            
  |...................                                                   |  27%
## label: mds
## 
  |                                                                            
  |.....................                                                 |  30%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.......................                                               |  33%
## label: deseq2
## 
  |                                                                            
  |..........................                                            |  37%
##   ordinary text without R code
## 
## 
  |                                                                            
  |............................                                          |  40%
## label: deplots (with options) 
## List of 2
##  $ fig.width : num 7
##  $ fig.height: num 7
## 
  |                                                                            
  |..............................                                        |  43%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.................................                                     |  47%
## label: reactome
## 
  |                                                                            
  |...................................                                   |  50%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.....................................                                 |  53%
## label: mitch1
## 
  |                                                                            
  |........................................                              |  57%
##   ordinary text without R code
## 
## 
  |                                                                            
  |..........................................                            |  60%
## label: cp1
## 
  |                                                                            
  |............................................                          |  63%
##   ordinary text without R code
## 
## 
  |                                                                            
  |...............................................                       |  67%
## label: cp2
## 
  |                                                                            
  |.................................................                     |  70%
##   ordinary text without R code
## 
## 
  |                                                                            
  |...................................................                   |  73%
## label: cp3
## 
  |                                                                            
  |......................................................                |  77%
##   ordinary text without R code
## 
## 
  |                                                                            
  |........................................................              |  80%
## label: cp4
## 
  |                                                                            
  |..........................................................            |  83%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.............................................................         |  87%
## label: venn1
## 
  |                                                                            
  |...............................................................       |  90%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.................................................................     |  93%
## label: jacc1
## 
  |                                                                            
  |....................................................................  |  97%
##   ordinary text without R code
## 
## 
  |                                                                            
  |......................................................................| 100%
## label: session
## output file: example4.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS example4.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output example4.html --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --standalone --section-divs --table-of-contents --toc-depth 3 --variable toc_float=1 --variable toc_selectors=h1,h2,h3 --variable toc_collapsed=1 --variable toc_smooth_scroll=1 --variable toc_print=1 --template /usr/local/lib/R/site-library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --include-in-header /tmp/Rtmp4AKZEm/rmarkdown-str1fbb6a67754290.html --mathjax --variable 'mathjax-url:https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --variable code_folding=hide --variable code_menu=1
## 
## Output created: example4.html
rmarkdown::render("example5.Rmd")
## 
## 
## processing file: example5.Rmd
## 
  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |..                                                                    |   3%
##    inline R code fragments
## 
## 
  |                                                                            
  |.....                                                                 |   7%
## label: begin
## 
  |                                                                            
  |.......                                                               |  10%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.........                                                             |  13%
## label: getdata (with options) 
## List of 2
##  $ fig.width : num 7
##  $ fig.height: num 7
## 
## 
  |                                                                            
  |............                                                          |  17%
##   ordinary text without R code
## 
## 
  |                                                                            
  |..............                                                        |  20%
## label: filter
## 
  |                                                                            
  |................                                                      |  23%
##   ordinary text without R code
## 
## 
  |                                                                            
  |...................                                                   |  27%
## label: mds
## 
  |                                                                            
  |.....................                                                 |  30%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.......................                                               |  33%
## label: deseq2
## 
  |                                                                            
  |..........................                                            |  37%
##   ordinary text without R code
## 
## 
  |                                                                            
  |............................                                          |  40%
## label: deplots (with options) 
## List of 2
##  $ fig.width : num 7
##  $ fig.height: num 7
## 
  |                                                                            
  |..............................                                        |  43%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.................................                                     |  47%
## label: reactome
## 
  |                                                                            
  |...................................                                   |  50%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.....................................                                 |  53%
## label: mitch1
## 
  |                                                                            
  |........................................                              |  57%
##   ordinary text without R code
## 
## 
  |                                                                            
  |..........................................                            |  60%
## label: cp1
## 
  |                                                                            
  |............................................                          |  63%
##   ordinary text without R code
## 
## 
  |                                                                            
  |...............................................                       |  67%
## label: cp2
## 
  |                                                                            
  |.................................................                     |  70%
##   ordinary text without R code
## 
## 
  |                                                                            
  |...................................................                   |  73%
## label: cp3
## 
  |                                                                            
  |......................................................                |  77%
##   ordinary text without R code
## 
## 
  |                                                                            
  |........................................................              |  80%
## label: cp4
## 
  |                                                                            
  |..........................................................            |  83%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.............................................................         |  87%
## label: venn1
## 
  |                                                                            
  |...............................................................       |  90%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.................................................................     |  93%
## label: jacc1
## 
  |                                                                            
  |....................................................................  |  97%
##   ordinary text without R code
## 
## 
  |                                                                            
  |......................................................................| 100%
## label: session
## output file: example5.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS example5.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output example5.html --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --standalone --section-divs --table-of-contents --toc-depth 3 --variable toc_float=1 --variable toc_selectors=h1,h2,h3 --variable toc_collapsed=1 --variable toc_smooth_scroll=1 --variable toc_print=1 --template /usr/local/lib/R/site-library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --include-in-header /tmp/Rtmp4AKZEm/rmarkdown-str1fbb6a69e4ce67.html --mathjax --variable 'mathjax-url:https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --variable code_folding=hide --variable code_menu=1
## 
## Output created: example5.html
rmarkdown::render("example6.Rmd")
## 
## 
## processing file: example6.Rmd
## 
  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |..                                                                    |   3%
##    inline R code fragments
## 
## 
  |                                                                            
  |.....                                                                 |   7%
## label: begin
## 
  |                                                                            
  |.......                                                               |  10%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.........                                                             |  13%
## label: getdata (with options) 
## List of 2
##  $ fig.width : num 7
##  $ fig.height: num 7
## 
## 
  |                                                                            
  |............                                                          |  17%
##   ordinary text without R code
## 
## 
  |                                                                            
  |..............                                                        |  20%
## label: filter
## 
  |                                                                            
  |................                                                      |  23%
##   ordinary text without R code
## 
## 
  |                                                                            
  |...................                                                   |  27%
## label: mds
## 
  |                                                                            
  |.....................                                                 |  30%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.......................                                               |  33%
## label: deseq2
## 
  |                                                                            
  |..........................                                            |  37%
##   ordinary text without R code
## 
## 
  |                                                                            
  |............................                                          |  40%
## label: deplots (with options) 
## List of 2
##  $ fig.width : num 7
##  $ fig.height: num 7
## 
  |                                                                            
  |..............................                                        |  43%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.................................                                     |  47%
## label: reactome
## 
  |                                                                            
  |...................................                                   |  50%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.....................................                                 |  53%
## label: mitch1
## 
  |                                                                            
  |........................................                              |  57%
##   ordinary text without R code
## 
## 
  |                                                                            
  |..........................................                            |  60%
## label: cp1
## 
  |                                                                            
  |............................................                          |  63%
##   ordinary text without R code
## 
## 
  |                                                                            
  |...............................................                       |  67%
## label: cp2
## 
  |                                                                            
  |.................................................                     |  70%
##   ordinary text without R code
## 
## 
  |                                                                            
  |...................................................                   |  73%
## label: cp3
## 
  |                                                                            
  |......................................................                |  77%
##   ordinary text without R code
## 
## 
  |                                                                            
  |........................................................              |  80%
## label: cp4
## 
  |                                                                            
  |..........................................................            |  83%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.............................................................         |  87%
## label: venn1
## 
  |                                                                            
  |...............................................................       |  90%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.................................................................     |  93%
## label: jacc1
## 
  |                                                                            
  |....................................................................  |  97%
##   ordinary text without R code
## 
## 
  |                                                                            
  |......................................................................| 100%
## label: session
## output file: example6.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS example6.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output example6.html --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --standalone --section-divs --table-of-contents --toc-depth 3 --variable toc_float=1 --variable toc_selectors=h1,h2,h3 --variable toc_collapsed=1 --variable toc_smooth_scroll=1 --variable toc_print=1 --template /usr/local/lib/R/site-library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --include-in-header /tmp/Rtmp4AKZEm/rmarkdown-str1fbb6a4a2af09f.html --mathjax --variable 'mathjax-url:https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --variable code_folding=hide --variable code_menu=1
## 
## Output created: example6.html
rmarkdown::render("example7.Rmd")
## 
## 
## processing file: example7.Rmd
## 
  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |..                                                                    |   3%
##    inline R code fragments
## 
## 
  |                                                                            
  |.....                                                                 |   7%
## label: begin
## 
  |                                                                            
  |.......                                                               |  10%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.........                                                             |  13%
## label: getdata (with options) 
## List of 2
##  $ fig.width : num 7
##  $ fig.height: num 7
## 
## 
  |                                                                            
  |............                                                          |  17%
##   ordinary text without R code
## 
## 
  |                                                                            
  |..............                                                        |  20%
## label: filter
## 
  |                                                                            
  |................                                                      |  23%
##   ordinary text without R code
## 
## 
  |                                                                            
  |...................                                                   |  27%
## label: mds
## 
  |                                                                            
  |.....................                                                 |  30%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.......................                                               |  33%
## label: deseq2
## 
  |                                                                            
  |..........................                                            |  37%
##   ordinary text without R code
## 
## 
  |                                                                            
  |............................                                          |  40%
## label: deplots (with options) 
## List of 2
##  $ fig.width : num 7
##  $ fig.height: num 7
## 
  |                                                                            
  |..............................                                        |  43%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.................................                                     |  47%
## label: reactome
## 
  |                                                                            
  |...................................                                   |  50%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.....................................                                 |  53%
## label: mitch1
## 
  |                                                                            
  |........................................                              |  57%
##   ordinary text without R code
## 
## 
  |                                                                            
  |..........................................                            |  60%
## label: cp1
## 
  |                                                                            
  |............................................                          |  63%
##   ordinary text without R code
## 
## 
  |                                                                            
  |...............................................                       |  67%
## label: cp2
## 
  |                                                                            
  |.................................................                     |  70%
##   ordinary text without R code
## 
## 
  |                                                                            
  |...................................................                   |  73%
## label: cp3
## 
  |                                                                            
  |......................................................                |  77%
##   ordinary text without R code
## 
## 
  |                                                                            
  |........................................................              |  80%
## label: cp4
## 
  |                                                                            
  |..........................................................            |  83%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.............................................................         |  87%
## label: venn1
## 
  |                                                                            
  |...............................................................       |  90%
##   ordinary text without R code
## 
## 
  |                                                                            
  |.................................................................     |  93%
## label: jacc1
## 
  |                                                                            
  |....................................................................  |  97%
##   ordinary text without R code
## 
## 
  |                                                                            
  |......................................................................| 100%
## label: session
## output file: example7.knit.md
## /usr/bin/pandoc +RTS -K512m -RTS example7.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output example7.html --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --standalone --section-divs --table-of-contents --toc-depth 3 --variable toc_float=1 --variable toc_selectors=h1,h2,h3 --variable toc_collapsed=1 --variable toc_smooth_scroll=1 --variable toc_print=1 --template /usr/local/lib/R/site-library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --include-in-header /tmp/Rtmp4AKZEm/rmarkdown-str1fbb6a2842084d.html --mathjax --variable 'mathjax-url:https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --variable code_folding=hide --variable code_menu=1
## 
## Output created: example7.html

Summarise

Here I’m summarising the results of the five example data sets.

exdat=NULL
ex1dat <- readRDS("ex1dat.rds")
ex2dat <- readRDS("ex2dat.rds")
ex3dat <- readRDS("ex3dat.rds")
ex4dat <- readRDS("ex4dat.rds")
ex5dat <- readRDS("ex5dat.rds")
ex6dat <- readRDS("ex6dat.rds")
ex7dat <- readRDS("ex7dat.rds")

exdat <- rbind(ex1dat,ex2dat,ex3dat,ex4dat,ex5dat,ex6dat,ex7dat)
rownames(exdat) <- c("SRP128998", "SRP038101", "SRP096178","SRP038101","SRP247621","SRP253951","SRP068733")

exdat %>% kbl(caption="jaccard index values across seven RNA-seq studies") %>% kable_paper("hover", full_width = F)
jaccard index values across seven RNA-seq studies
FCS vs ORA ORA vs ORA* FCS vs ORA* ORA vs ORA comb ORA vs ORA* comb
SRP128998 0.6494118 0.4391785 0.5578947 0.0401338 0.0712074
SRP038101 0.5360624 0.3631040 0.5357143 0.2439863 0.3706468
SRP096178 0.6645963 0.4019608 0.4871324 0.0000000 0.2492308
SRP038101 0.6292135 0.4209524 0.5563506 0.4201389 0.4634703
SRP247621 0.4826087 0.1779242 0.3162939 0.0084746 0.0083333
SRP253951 0.5710900 0.4003350 0.5656878 0.0688406 0.3387358
SRP068733 0.5877863 0.2017094 0.2970779 0.2688172 0.1871921
means <- colMeans(exdat)
medians <- apply(exdat,2,median)
sds <- apply(exdat,2,sd)
summstats <- rbind(means,medians,sds)
summstats %>% kbl(caption="summary statistics of different enrichment analysis comparisons") %>% kable_paper("hover", full_width = F)
summary statistics of different enrichment analysis comparisons
FCS vs ORA ORA vs ORA* FCS vs ORA* ORA vs ORA comb ORA vs ORA* comb
means 0.5886813 0.3435949 0.4737359 0.1500559 0.2412595
medians 0.5877863 0.4003350 0.5357143 0.0688406 0.2492308
sds 0.0650955 0.1077847 0.1171750 0.1618193 0.1642049

Here let’s plot the jaccard scores. First as a boxplot and then overlay the dataset studies over the top.

cols <- c("#CC79A7","#56B4E9","#E69F00","#F0E442","#009E73","#0072B2","#D55E00")
coll <- list(cols, cols, cols, cols, cols)
par(mar=c(5,10,3,1))
boxplot(list(exdat[,5],exdat[,4],exdat[,3],exdat[,2],exdat[,1]),names = rev(colnames(exdat)),horizontal = TRUE, las=1 , col="white", cex=1.5,pch=19, xlab = "Jaccard index")
beeswarm(list(exdat[,5],exdat[,4],exdat[,3],exdat[,2],exdat[,1]),labels = rev(colnames(exdat)),horizontal = TRUE, las=1 , pwcol = coll,cex=1.5,pch=19, xlab = "Jaccard index",add = TRUE)
legend("bottomright", legend=c("SRP128998", "SRP038101", "SRP096178","SRP038101","SRP247621","SRP253951","SRP068733"), pch=19,  col=cols, cex=1,pt.cex = 1.5)

pdf("images/jacbox1.pdf",width=5,height=4)
par(mar=c(5,9,3,2))
boxplot(list(exdat[,5],exdat[,4],exdat[,3],exdat[,2],exdat[,1]),names = rev(colnames(exdat)),horizontal = TRUE, las=1 , col="white", cex=1.5,pch=19, xlab = "Jaccard index")
beeswarm(list(exdat[,5],exdat[,4],exdat[,3],exdat[,2],exdat[,1]),labels = rev(colnames(exdat)),horizontal = TRUE, las=1 , pwcol = coll,cex=1.5,pch=19, xlab = "Jaccard index",add = TRUE)
legend("topleft", legend=c("SRP128998", "SRP038101", "SRP096178","SRP038101","SRP247621","SRP253951","SRP068733"), pch=19,  col=cols, cex=1,pt.cex = 1.5)
dev.off()
## png 
##   2
png("images/jacbox1.png")
par(mar=c(5,9,3,1))
boxplot(list(exdat[,5],exdat[,4],exdat[,3],exdat[,2],exdat[,1]),names = rev(colnames(exdat)),horizontal = TRUE, las=1 , col="white", cex=1.5,pch=19, xlab = "Jaccard index")
beeswarm(list(exdat[,5],exdat[,4],exdat[,3],exdat[,2],exdat[,1]),labels = rev(colnames(exdat)),horizontal = TRUE, las=1 , pwcol = coll,cex=1.5,pch=19, xlab = "Jaccard index",add = TRUE)
legend("bottomright", legend=c("SRP128998", "SRP038101", "SRP096178","SRP038101","SRP247621","SRP253951","SRP068733"), pch=19,  col=cols, cex=1.2,pt.cex = 1.5)
dev.off()
## png 
##   2

Now plot as a simple bargraph

mymean <- colMeans(exdat)
mysd <- apply(exdat,2,sd)

par(mar=c(5,10,3,1))
barplot(rev(colMeans(exdat)),xlab="mean Jaccard index",horiz = TRUE, las =1, xlim=c(0,.7) )

pdf("images/jacbar1.pdf",width=4,height=4)
par(mar=c(5,10,3,1))
barplot(rev(colMeans(exdat)),xlab="mean Jaccard index",horiz = TRUE, las =1, xlim=c(0,.7) )
dev.off()
## png 
##   2
png("images/jacbar1.png")
par(mar=c(5,10,3,1))
barplot(rev(colMeans(exdat)),xlab="mean Jaccard index",horiz = TRUE, las =1, xlim=c(0,.7) )
dev.off()
## png 
##   2

Session information

sessionInfo()
## R version 4.1.2 (2021-11-01)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 20.04.3 LTS
## 
## Matrix products: default
## BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/liblapack.so.3
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## attached base packages:
## [1] parallel  stats4    stats     graphics  grDevices utils     datasets 
## [8] methods   base     
## 
## other attached packages:
##  [1] rmdformats_1.0.3            beeswarm_0.4.0             
##  [3] eulerr_6.1.1                mitch_1.5.1                
##  [5] clusterProfiler_4.0.5       DESeq2_1.32.0              
##  [7] SummarizedExperiment_1.22.0 Biobase_2.52.0             
##  [9] MatrixGenerics_1.4.3        matrixStats_0.61.0         
## [11] GenomicRanges_1.44.0        GenomeInfoDb_1.28.4        
## [13] IRanges_2.26.0              S4Vectors_0.30.0           
## [15] BiocGenerics_0.38.0         getDEE2_1.2.0              
## [17] anytime_0.3.9               kableExtra_1.3.4           
## [19] XML_3.99-0.8                reutils_0.2.3              
## [21] vioplot_0.3.7               zoo_1.8-9                  
## [23] sm_2.2-5.7                  wordcloud_2.6              
## [25] RColorBrewer_1.1-2          rsvg_2.1.2                 
## [27] DiagrammeRsvg_0.1           DiagrammeR_1.0.6.1         
## [29] forcats_0.5.1               stringr_1.4.0              
## [31] dplyr_1.0.7                 purrr_0.3.4                
## [33] readr_2.0.2                 tidyr_1.1.4                
## [35] tibble_3.1.5                ggplot2_3.3.5              
## [37] tidyverse_1.3.1            
## 
## loaded via a namespace (and not attached):
##   [1] utf8_1.2.2             tidyselect_1.1.1       RSQLite_2.2.8         
##   [4] AnnotationDbi_1.54.1   htmlwidgets_1.5.4      grid_4.1.2            
##   [7] BiocParallel_1.26.2    scatterpie_0.1.7       munsell_0.5.0         
##  [10] withr_2.4.2            colorspace_2.0-2       GOSemSim_2.18.1       
##  [13] highr_0.9              knitr_1.36             rstudioapi_0.13       
##  [16] DOSE_3.18.3            GenomeInfoDbData_1.2.6 polyclip_1.10-0       
##  [19] bit64_4.0.5            farver_2.1.0           downloader_0.4        
##  [22] vctrs_0.3.8            treeio_1.16.2          generics_0.1.0        
##  [25] xfun_0.26              R6_2.5.1               graphlayouts_0.7.2    
##  [28] locfit_1.5-9.4         bitops_1.0-7           cachem_1.0.6          
##  [31] reshape_0.8.8          fgsea_1.18.0           gridGraphics_0.5-1    
##  [34] DelayedArray_0.18.0    assertthat_0.2.1       promises_1.2.0.1      
##  [37] scales_1.1.1           ggraph_2.0.5           enrichplot_1.12.3     
##  [40] gtable_0.3.0           tidygraph_1.2.0        rlang_0.4.11          
##  [43] genefilter_1.74.0      systemfonts_1.0.2      splines_4.1.2         
##  [46] lazyeval_0.2.2         htm2txt_2.1.1          broom_0.7.9           
##  [49] yaml_2.2.1             reshape2_1.4.4         modelr_0.1.8          
##  [52] backports_1.2.1        httpuv_1.6.3           qvalue_2.24.0         
##  [55] tools_4.1.2            bookdown_0.24          ggplotify_0.1.0       
##  [58] gplots_3.1.1           ellipsis_0.3.2         jquerylib_0.1.4       
##  [61] Rcpp_1.0.7             plyr_1.8.6             visNetwork_2.1.0      
##  [64] zlibbioc_1.38.0        RCurl_1.98-1.5         viridis_0.6.1         
##  [67] cowplot_1.1.1          haven_2.4.3            ggrepel_0.9.1         
##  [70] fs_1.5.0               magrittr_2.0.1         data.table_1.14.2     
##  [73] DO.db_2.9              reprex_2.0.1           hms_1.1.1             
##  [76] patchwork_1.1.1        mime_0.12              evaluate_0.14         
##  [79] xtable_1.8-4           readxl_1.3.1           gridExtra_2.3         
##  [82] compiler_4.1.2         KernSmooth_2.23-20     V8_3.6.0              
##  [85] crayon_1.4.1           shadowtext_0.0.9       htmltools_0.5.2       
##  [88] ggfun_0.0.4            later_1.3.0            tzdb_0.1.2            
##  [91] geneplotter_1.70.0     aplot_0.1.1            lubridate_1.8.0       
##  [94] DBI_1.1.1              tweenr_1.0.2           dbplyr_2.1.1          
##  [97] MASS_7.3-54            Matrix_1.3-4           cli_3.0.1             
## [100] igraph_1.2.6           pkgconfig_2.0.3        xml2_1.3.2            
## [103] ggtree_3.0.4           svglite_2.0.0          annotate_1.70.0       
## [106] bslib_0.3.1            webshot_0.5.2          XVector_0.32.0        
## [109] rvest_1.0.1            yulab.utils_0.0.4      digest_0.6.28         
## [112] Biostrings_2.60.2      polylabelr_0.2.0       rmarkdown_2.11        
## [115] cellranger_1.1.0       fastmatch_1.1-3        tidytree_0.3.6        
## [118] curl_4.3.2             gtools_3.9.2           shiny_1.7.1           
## [121] lifecycle_1.0.1        nlme_3.1-153           jsonlite_1.7.2        
## [124] echarts4r_0.4.2        viridisLite_0.4.0      fansi_0.5.0           
## [127] pillar_1.6.3           lattice_0.20-45        GGally_2.1.2          
## [130] KEGGREST_1.32.0        fastmap_1.1.0          httr_1.4.2            
## [133] survival_3.2-13        GO.db_3.13.0           glue_1.4.2            
## [136] png_0.1-7              bit_4.0.4              ggforce_0.3.3         
## [139] stringi_1.7.5          sass_0.4.0             blob_1.2.2            
## [142] caTools_1.18.2         memoise_2.0.0          ape_5.5