Skip to content

Commit

Permalink
Merge branch '2024.04' of github.com:maxplanck-ie/Rintro into 2024.04
Browse files Browse the repository at this point in the history
  • Loading branch information
Juan Caballero committed Mar 18, 2024
2 parents 43764bd + 09e0884 commit ebac556
Show file tree
Hide file tree
Showing 36 changed files with 3,905 additions and 79 deletions.
84 changes: 84 additions & 0 deletions .github/workflows/render-qmd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Rintro2HTML
run-name: ${{ github.actor }} is testing

on:
push:
branches: ["2024.04"]


jobs:

build:
name: Conda Tests
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
container: node:latest

steps:
- name: Print shell information
run: |
echo "Shell: $SHELL"
echo "Shell version: $($SHELL --version)"
uname -a || true
- uses: actions/checkout@v2
- name: Check yaml
run: |
cat configs/conda.yml || true
- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@main
with:
environment-file: configs/conda.yml

- name: List Available Environment
shell: bash -l {0}
run: micromamba list

- name: Activate Environment
run: micromamba activate Rintro

- name: Check Installation
run: |
echo "after conda activate Rintro: PATH=$PATH;"
which R || true
R --version || true
- name: Installation non-conda packages
run: |
Rscript -e 'install.packages(c("dslabs","KernSmooth"), repos="https://cloud.r-project.org")'
- name: Inspect dslabs ext_data
run: |
Rscript -e '.libPaths()'
Rscript -e 'find.package("dslabs")'
Rscript -e 'list.files(system.file(package="dslabs"))'
Rscript -e 'list.files(system.file("extdata", package="dslabs"))'
- name: Render quarto
continue-on-error: true # only for error tracking
run: |
ls -Rl /github/home/micromamba/envs/Rintro/lib/R/library/dslabs
quarto render qmd
- name: Show all files
run: ls -Ral

- name: Upload
uses: actions/upload-pages-artifact@v3
with:
path: ./docs

deploy:
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

65 changes: 0 additions & 65 deletions .github/workflows/render-rmd.yml

This file was deleted.

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ rmd/*_cache/
rmd/*_files
rmd/*RData
rmd/_site
<<<<<<< HEAD
rmd/*.csv
rmd/*.csv.gz
.DS_Store
/.quarto/
**_files
**_cache
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Rintro 2023
# Rintro 2024

This repository contains material for our course: Introduction to R-language.

This branch can be downloaded as zip archive (using the `Code` button above) or cloned such:

```{bash}
git clone -b 2023.03 [email protected]:maxplanck-ie/Rintro.git
git clone -b 2024.04 [email protected]:maxplanck-ie/Rintro.git
```

# For participants
Expand All @@ -24,13 +24,16 @@ Pre-requisites:
To setup all required packages run the following in the repo root:

```{bash}
mamba env create -f conda_config.yml
conda activate Rintro2023
mamba env create -f configs/conda.yml
conda activate Rintro
# dslabs cannot be conda installed
Rscript -e 'install.packages(c("dslabs","KernSmooth"), repos="https://cloud.r-project.org")'
```

To render all material into a full web site under `rmd/_site` run
To render all material into a full web site under `docs` run
```{bash}
Rscript -e "rmarkdown::render_site('rmd')"
quarto render qmd
```

The same is available also here: https://maxplanck-ie.github.io/Rintro/
Expand Down
49 changes: 49 additions & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
project:
type: website
output-dir: docs

website:
title: "Rintro 2024"

navbar:
left:
- text: "Modules"
icon: book
href: qmd/index.qmd
right:
- text: "GitHub"
icon: fa-github
href: https://github.com/maxplanck-ie/Rintro/tree/2024.04


page-footer:
left: |
Bioinfo Core @ MPI-IE Freiburg (2024)
right:
- icon: github
href: https://github.com/maxplanck-ie

# background: "grey"
format:
html:
theme:
dark: darkly
light: cosmo
css: styles.css
code-tools: true
code-line-numbers: false
code-link: false
code-fold: true
code_folding: hide
highlight-style: github
highlight: textmate
toc: true
toc_depth: 1
toc_float: true
df_print: paged

execute:
freeze: auto

editor: visual

15 changes: 8 additions & 7 deletions conda_config.yml → configs/conda.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
name: Rintro2023
name: Rintro
channels:
- conda-forge
- bioconda
- R
- defaults
dependencies:
- r-base=4.1.3
- r-rprojroot=2.0.3
- r-markdown=1.5
- r-essentials~=4.1
- r-rmarkdown=2.14
- r-tidyverse=1.3.1
- quarto=1.4
- r-base=4.2.3
- r-tidyverse=2.0.0
- r-pheatmap=1.0.12
- r-codetools=0.2.19
- r-upsetr=1.4.0
- r-kernsmooth=2.23.20
- r-ggridges=0.5.6
- r-ggrepel=0.9.4
- r-ggthemes=5.1.0
- r-kernsmooth=2.23
83 changes: 83 additions & 0 deletions qmd/00_Introduction.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
title: "00: Introduction"
author: "Thomas Manke"
---

### Block 1: Groundwork
* Starting RStudio: a GUI for R
* Simple functions (input, output, parameters & help)
* Data: I/O, Types, Formats & Structures

### Block 2: Speaking about Data
* Data Descriptions
* Data Visualization: simple plots and advanced heatmaps
* Data Models: linear models

### Block 3: Open the universe
* installing and using packages
* tidyverse: data cleaning, filtering, merging

### Block 4: Advanced topics and case studies
* R scripts, R markdown & reproducible analyses
* data exploration



***

# Goals:
After the course you will be able to

* understand the basic syntax of R
* find help for more nifty problems
* install and use packages for your specific questions
* see the limitations of EXCEL
* understand the importance of structured data
* understand some bioinformatics jargon
* understand common difficulties in data analysis
* increase the value of your CV
* produce figures such as

![Typical examples from R.](images/sample_plots.png)

[//]: # http://www.r-graph-gallery.com/all-graphs/

***

# Non-Goals:
This course does *not* teach

* programming new tools: focus on existing tools
* bioinformatics: BSc course (3 yrs ++)
* NGS analysis: other programs (Linux, Galaxy, deepTools)

***

# Why R ?
* Standard software for data analysis, statistics, and visualization
* free and community support
* many packages available (for data I/O, manipulation, high-end: expression analysis)
* good compromise between flexibility (programming) and box-solutions (packages)
* suitable for very large dataset (filtering, merging)
* interactive and scripting
* not the best solution for everything (e.g. mapping)
* frequent requirement during (bioinformatics) hiring

***

# Embrace the learning curve

* steep (but rewarding)
* First hurdles:
* it's a new language: vocabulary & grammar
* choices: many ways to say (to program) the same things
* more choices: many (redundant) packages
* computers are stubborn and stupid: they do not think along
* More hurdles
* case sensitivity: $a \ne A$
* parameter sensitivity
* sofware dependencies

***

# Start Rstudio
Loading

0 comments on commit ebac556

Please sign in to comment.