-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a956ace
commit 2eeb60d
Showing
225 changed files
with
1,626,730 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# course_rnaseq_slu | ||
|
||
This repo contains the course material for NBIS course **Workshop on RNA-Seq** at SLU. The rendered view of this repo is available [here](https://nbisweden.github.io/course_rnaseq_slu/). | ||
|
||
## Contributing | ||
|
||
To add or update contents of this repo (for collaborators), first clone the repo. | ||
|
||
``` | ||
git clone https://github.com/nbisweden/course_rnaseq_slu.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. Check if paths to data is correct. | ||
|
||
## 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] | ||
navbar: | ||
title: "<b>NBIS • Workshop on RNA-Seq</b>" | ||
logo: | ||
image: "assets/logo-white.svg" | ||
href: https://nbisweden.github.io/course_rnaseq_slu | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
--- | ||
title: "Advanced Linux Answers" | ||
subtitle: "Workshop on RNA-Seq" | ||
author: "Martin Dahlö" | ||
output: | ||
bookdown::html_document2: | ||
toc: true | ||
toc_float: true | ||
toc_depth: 4 | ||
number_sections: true | ||
theme: flatly | ||
highlight: tango | ||
df_print: default | ||
code_folding: "none" | ||
self_contained: false | ||
keep_md: false | ||
encoding: 'UTF-8' | ||
css: "assets/lab.css" | ||
--- | ||
|
||
```{r,child="assets/header-lab.Rmd"} | ||
``` | ||
|
||
# Ownership and permissions | ||
|
||
Q: Change permission from `----------` to `-rw-rw—wx`. | ||
|
||
One answer: | ||
|
||
``` | ||
chmod ug+rw filename | ||
chmod o+wx filename | ||
``` | ||
|
||
# Symbolic links - files | ||
|
||
Q Did editing the information in the link change the information in the original? | ||
A: Yes. | ||
|
||
Q: What happens to a symbolic link when we move whatever its pointing to? | ||
A: it breaks. | ||
|
||
Q: Is the link re-activated? | ||
A: yes. | ||
|
||
# Grep | ||
|
||
Command to grep all lines with chr1 and send to other file. | ||
|
||
ex: | ||
|
||
``` | ||
grep "chr1" sample_1.sam > chr1.txt | ||
``` | ||
|
||
# WC | ||
|
||
``` | ||
grep "chr1" sample_1.sam | wc -l | ||
samtools view outbam.bam | grep "CATCATCAT" | wc -l | ||
``` | ||
|
||
# Extra material 1 | ||
|
||
Task 1: | ||
|
||
``` | ||
grep "^@" sample_1.sam > at.txt | ||
``` | ||
|
||
Task 2: | ||
|
||
``` | ||
grep "[0-9]\{3\}$" sample_1.sam | ||
``` | ||
|
||
# Extra material 2 | ||
|
||
``` | ||
sed 's/chr1/chr2/' sample_1.sam > sample_2.sam | ||
``` | ||
|
||
# Extra material 3 | ||
|
||
``` | ||
for f in *.sam; do mv $f ${f/.sam}.bam; done | ||
``` | ||
|
||
__End of document__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
--- | ||
layout: default | ||
title: 'Advanced Linux Answers' | ||
--- | ||
|
||
# Advlinux, cheat sheet | ||
|
||
#### Assignment – Ownership and permissions | ||
|
||
Q: | ||
Change permission from | ||
|
||
```bash | ||
---------- | ||
``` | ||
|
||
to | ||
|
||
```bash | ||
-rw-rw—wx | ||
``` | ||
|
||
One answer: | ||
|
||
```bash | ||
chmod ug+rw filename | ||
chmod o+wx filename | ||
``` | ||
|
||
#### Assignment - Symbolic links - files | ||
Q Did editing the information in the link change the information in the original? | ||
A: Yes. | ||
|
||
Q: what happens to a symbolic link when we move whatever its pointing to? | ||
A: it breaks. | ||
|
||
Q: is the link re-activated? | ||
A: yes. | ||
|
||
#### Assignments - Grep | ||
command to grep all lines with chr1 and send to other file. | ||
|
||
ex: | ||
|
||
```bash | ||
grep "chr1" sample_1.sam > chr1.txt | ||
``` | ||
|
||
#### Assignment - WC | ||
|
||
```bash | ||
grep "chr1" sample_1.sam | wc -l | ||
samtools view outbam.bam | grep "CATCATCAT" | wc -l | ||
``` | ||
|
||
#### Extra material 1. | ||
Task1: | ||
|
||
```bash | ||
grep "^@" sample_1.sam > at.txt | ||
``` | ||
|
||
Task2: | ||
|
||
```bash | ||
grep "[0-9]\{3\}$" sample_1.sam | ||
``` | ||
|
||
#### Extra material 2. | ||
|
||
```bash | ||
sed 's/chr1/chr2/' sample_1.sam > sample_2.sam | ||
``` | ||
|
||
#### Extra material 3 | ||
|
||
```bash | ||
for f in *.sam; do mv $f ${f/.sam}.bam; done | ||
``` |
Oops, something went wrong.