Skip to content

Commit

Permalink
Updated contents at 20240312-160849
Browse files Browse the repository at this point in the history
  • Loading branch information
gh_action committed Mar 12, 2024
1 parent 958e5ea commit fbc8a90
Show file tree
Hide file tree
Showing 302 changed files with 1,068,080 additions and 21 deletions.
2 changes: 1 addition & 1 deletion 2403-canvas/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ <h1>Analysis of RNA-Seq Data</h1>
<hr />
<div class="landing-update">
<p class="small" style="color:#bdbdbd;">
Last updated on <svg aria-hidden="true" role="img" viewBox="0 0 448 512" style="height:1em;width:0.88em;vertical-align:-0.125em;margin-left:auto;margin-right:auto;font-size:inherit;fill:#bdbdbd;overflow:visible;position:relative;"><path d="M152 24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H64C28.7 64 0 92.7 0 128v16 48V448c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V192 144 128c0-35.3-28.7-64-64-64H344V24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H152V24zM48 192h80v56H48V192zm0 104h80v64H48V296zm128 0h96v64H176V296zm144 0h80v64H320V296zm80-48H320V192h80v56zm0 160v40c0 8.8-7.2 16-16 16H320V408h80zm-128 0v56H176V408h96zm-144 0v56H64c-8.8 0-16-7.2-16-16V408h80zM272 248H176V192h96v56z"/></svg> 08-Mar-2024 at <svg aria-hidden="true" role="img" viewBox="0 0 512 512" style="height:1em;width:1em;vertical-align:-0.125em;margin-left:auto;margin-right:auto;font-size:inherit;fill:#bdbdbd;overflow:visible;position:relative;"><path d="M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120V256c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"/></svg> 10:15:32 AM .
Last updated on <svg aria-hidden="true" role="img" viewBox="0 0 448 512" style="height:1em;width:0.88em;vertical-align:-0.125em;margin-left:auto;margin-right:auto;font-size:inherit;fill:#bdbdbd;overflow:visible;position:relative;"><path d="M152 24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H64C28.7 64 0 92.7 0 128v16 48V448c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V192 144 128c0-35.3-28.7-64-64-64H344V24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H152V24zM48 192h80v56H48V192zm0 104h80v64H48V296zm128 0h96v64H176V296zm144 0h80v64H320V296zm80-48H320V192h80v56zm0 160v40c0 8.8-7.2 16-16 16H320V408h80zm-128 0v56H176V408h96zm-144 0v56H64c-8.8 0-16-7.2-16-16V408h80zM272 248H176V192h96v56z"/></svg> 12-Mar-2024 at <svg aria-hidden="true" role="img" viewBox="0 0 512 512" style="height:1em;width:1em;vertical-align:-0.125em;margin-left:auto;margin-right:auto;font-size:inherit;fill:#bdbdbd;overflow:visible;position:relative;"><path d="M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120V256c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"/></svg> 03:06:38 PM .
</p>
</div>
</div>
Expand Down
Binary file modified 2403-canvas/lab_dge_files/figure-html/unnamed-chunk-27-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 2403-canvas/lab_dge_files/figure-html/unnamed-chunk-27-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion 2403-canvas/lab_eda.html
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ <h2><span class="header-section-number">2.3</span> Computing PCA</h2>
</div>
<div id="computing-pc-variance" class="section level2" number="2.4">
<h2><span class="header-section-number">2.4</span> Computing PC variance</h2>
<p>The usefulness of PCA is that the principal components do have a meaning: They store the amount of variance in decreasing order, so some PCs are more important than others. Inside the <code>PC$sdev</code> object, we can get the standard deviation stored in each PC.</p>
<p>The usefulness of PCA is that the principal components can have a meaning: They store the amount of variance in decreasing order, so some PCs are more important than others. Inside the <code>PC$sdev</code> object, we can get the standard deviation stored in each PC.</p>
<div class="chunk-title-parent">
<div class="chunk-title small">
R
Expand Down
Binary file modified 2403-canvas/lab_eda_files/figure-html/unnamed-chunk-18-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 13 additions & 13 deletions 2403-canvas/lab_r.html
Original file line number Diff line number Diff line change
Expand Up @@ -405,20 +405,20 @@ <h1><span class="header-section-number">6</span> Functions</h1>

# sort
sort(x)</code></pre>
<pre><code>## [1] 131 47 140 44 94 16 118 195 176 149
<pre><code>## [1] 53 99 146 52 46 36 25 11 30 23
## [1] 10
## [1] 1110
## [1] 111
## [1] 124.5
## [1] 16
## [1] 4.875197 3.850148 4.941642 3.784190 4.543295 2.772589 4.770685 5.273000
## [9] 5.170484 5.003946
## [1] 7.808671e+56 2.581313e+20 6.327432e+60 1.285160e+19 6.663176e+40
## [6] 8.886111e+06 1.765017e+51 4.868823e+84 2.727902e+76 5.127171e+64
## [1] 11.445523 6.855655 11.832160 6.633250 9.695360 4.000000 10.862780
## [8] 13.964240 13.266499 12.206556
## [1] 131 47 140 44 94 16 118 195 176 149
## [1] 16 44 47 94 118 131 140 149 176 195</code></pre>
## [1] 521
## [1] 52.1
## [1] 41
## [1] 11
## [1] 3.970292 4.595120 4.983607 3.951244 3.828641 3.583519 3.218876 2.397895
## [9] 3.401197 3.135494
## [1] 1.041376e+23 9.889030e+42 2.552668e+63 3.831008e+22 9.496119e+19
## [6] 4.311232e+15 7.200490e+10 5.987414e+04 1.068647e+13 9.744803e+09
## [1] 7.280110 9.949874 12.083046 7.211103 6.782330 6.000000 5.000000
## [8] 3.316625 5.477226 4.795832
## [1] 53 99 146 52 46 36 25 11 30 23
## [1] 11 23 25 30 36 46 52 53 99 146</code></pre>
<p>Some useful string functions.</p>
<pre class="r"><code>a &lt;- &quot;sunny&quot;
b &lt;- &quot;day&quot;
Expand Down
Binary file modified 2403-canvas/lab_r_files/figure-html/unnamed-chunk-24-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 2403-canvas/lab_r_files/figure-html/unnamed-chunk-25-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 2403-canvas/lab_r_files/figure-html/unnamed-chunk-26-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 2403-canvas/lab_r_files/figure-html/unnamed-chunk-28-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 2403-canvas/lab_r_files/figure-html/unnamed-chunk-29-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 2403-canvas/lab_r_files/figure-html/unnamed-chunk-30-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 2403-canvas/lab_r_files/figure-html/unnamed-chunk-31-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 2403-canvas/slide_clustering.pdf
Binary file not shown.
9 changes: 4 additions & 5 deletions 2403-canvas/slide_dge.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<title>Differential Gene Expression</title>
<meta charset="utf-8" />
<meta name="author" content="Julie Lorent | 08-Mar-2024" />
<meta name="author" content="Julie Lorent | 12-Mar-2024" />
<meta name="keywords" content="bioinformatics, course, scilifelab, nbis" />
<script src="site_libs/header-attrs-2.21/header-attrs.js"></script>
<link href="site_libs/font-awesome-6.4.2/css/all.min.css" rel="stylesheet" />
Expand All @@ -22,7 +22,7 @@
## Workshop on RNA-Seq
]
.author[
### <b>Julie Lorent</b> | 08-Mar-2024
### <b>Julie Lorent</b> | 12-Mar-2024
]
.institute[
### NBIS, SciLifeLab
Expand Down Expand Up @@ -59,12 +59,11 @@
- Step by step description of DESeq2 analysis


## What Paulo will discuss tomorrow
## What we will discuss in the next lecture

- More information on count data distributions
- Batch effects
- Advanced designs
- Reminder about p-values and multiple testing


---
Expand Down Expand Up @@ -294,7 +293,7 @@
.end-text[
&lt;p class="smaller"&gt;
&lt;span class="small" style="line-height: 1.2;"&gt;Graphics from &lt;/span&gt;&lt;img src="./assets/freepik.jpg" style="max-height:20px; vertical-align:middle;"&gt;&lt;br&gt;
Created: 08-Mar-2024 • &lt;a href="https://www.scilifelab.se/"&gt;SciLifeLab&lt;/a&gt; • &lt;a href="https://nbis.se/"&gt;NBIS&lt;/a&gt;
Created: 12-Mar-2024 • &lt;a href="https://www.scilifelab.se/"&gt;SciLifeLab&lt;/a&gt; • &lt;a href="https://nbis.se/"&gt;NBIS&lt;/a&gt;
&lt;/p&gt;
]

Expand Down
Binary file modified 2403-canvas/slide_dge.pdf
Binary file not shown.
Binary file modified 2403-canvas/slide_functional.pdf
Binary file not shown.
Binary file modified 2403-canvas/slide_pca.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion 2403-canvas/slide_preprocessing.html
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@
.end-text[
&lt;p class="smaller"&gt;
&lt;span class="small" style="line-height: 1.2;"&gt;Graphics from &lt;/span&gt;&lt;img src="./assets/freepik.jpg" style="max-height:20px; vertical-align:middle;"&gt;&lt;br&gt;
Created: 08-Mar-2024 • &lt;a href="https://www.scilifelab.se/"&gt;SciLifeLab&lt;/a&gt; • &lt;a href="https://nbis.se/"&gt;NBIS&lt;/a&gt;
Created: 12-Mar-2024 • &lt;a href="https://www.scilifelab.se/"&gt;SciLifeLab&lt;/a&gt; • &lt;a href="https://nbis.se/"&gt;NBIS&lt;/a&gt;
&lt;/p&gt;
]

Expand Down
Binary file modified 2403-canvas/slide_preprocessing.pdf
Binary file not shown.
Binary file added 2403/Bad_RNASeq_Examples/Bias_GC_Content.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 2403/Bad_RNASeq_Examples/biased_composition.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions 2403/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# DOCKER FILE FOR WORKSHOP-RNASEQ
# 2023 Roy Francis

FROM rocker/verse:4.2.3
LABEL Description="Docker image for NBIS workshop-rnaseq"
LABEL Maintainer="[email protected]"
LABEL org.opencontainers.image.source="https://github.com/NBISweden/workshop-rnaseq"

RUN apt-get update -y \
&& apt-get install --no-install-recommends -y \
libxml2-dev \
libssl-dev \
libcurl4-openssl-dev \
libudunits2-dev \
libopenblas-base \
libgdal-dev \
&& wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
&& apt-get install -y ./google-chrome-stable_current_amd64.deb \
&& rm -rf google-chrome-stable_current_amd64.deb \
&& rm -rf /var/lib/apt/lists/* \
&& Rscript -e 'install.packages(c("bookdown","knitr","remotes","fontawesome","formattable","kableExtra","leaflet","pagedown","lubridate","markdown","xaringan","yaml"),repos = "https://packagemanager.posit.co/cran/__linux__/jammy/latest");' \
&& mkdir /rmd

RUN Rscript -e 'install.packages(c("BiocManager","dplyr","enrichR","ggplot2","gridExtra","pheatmap","pvclust","rafalib","stringr","tidyr","locfit"),repos = "https://packagemanager.posit.co/cran/__linux__/jammy/latest");'
RUN Rscript -e 'BiocManager::install(c("DESeq2","edgeR","fgsea","biomaRt","GEOquery"));'
WORKDIR /rmd
CMD Rscript -e "rmarkdown::render_site()"

# build container
# docker build -t ghcr.io/nbisweden/workshop-rnaseq:1.0.0 .
# docker tag ghcr.io/nbisweden/workshop-rnaseq:1.0.0 ghcr.io/nbisweden/workshop-rnaseq:latest

# push to ghcr
# docker login ghcr.io
# docker push ghcr.io/nbisweden/workshop-rnaseq:1.0.0
# docker push ghcr.io/nbisweden/workshop-rnaseq:latest

# run container
# render all files
# docker run --rm -u $(id -u ${USER}):$(id -g ${USER}) -v ${PWD}:/rmd ghcr.io/nbisweden/workshop-rnaseq:latest
# render one file
# docker run --rm -u $(id -u ${USER}):$(id -g ${USER}) -v ${PWD}:/rmd ghcr.io/nbisweden/workshop-rnaseq:latest Rscript -e 'rmarkdown::render("index.Rmd")'
Binary file added 2403/assets/cover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 2403/assets/end.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 2403/assets/favicon.ico
Binary file not shown.
Binary file added 2403/assets/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions 2403/assets/footer-lab.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: "&nbsp;"
---

<footer class="footer">
<div class="container footer-container">
<div class="row">

<hr>

<div class="col-sm-8" style="text-align:left;vertical-align:middle;">
<p class="small" style="color:#bdbdbd;">
[NBIS](https://nbis.se/)[SciLifeLab](https://www.scilifelab.se/)
</p>
</div>

<div class="col-sm-4" style="text-align:right;vertical-align:middle;">
<p style="color:#bdbdbd;">
<span>
<span class="footericon" style="padding-right:4px; padding-left:4px">
<a href="https://nbis.se/">`r fontawesome::fa("globe-americas",fill="#bdbdbd")`</a>
</span>
<span class="footericon" style="padding-right:4px; padding-left:4px">
<a href="https://twitter.com/NBISwe">`r fontawesome::fa("twitter",fill="#bdbdbd")`</a>
</span>
<span class="footericon" style="padding-left:4px">
<a href="https://www.linkedin.com/company/nbisweden/">`r fontawesome::fa("linkedin",fill="#bdbdbd")`</a>
</span>
</span>
</p>
</div>

</div>
</div>
</footer>
38 changes: 38 additions & 0 deletions 2403/assets/footer-lab.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

<footer class="footer">
<div class="container footer-container">
<div class="row">

<div class="footer-left col-sm-6">
<p class="small">
<b>2024</b><a href="https://nbis.se/">NBIS</a><a href="https://www.scilifelab.se/">SciLifeLab</a>
</p>
</div>

<div class="footer-right col-sm-6">
<p>
<span>
<span class="footericon" style="padding-right:4px; padding-left:4px">
<a href="https://nbis.se/">
<svg style="height:0.8em;top:.04em;position:relative;fill:#bdbdbd;" viewBox="0 0 496 512"><path d="M248 8C111.03 8 0 119.03 0 256s111.03 248 248 248 248-111.03 248-248S384.97 8 248 8zm82.29 357.6c-3.9 3.88-7.99 7.95-11.31 11.28-2.99 3-5.1 6.7-6.17 10.71-1.51 5.66-2.73 11.38-4.77 16.87l-17.39 46.85c-13.76 3-28 4.69-42.65 4.69v-27.38c1.69-12.62-7.64-36.26-22.63-51.25-6-6-9.37-14.14-9.37-22.63v-32.01c0-11.64-6.27-22.34-16.46-27.97-14.37-7.95-34.81-19.06-48.81-26.11-11.48-5.78-22.1-13.14-31.65-21.75l-.8-.72a114.792 114.792 0 0 1-18.06-20.74c-9.38-13.77-24.66-36.42-34.59-51.14 20.47-45.5 57.36-82.04 103.2-101.89l24.01 12.01C203.48 89.74 216 82.01 216 70.11v-11.3c7.99-1.29 16.12-2.11 24.39-2.42l28.3 28.3c6.25 6.25 6.25 16.38 0 22.63L264 112l-10.34 10.34c-3.12 3.12-3.12 8.19 0 11.31l4.69 4.69c3.12 3.12 3.12 8.19 0 11.31l-8 8a8.008 8.008 0 0 1-5.66 2.34h-8.99c-2.08 0-4.08.81-5.58 2.27l-9.92 9.65a8.008 8.008 0 0 0-1.58 9.31l15.59 31.19c2.66 5.32-1.21 11.58-7.15 11.58h-5.64c-1.93 0-3.79-.7-5.24-1.96l-9.28-8.06a16.017 16.017 0 0 0-15.55-3.1l-31.17 10.39a11.95 11.95 0 0 0-8.17 11.34c0 4.53 2.56 8.66 6.61 10.69l11.08 5.54c9.41 4.71 19.79 7.16 30.31 7.16s22.59 27.29 32 32h66.75c8.49 0 16.62 3.37 22.63 9.37l13.69 13.69a30.503 30.503 0 0 1 8.93 21.57 46.536 46.536 0 0 1-13.72 32.98zM417 274.25c-5.79-1.45-10.84-5-14.15-9.97l-17.98-26.97a23.97 23.97 0 0 1 0-26.62l19.59-29.38c2.32-3.47 5.5-6.29 9.24-8.15l12.98-6.49C440.2 193.59 448 223.87 448 256c0 8.67-.74 17.16-1.82 25.54L417 274.25z"></path>
</svg>
</a>
</span>
<span class="footericon" style="padding-right:4px; padding-left:4px">
<a href="https://twitter.com/NBISwe"><svg style="height:0.8em;top:.04em;position:relative;fill:#bdbdbd;" viewBox="0 0 512 512"><path d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"></path>
</svg>
</a>
</span>
<span class="footericon" style="padding-left:4px">
<a href="https://www.linkedin.com/company/nbisweden/">
<svg style="height:0.8em;top:.04em;position:relative;fill:#bdbdbd;" viewBox="0 0 448 512"><path d="M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z"></path>
</svg>
</a>
</span>
</span>
</p>
</div>

</div>
</div>
</footer>
6 changes: 6 additions & 0 deletions 2403/assets/footer-slide.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.end-text[
<p class="smaller">
<span class="small" style="line-height: 1.2;">Graphics from </span><img src="./assets/freepik.jpg" style="max-height:20px; vertical-align:middle;"><br>
`r paste0("Created: ",format(Sys.time(),format='%d-%b-%Y'))` • <a href="https://www.scilifelab.se/">SciLifeLab</a> • <a href="https://nbis.se/">NBIS</a>
</p>
]
Binary file added 2403/assets/freepik.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
114 changes: 114 additions & 0 deletions 2403/assets/header-lab.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
<!-- rmd lab header -->

```{r,include=FALSE,cache=FALSE}
# load libraries
library(knitr) # runs pandoc
library(bookdown) # for markdown
library(fontawesome) # icons
# fontawesome dependency
fa <- rmarkdown::html_dependency_font_awesome()
fa$attachment <- "fonts/fontawesome-webfont.ttf"
htmltools::tagList(fa)
# turn off terminal colors
options(crayon.enabled = FALSE)
# knitr options
knitr::opts_knit$set(progress=TRUE,verbose=TRUE)
knitr::opts_chunk$set(dev="png",fig.retina=2,results="hold",fig.show="hold",fig.align="left",
echo=TRUE,warning=FALSE,message=FALSE,accordion=NULL,
chunk.title=NULL)
color_primary <- "#95b540"
color_text <- "#424949"
```

```{r,include=FALSE,cache=FALSE}
# custom hooks
## collapsible panel
knitr::knit_hooks$set(accordion=function(before,options,envir) {
if(before) {
id <- paste0("acc",format(Sys.time(),"%Y%m%d%H%S"),sample(c(0:9),1),sample(c(0:9),1),sample(c(0:9),1),sample(c(0:9),1))
if(is.null(options$btn.type)) {btn.type <- "normal"}else{btn.type <- options$btn.type}
paste0('<p>',
'<button class="btn btn-sm btn-primary btn-collapse btn-collapse-',btn.type,' collapsed" type="button" data-toggle="collapse" data-target="#',id,'" aria-expanded="false" aria-controls="',id,'">',
'</button>',
'</p>',
'<div class="collapse" id="',id,'">',
'<div class="card card-body">')
}else{
paste0("</div>","</div>")
}
})
## blur panel
knitr::knit_hooks$set(blur=function(before,options,envir) {
if(before) {
if(is.null(options$blur.title)) {blur.title <- ""}else{blur.title <- options$blur.title}
paste0('<div class="blur-outer">',
'<div class="blur-title">',blur.title,'</div>',
'<div class="blur-content">')
}else{
paste0("</div>","</div>")
}
})
## chunk.title for code
knitr::knit_hooks$set(chunk.title=function(before,options,envir) {
out_class <- NULL
if(is.null(options$class.output)) {
if(options$echo) out_class <- options$engine
if((!options$echo) & (options$results != "hide")) out_class <- "Output"
}else{
out_class <- options$class.output
}
if(before) {
paste0('<div class="chunk-title-parent"><div class="chunk-title small">',out_class,'</div>')
}else{
paste0('</div>')
}
})
# knit engine output
eng_output <- function(options) {
out <- ''
engine_output(options, options$code, out)
}
knitr::knit_engines$set(output=eng_output)
# custom fontawesome fa function
fa1 <- function (name=NULL,style="height:0.8em;top:0.04em;position:relative;fill:#424949;",extra_style=NULL)
{
full_name <- NULL
if (name %in% fontawesome:::fa_tbl$full_name) {
svg <- fontawesome:::fa_tbl[which(fontawesome:::fa_tbl$full_name == name), ][1, 4]
}
else if (name %in% fontawesome:::fa_tbl$name) {
svg <- fontawesome:::fa_tbl[which(fontawesome:::fa_tbl$name == name), ][1, 4]
}
else {
return("")
}
if(!is.null(extra_style)) style <- paste0(style,extra_style)
style <- paste0("style=\"", style, "\"")
if (!grepl(style, pattern = "style=\"\"")) {
svg <- gsub(pattern = "^<svg", replacement = paste0("<svg ",
style), x = svg)
}
svg <- htmltools::HTML(svg)
class(svg) <- c("fontawesome", class(svg))
return(paste0("<span>",svg,"</span>"))
}
fa2 <- function(name=NULL,style="height:0.8em;top:0.04em;position:relative;fill:white;margin-left:0.45em;margin-bottom: 0.1em;") {
return(fa1(name,style))
}
```

<br>
27 changes: 27 additions & 0 deletions 2403/assets/header-slide.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<link href="https://fonts.googleapis.com/css?family=Roboto|Source+Sans+Pro:300,400,600|Ubuntu+Mono&amp;subset=latin-ext" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">

```{r,include=FALSE,eval=knitr::opts_knit$get("rmarkdown.pandoc.to")=="html"}
# Enables Font Awesome in HTML based bookdown outputs.
fa <- rmarkdown::html_dependency_font_awesome()
fa$attachment <- "fonts/fontawesome-webfont.ttf"
htmltools::tagList(fa)
```

```{r,echo=FALSE,message=FALSE,warning=FALSE,results='hide'}
# run setup code
# load libraries
library(knitr) # runs pandoc
library(bookdown) # for markdown
color_primary <- "#95b540"
color_text <- "#424949"
# turn off terminal colors
options(crayon.enabled = FALSE)
# knitr options
knitr::opts_knit$set(progress=TRUE,verbose=TRUE)
knitr::opts_chunk$set(dev="png",fig.retina=2,results="hold",fig.show="hold",fig.align="left",echo=TRUE,warning=FALSE,message=FALSE)
```
Loading

0 comments on commit fbc8a90

Please sign in to comment.