diff --git a/docs/lectures/README.md b/docs/lectures/README.md deleted file mode 100644 index 2cd669839d4efad84250dcf0aabc9ed6360d36bd..0000000000000000000000000000000000000000 --- a/docs/lectures/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# Lectures - -## Requirements - -Install the required packages using: - -```bash -conda env create -f environment.yml -``` - -## Rendering in html - -Lectures in **Rmarkdown** format can be rendered using the following from -the command line: - -```bash -Rscript -e 'rmarkdown::render("<Rmd-file>", "xaringan::moon_reader")' -``` - -Lectures in **Jupyter notebook** format can be rendered using: - -```bash -jupyter nbconvert <.ipynb-file> --to slides --debug --allow-chromium-download -``` - -## Rendering in pdf - -Lectures in **Rmarkdown** format can be rendered using the following from -the command line: - -```bash -Rscript -e 'library(webshot); webshot("<Rmd-file>", "<pdf-file-output>")' -``` - -Lectures in **Jupyter notebook** format can be rendered using: - -```bash -jupyter nbconvert <.ipynb-file> --to webpdf --debug --allow-chromium-download -``` - - -## Render everything - -To render all lectures you can use `snakemake`: - -```bash -snakemake -j 1 -``` diff --git a/docs/lectures/Snakefile b/docs/lectures/Snakefile deleted file mode 100644 index 338ce41326107046ad47fc33ff0062ef4f6e257b..0000000000000000000000000000000000000000 --- a/docs/lectures/Snakefile +++ /dev/null @@ -1,55 +0,0 @@ -# A snakefile used to render all lectures in one go - -from glob import glob -import os.path as path - -rmd_files = glob("*/*.Rmd") -ipy_files = glob("*/*.ipynb") - -ruleorder: render_jupyter_pdf > render_pdf - -rule all: - input: - ["{}.html".format(path.splitext(x)[0]) for x in rmd_files + ipy_files], - ["{}.pdf".format(path.splitext(x)[0]) for x in rmd_files + ipy_files] - -rule render_rmarkdown: - input: - "{f}.Rmd" - output: - "{f}.html" - shell: - """ - Rscript -e 'rmarkdown::render("{input}", "xaringan::moon_reader")' - """ - -rule render_pdf: - input: - "{f}.html" - output: - "{f}.pdf" - shell: - """ - Rscript -e 'library(webshot); webshot("{input[0]}", "{output[0]}")' - """ - -rule render_jupyter: - input: - "{f}.ipynb" - output: - "{f}.html" - shell: - """ - jupyter nbconvert --to slides --execute {input} - mv {wildcards.f}.slides.html {output} - """ - -rule render_jupyter_pdf: - input: - "{f}.ipynb" - output: - "{f}.pdf" - shell: - """ - jupyter nbconvert --to webpdf {input} --allow-chromium-download - """ diff --git a/docs/lectures/environment.yml b/docs/lectures/environment.yml deleted file mode 100644 index 1a7ff761210c340ea860a93ccd3f6acec864de7f..0000000000000000000000000000000000000000 --- a/docs/lectures/environment.yml +++ /dev/null @@ -1,36 +0,0 @@ -# conda env create -f environment.yml - -name: lecture-env -channels: - - r - - conda-forge - - bioconda - - defaults -dependencies: - - # Snakemake - - snakemake-minimal=6.0.5 - - # Jupyter - - python=3.8 - - numpy<1.20 - - jupyter=1.0 - - pandas=1.0 - - jupyter_contrib_nbextensions=0.5.1 - - nbconvert=6.1.0 - - rise=5.6 - - seaborn=0.10 - - rpy2=3.1 - - pyppeteer=0.2.2 - - jinja2<=3.0.3 - - # R and Xaringan - - phantomjs=2.1.1 - - r-base=3.6.3 - - r-ggplot2=3.3.3 - - r-kableextra=1.1.0 - - r-palmerpenguins=0.1.0 - - r-stringi=1.4.6 - - r-tidyr=0.8.3 - - r-xaringan=0.15 - - r-webshot=0.5.2 diff --git a/docs/lectures/git/git.Rmd b/docs/lectures/git/git.Rmd deleted file mode 100644 index 7551207631e7ca6351700d162c068d702c295268..0000000000000000000000000000000000000000 --- a/docs/lectures/git/git.Rmd +++ /dev/null @@ -1,132 +0,0 @@ ---- -title: "Version control with Git" -subtitle: "Tools for Reproducible Research NBIS course" -output: - xaringan::moon_reader: - self-contained: true - seal: false - css: ["default", "../template.css"] - nature: - slideNumberFormat: "" ---- - -layout: true -<div class="ird-logo"></div> -<div class="mivegec-logo"></div> - ---- - -class: center, middle - -*Version control with* - -<img src="https://git-scm.com/images/logos/downloads/Git-Logo-2Color.png" style="width:50%;"/> - ---- - -# What is Git? - --- - -* A widely used system for distributed .green[version control] - --- - -* Keeps a .green[complete history] of the changes you make to your files - --- - -* Each point in the history can be re-visited and compared with others - --- - -* Git tracks .green[who contributed what] to your code - --- - -* Git can help you .green[version, backup and share] your code and documents - --- - -* Kind of like Dropbox, but you decide when each version is saved (plus a lot - of more advanced features) - --- - -* Git is mainly used for .green[text files], not large or binary files - ---- - -# Git nomenclature - --- - -* A .green[repository] is a collection that encompasses all the files and - directories of a project - --- - -* A .green[commit] is a snapshot of a repository's history, *i.e.* a point - in development time - --- - -* Development can be separated into .green[branches], allowing for concurrent - work on the same repository with simple transitions between functional and - work-in-progress code - --- - -* Uploading changes to a remote repository is called .green[pushing], while - downloading changes is called .green[pulling] - ---- - -# Tracking code in three steps - -<br> -<center> -<img src="git_overview_local.png" style="width:50%"/> -</center> -<br> - --- - -1. Do some .green[coding] (*i.e.* add or change contents of files) - --- - -2. .green[Stage] the changes (*i.e.* specify which changes should be stored) - --- - -3. .green[Commit] the changes (storing them in the repository's history) - ---- - -# Git is highly versatile - -* Ensures .green[reproducibility] of your analyses, regardless of whether you’ve - made additional changes to your code after the analysis is run - --- - -* Easily .green[fix mistakes] by reverting files to previous versions - --- - -* Improves your coding by giving you .green[additional structure] - --- - -* Your code has a .green[backup] in your remote repository - --- - -* Easily .green[share your code] and collaborate with your colleagues - ---- - -class: center, middle - -# Questions? diff --git a/docs/lectures/git/git.html b/docs/lectures/git/git.html deleted file mode 100644 index 7c1cd0f16a94e17bc9b834a5dafbf9fddc519aaf..0000000000000000000000000000000000000000 --- a/docs/lectures/git/git.html +++ /dev/null @@ -1,246 +0,0 @@ -<!DOCTYPE html> -<html lang="" xml:lang=""> - <head> - <title>Version control with Git</title> - <meta charset="utf-8" /> - <link href="git_files/remark-css-0.0.1/default.css" rel="stylesheet" /> - <link rel="stylesheet" href="../template.css" type="text/css" /> - </head> - <body> - <textarea id="source"> - - -layout: true -<div class="ird-logo"></div> -<div class="mivegec-logo"></div> - ---- - -class: center, middle - -*Version control with* - -<img src="https://git-scm.com/images/logos/downloads/Git-Logo-2Color.png" style="width:50%;"/> - ---- - -# What is Git? - --- - -* A widely used system for distributed .green[version control] - --- - -* Keeps a .green[complete history] of the changes you make to your files - --- - -* Each point in the history can be re-visited and compared with others - --- - -* Git tracks .green[who contributed what] to your code - --- - -* Git can help you .green[version, backup and share] your code and documents - --- - -* Kind of like Dropbox, but you decide when each version is saved (plus a lot - of more advanced features) - --- - -* Git is mainly used for .green[text files], not large or binary files - ---- - -# Git nomenclature - --- - -* A .green[repository] is a collection that encompasses all the files and - directories of a project - --- - -* A .green[commit] is a snapshot of a repository's history, *i.e.* a point - in development time - --- - -* Development can be separated into .green[branches], allowing for concurrent - work on the same repository with simple transitions between functional and - work-in-progress code - --- - -* Uploading changes to a remote repository is called .green[pushing], while - downloading changes is called .green[pulling] - ---- - -# Tracking code in three steps - -<br> -<center> -<img src="git_overview_local.png" style="width:50%"/> -</center> -<br> - --- - -1. Do some .green[coding] (*i.e.* add or change contents of files) - --- - -2. .green[Stage] the changes (*i.e.* specify which changes should be stored) - --- - -3. .green[Commit] the changes (storing them in the repository's history) - ---- - -# Git is highly versatile - -* Ensures .green[reproducibility] of your analyses, regardless of whether you’ve - made additional changes to your code after the analysis is run - --- - -* Easily .green[fix mistakes] by reverting files to previous versions - --- - -* Improves your coding by giving you .green[additional structure] - --- - -* Your code has a .green[backup] in your remote repository - --- - -* Easily .green[share your code] and collaborate with your colleagues - ---- - -class: center, middle - -# Questions? - </textarea> -<style data-target="print-only">@media screen {.remark-slide-container{display:block;}.remark-slide-scaler{box-shadow:none;}}</style> -<script src="https://remarkjs.com/downloads/remark-latest.min.js"></script> -<script>var slideshow = remark.create({ -"slideNumberFormat": "" -}); -if (window.HTMLWidgets) slideshow.on('afterShowSlide', function (slide) { - window.dispatchEvent(new Event('resize')); -}); -(function(d) { - var s = d.createElement("style"), r = d.querySelector(".remark-slide-scaler"); - if (!r) return; - s.type = "text/css"; s.innerHTML = "@page {size: " + r.style.width + " " + r.style.height +"; }"; - d.head.appendChild(s); -})(document); - -(function(d) { - var el = d.getElementsByClassName("remark-slides-area"); - if (!el) return; - var slide, slides = slideshow.getSlides(), els = el[0].children; - for (var i = 1; i < slides.length; i++) { - slide = slides[i]; - if (slide.properties.continued === "true" || slide.properties.count === "false") { - els[i - 1].className += ' has-continuation'; - } - } - var s = d.createElement("style"); - s.type = "text/css"; s.innerHTML = "@media print { .has-continuation { display: none; } }"; - d.head.appendChild(s); -})(document); -// delete the temporary CSS (for displaying all slides initially) when the user -// starts to view slides -(function() { - var deleted = false; - slideshow.on('beforeShowSlide', function(slide) { - if (deleted) return; - var sheets = document.styleSheets, node; - for (var i = 0; i < sheets.length; i++) { - node = sheets[i].ownerNode; - if (node.dataset["target"] !== "print-only") continue; - node.parentNode.removeChild(node); - } - deleted = true; - }); -})(); -(function() { - "use strict" - /* Replace <script> tags in slides area to make them executable - * - * Runs after post-processing of markdown source into slides and replaces only - * <script>s on the last slide of continued slides using the .has-continuation - * class added by xaringan. Finally, any <script>s in the slides area that - * aren't executed are commented out. - */ - var scripts = document.querySelectorAll( - '.remark-slides-area .remark-slide-container:not(.has-continuation) script' - ); - if (!scripts.length) return; - for (var i = 0; i < scripts.length; i++) { - var s = document.createElement('script'); - var code = document.createTextNode(scripts[i].textContent); - s.appendChild(code); - scripts[i].parentElement.replaceChild(s, scripts[i]); - } - var scriptsNotExecuted = document.querySelectorAll( - '.remark-slides-area .remark-slide-container.has-continuation script' - ); - if (!scriptsNotExecuted.length) return; - for (var i = 0; i < scriptsNotExecuted.length; i++) { - var comment = document.createComment(scriptsNotExecuted[i].outerHTML) - scriptsNotExecuted[i].parentElement.replaceChild(comment, scriptsNotExecuted[i]) - } -})(); -(function() { - var links = document.getElementsByTagName('a'); - for (var i = 0; i < links.length; i++) { - if (/^(https?:)?\/\//.test(links[i].getAttribute('href'))) { - links[i].target = '_blank'; - } - } -})();</script> - -<script> -slideshow._releaseMath = function(el) { - var i, text, code, codes = el.getElementsByTagName('code'); - for (i = 0; i < codes.length;) { - code = codes[i]; - if (code.parentNode.tagName !== 'PRE' && code.childElementCount === 0) { - text = code.textContent; - if (/^\\\((.|\s)+\\\)$/.test(text) || /^\\\[(.|\s)+\\\]$/.test(text) || - /^\$\$(.|\s)+\$\$$/.test(text) || - /^\\begin\{([^}]+)\}(.|\s)+\\end\{[^}]+\}$/.test(text)) { - code.outerHTML = code.innerHTML; // remove <code></code> - continue; - } - } - i++; - } -}; -slideshow._releaseMath(document); -</script> -<!-- dynamically load mathjax for compatibility with self-contained --> -<script> -(function () { - var script = document.createElement('script'); - script.type = 'text/javascript'; - script.src = 'https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-MML-AM_CHTML'; - if (location.protocol !== 'file:' && /^https?:/.test(script.src)) - script.src = script.src.replace(/^https?:/, ''); - document.getElementsByTagName('head')[0].appendChild(script); -})(); -</script> - </body> -</html> diff --git a/docs/lectures/git/git.pdf b/docs/lectures/git/git.pdf deleted file mode 100644 index fdf7a6607643404bb986084324ff2cfff0eeb34b..0000000000000000000000000000000000000000 Binary files a/docs/lectures/git/git.pdf and /dev/null differ diff --git a/docs/lectures/git/git_overview_local.png b/docs/lectures/git/git_overview_local.png deleted file mode 100644 index edfceae6b734fe72c4438257a1fb9603d5414a2f..0000000000000000000000000000000000000000 Binary files a/docs/lectures/git/git_overview_local.png and /dev/null differ diff --git a/docs/lectures/pptx/git_2023.pdf b/docs/lectures/git_2023.pdf similarity index 100% rename from docs/lectures/pptx/git_2023.pdf rename to docs/lectures/git_2023.pdf diff --git a/docs/lectures/pptx/git_2023.pptx b/docs/lectures/git_2023.pptx similarity index 100% rename from docs/lectures/pptx/git_2023.pptx rename to docs/lectures/git_2023.pptx diff --git a/docs/lectures/git_2024.pdf b/docs/lectures/git_2024.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1699d5e4c421d43e365e1f8418a9660de6df2fba Binary files /dev/null and b/docs/lectures/git_2024.pdf differ diff --git a/docs/lectures/git_2024.pptx b/docs/lectures/git_2024.pptx new file mode 100644 index 0000000000000000000000000000000000000000..d7b5e0409f58192f620ffb9782cac65c08daeb6a Binary files /dev/null and b/docs/lectures/git_2024.pptx differ diff --git a/docs/lectures/images/IRD.png b/docs/lectures/images/IRD.png deleted file mode 100644 index cd884e39b8e5e127020d93698a339bf31aab9e60..0000000000000000000000000000000000000000 Binary files a/docs/lectures/images/IRD.png and /dev/null differ diff --git a/docs/lectures/images/MIVEGEC.png b/docs/lectures/images/MIVEGEC.png deleted file mode 100644 index becf516d2875fef051e034cc855b3a79fef42126..0000000000000000000000000000000000000000 Binary files a/docs/lectures/images/MIVEGEC.png and /dev/null differ diff --git a/docs/lectures/images/reproducibility-overview.png b/docs/lectures/images/reproducibility-overview.png deleted file mode 100644 index a34aa0f41ae9af460c73a90c8a65e276e12968c7..0000000000000000000000000000000000000000 Binary files a/docs/lectures/images/reproducibility-overview.png and /dev/null differ diff --git a/docs/lectures/template.css b/docs/lectures/template.css deleted file mode 100644 index ee9501b04b7db504fa15c24d657af287e38008f4..0000000000000000000000000000000000000000 --- a/docs/lectures/template.css +++ /dev/null @@ -1,125 +0,0 @@ -/* CSS style general NBIS presentations using Xaringen and RMarkdown */ - -/* Import Google font */ -@import url('https://fonts.googleapis.com/css?family=Open+Sans&display=swap'); - -/* Fonts */ -body,p,h1,h2,h3,h4,h5,h6 { - font-family: 'Open Sans', sans-serif; - font-weight: 400; - font-size: 20px; - color: #333333; -} - -/* Header 1 font size */ -h1 { - font-size: 1.7em !important; -} - -/* Header 2 font size */ -h2 { - font-size: 1.2em !important; -} - -/* Header 3 font size */ -h3 { - font-size: 0.9em !important; -} - -/* Custom font sizes */ -.micro { font-size: 25% } -.tiny { font-size: 50% } -.small { font-size: 75% } -.large { font-size: 125% } -.huge { font-size: 150% } -.Huge { font-size: 200% } -.HUGE { font-size: 250% } - -.remark-code { font-size: 50% } - -/* Custom colours */ -.green { color: #85be42; font-weight: bold } -.dark-green { color: #487a2d; font-weight: bold } -.blue { color: #0099c2; font-weight: bold } -.dark-blue { color: #015491; font-weight: bold } -.light-grey { color: #999999 } -.grey { color: #666666 } -.dark-grey { color: #333333 } - -/* Set the maximum figure size to 100% of the slide */ -img, video, iframe { - max-width: 100%; - max-height: 100%; -} - -table_rot { - color: black; - text-transform: uppercase; - @include transform(rotate(270deg)) - @include transform-origin(0 0); -} - -/* SciLifeLab logo in bottom left corner */ -div.ird-logo { - content: ""; - background-image: url("images/IRD.png"); - background-repeat: no-repeat; - background-size: contain; - position: absolute; - bottom: 0px; - left: 15px; - height: 70px; - width: 200px; -} - -/* logo in bottom right corner */ -div.mivegec-logo { - content: ""; - background-image: url("images/MIVEGEC.png"); - background-repeat: no-repeat; - background-size: contain; - position: absolute; - bottom: 20px; - right: -70px; - height: 70px; - width: 200px; -} - - -/* Blockquotes */ -blockquote { - border-left: 5px solid #85be42; - background: #f9f9f9; - font-style: italic; - padding: 0.01em; - padding-left: 12px; - padding-right: 12px; - margin-left: 12px; - margin-right: 12px; - border-radius: 0 5px 5px 0; -} - -/* Link colour */ -a { - color: #85be42; - text-decoration: none; -} - -/* Underline links when hovering */ -a:hover { - text-decoration: underline; -} - -/* Inline code color and border */ -.remark-inline-code { - background: #f2f2f2; - border-radius: 3px; - margin-right: 2px; - padding: 2px 3px 1px; - font-size: 80% !important; -} - -.image-with-text { - display: inline-block; - vertical-align: middle; -}