Skip to content

Commit

Permalink
v1911
Browse files Browse the repository at this point in the history
  • Loading branch information
royfrancis committed Dec 7, 2019
1 parent 704f939 commit 86f33eb
Show file tree
Hide file tree
Showing 158 changed files with 1,622,730 additions and 0 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 NBIS -- National Bioinformatics Infrastructure Sweden

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
80 changes: 80 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# course_rnaseq

This repo contains the course material for NBIS course **Workshop on RNA-Seq**. The rendered view of this repo is available [here](https://nbisweden.github.io/course_rnaseq/).

## Contributing

To add or update contents of this repo (for collaborators), first clone the repo.

```
git clone https://github.com/nbisweden/course_rnaseq.git
```

Make changes/updates as needed. Add the changed files. Commit it. Then push the repo back.

```
git add *
git commit -m "I did this and that"
git status
git push origin
```

If you are not added as a collaborator, first fork this repo to your account, then clone it locally, make changes, commit, push to your repo, then submit a pull request to this repo.

## Descriptions

These are descriptions of the files and a guide to updating this repo for course maintainers.

**_site.yml**
All website configuration options are here. Nothing to be changed here.

**README.md**
You are reading this file now. Nothing to do here.

**index.Rmd**
This file generates the home page. **Make sure that the date and location is correct**. Verify links.

**schedule.Rmd**
This file generates the schedule page. **The start time of the course is set to `09:00:00`. Change if needed**. It is assumed that the course starts at the same time everyday.

**schedule.csv**
This table holds the schedule information. Open/edit in a spreadsheet or text editor. Columns are delimited by `;`. Do not change the number of columns, position of columns or column names.

***date***: Full date for each day in format dd/mm/yyyy. Missing/empty cells are filled down automatically.
***room***: Room number for the course. Missing/empty cells are filled down automatically.
***dur***: Duration for the topic in minutes.
***topic***: Topic name (Keep it short).
***person***: Name of the person covering the topic.
***link_presentation***: (Optional) Link to the presentation. Local links can be just `presentation_topic.html`. Use this labelling convention.
***link_lab***: (Optional) Link to the lab material. Local links can be just `lab_topic.html`. This is the labelling convention used.
***link_room***: (Optional) Link to the room location. Can be a google map link, mazemap link etc.

**lab.Rmd**
This page brings together all the exercises. Verify links.

**precourse.Rmd**
This page holds the steps needed to be completed before the course. **Change project ID for each course**.

**info.Rmd**
This page contains practical information related to the course. **Set location and update info if needed**.

[**presentation_topic.Rmd**]
RMarkdown presentation files for various topics. Replace 'topic' with a short name of the topic.

[**lab_topic.Rmd**]
RMarkdown lab files for various topics. Replace 'topic' with a short name of the topic.

## Dependencies

The `assets` directory contains css styles, headers, footers, logos etc. If you are using images in your .Rmd file, place them in the directory `images` and refer to them using relative path like `![](./images/image.jpg)`. Images generated in R during rendering of the .Rmd file is automatically handled. If you have data (tsv, csv, txt text files, .Rds files), place them inside the directory `data` and read them using relative path `x <- read.delim("./data/table.txt")`. Do not use paths that link outside of the project environment.

## Rendering

The website is rendered by running `rmarkdown::render_site()` in the project directory. This generates the HTML files and all other necessary files (including the assets, images and data directories) and moves them into a directory named **docs**. Open **docs/index.html** to start. The output directory is set to **docs** because this GitHub repo uses the **docs** directory as the Github pages (rendered content) source.

For testing purposes, you can run `rmarkdown::render("bla.Rmd")` on individual Rmd files. This is a time-saver as the whole website need not be rendered just to preview this one file.

---

**2019** NBIS | SciLifeLab
# rnaseq_201911
37 changes: 37 additions & 0 deletions _site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Workshop on RNA-Seq
favicon: assets/favicon.png
output_dir: docs
exclude: ["data","docs","README.md","schedule.csv","LICENSE"]
navbar:
title: "<b>NBIS • Workshop on RNA-Seq</b>"
logo:
image: "assets/logo-white.svg"
href: https://nbisweden.github.io/course_rnaseq
right:
- text: Home
icon: fa-home
href: index.html
- text: Schedule
icon: fa-clipboard-list
href: schedule.html
- text: Lab
icon: fa-flask
href: lab.html
- text: Precourse
icon: fa-pencil-alt
href: precourse.html
- text: Info
icon: fa-info
href: info.html
output:
bookdown::html_document2:
theme: flatly
highlight: tango
df_print: default
code_folding: none
self_contained: false
keep_md: false
encoding: 'UTF-8'
css: "assets/lab.css"
include:
after_body: assets/footer-lab.html
Binary file added assets/cover.jpg
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 assets/end.jpg
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 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.
19 changes: 19 additions & 0 deletions assets/footer-lab.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

<hr/>

<div>
<span style="float:left; vertical-align:middle">
<b>2019</b> [NBIS](https://nbis.se/)[SciLifeLab](https://www.scilifelab.se/)
</span>
<span style="float:right; vertical-align:middle">
<span class="footericon" style="padding-right:4px; padding-left:4px">
<a href="https://nbis.se/"><i class="fas fa-globe-americas"></i></a>
</span>
<span class="footericon" style="padding-right:4px; padding-left:4px">
<a href="https://twitter.com/NBISwe"><i class="fab fa-twitter"></i></a>
</span>
<span class="footericon" style="padding-left:4px">
<a href="https://www.linkedin.com/company/nbisweden/"><i class="fab fa-linkedin"></i></a>
</span>
</span>
</div>
21 changes: 21 additions & 0 deletions assets/footer-lab.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

<div class="footer">
<div class="container" style="padding-top:5px;padding-bottom:5px;">
<p>
<span style="float:left; vertical-align:middle">
<b>2019 </b><a href="https://nbis.se/">NBIS</a><a href="https://www.scilifelab.se/">SciLifeLab</a>
</span>
<span style="float:right; vertical-align:middle">
<span class="footericon" style="padding-right:4px; padding-left:4px">
<a href="https://nbis.se/"><i class="fas fa-globe-americas"></i></a>
</span>
<span class="footericon" style="padding-right:4px; padding-left:4px">
<a href="https://twitter.com/NBISwe"><i class="fab fa-twitter"></i></a>
</span>
<span class="footericon" style="padding-left:4px">
<a href="https://www.linkedin.com/company/nbisweden/"><i class="fab fa-linkedin"></i></a>
</span>
</span>
</p>
</div>
</div>
10 changes: 10 additions & 0 deletions assets/footer-presentation.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

.end-text[
`r x <- sessionInfo(); paste0("<p>",x$R.version$version.string,"<br>","<p>Platform: ",x$platform,"</p>","<p>OS: ",x$running,"</p><br>")`

<hr>

<span class="small">`r paste0("Built on : <i class='fa fa-calendar' aria-hidden='true'></i> ",format(Sys.time(),format='%d-%b-%Y')," at <i class='fa fa-clock-o' aria-hidden='true'></i> ",format(Sys.time(),format='%X'))`</span>

<b>`r format(Sys.time(), '%Y')`</b> • [SciLifeLab](https://www.scilifelab.se/)[NBIS](https://nbis.se/)
]
61 changes: 61 additions & 0 deletions assets/header-lab.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<!-- rmd lab header -->

<!-- custom fonts -->
<link href="https://fonts.googleapis.com/css?family=Roboto|Source+Sans+Pro:300,400,600|Ubuntu+Mono&amp;subset=latin-ext" rel="stylesheet">

```{r,include=FALSE,cache=FALSE}
# load libraries
library(knitr) # runs pandoc
library(bookdown) # for markdown
library(captioner) # for table and figure captions
```

```{r,include=FALSE,cache=FALSE}
# prepare captions
tc <- captioner::captioner(prefix="<b>Tab. </b>")
fc <- captioner::captioner(prefix="<b>Fig. </b>")
# knitr options
knitr::opts_knit$set(progress=TRUE,verbose=TRUE)
knitr::opts_chunk$set(dev="svg",results="hold",fig.show="hold",fig.align="left",
echo=TRUE,warning=FALSE,message=FALSE,accordion=NULL,
block.title=TRUE)
```

```{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$btntype)) {btntype <- "normal"}else{btntype <- options$btntype}
paste0('<p>',
'<button class="btn btn-sm btn-primary btn-collapse btn-collapse-',btntype,' 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>")
}
})
## show title for code
knitr::knit_hooks$set(block.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="block-title-parent"><div class="block-title small">',out_class,'</div>')
}else{
paste0('</div>')
}
})
```

<br>
21 changes: 21 additions & 0 deletions assets/header-presentation.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<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
# knitr options
knitr::opts_knit$set(progress=TRUE,verbose=TRUE)
knitr::opts_chunk$set(dev="svg",results="hold",fig.show="hold",fig.align="left",echo=TRUE,warning=FALSE,message=FALSE)
```
Loading

0 comments on commit 86f33eb

Please sign in to comment.