Course Overview

Course Integrity

This course is compiled automatically on 2025-03-12

The course is tested and available on MacOS, Windows and Ubuntu Linux for R version 4.4.0 (2024-04-24)



Overview

This course introduces how to code in R in a reproducible way. Two parallel methods are presented: Rmarkdown and Git. Together, Rmarkdown and Git allow you to generate analysis that is fully integrated with the results, session information is preserved and it is all version controlled so you can track changes as your analysis evolves.

Course material is available as HTML presentations or single page document. An exercise is available at the end.

Course material and exercises are available to view as rendered HTML at https://rockefelleruniversity.github.io/RU_reproducibleR/. All material is available to download under GPL v2 license.



Setting up


System Requirements

Install Herper and Conda

Conda can be installed using the Herper package.

install.packages("Herper")
library(Herper)
install_CondaTools(tools = "python", env = "test")

Some people have errors running this command. Often this is the case for newer Macs with the ARM chip. The newest version of Herper on GitHub should help.

install.packages("devtools")
library(devtools)
devtools::install_github("https://github.com/RockefellerUniversity/Herper.git")
library(Herper)
install_CondaTools(tools = "python", env = "test")

Alternatively Miniconda can be installed manually by going to the Conda website.


Install Docker

Use this link to install Docker.


Install Git

Git is available from the projects website here. Follow the instructions here for your operating system.

Some user may already have Git installed. To test you can just run the code below.

git --version


Install R

R can be installed from the R-project website.

The R website can be found here http://www.r-project.org/. This website has all the latest information about R updates, conferences and installation

You can use this direct links to the install for each major OS:


Install RStudio

RStudio can be installed from the RStudio website.

http://www.rstudio.com/

RStudio can be downloaded for all platforms at the link below

https://rstudio.com/products/rstudio/download/


Install required R packages

R Packages can be installed from the course package or from CRAN/Bioconductor. These commands should be written into the R console. Once R and RStudio is installed, you can copy and paste these install commands into lower left pane of RStudio which should be labelled “Console”. If you run into any errors, do this one line at a time.

From the course package
install.packages('BiocManager')
install.packages('remotes')
BiocManager::install('RockefellerUniversity/RU_reproducibleR',subdir='reproducibility')
From CRAN and Bioconductor
install.packages('BiocManager')
BiocManager::install('methods')
BiocManager::install('ggplot2')
BiocManager::install('rmarkdown')
BiocManager::install('tidyverse')
BiocManager::install('knitr')
BiocManager::install('gh')
BiocManager::install('formatR')
BiocManager::install('reticulate')
BiocManager::install('Herper')
BiocManager::install('renv')
BiocManager::install('plotly')
BiocManager::install('DT')
BiocManager::install('testthat')
BiocManager::install('yaml')

Download the material

Download the material




The Presentations


Reproducible Research

An introduction to Reproducible Research. We cover some basic concepts, and challenges faced with Reproducibility.

Reproducible code and Rmarkdown

In Reproducible code and Rmarkdown we will review how to make dynamic reports and their role reproducible research.

Session sections:

  • What is Rmarkdown?
  • Creating dynamic reports

Reproducible R and R packages

In Reproducible R and R packages, we will review how to install and manage R packages

Session sections:

  • Packages and package versions
  • Installing from CRAN
  • Installing from Bioconductor
  • Renv and package management

Herper and Conda environments

In Herper and Conda environments we will review how to manage conda environments using Herper.

Session sections:

  • What is Conda?
  • Using Herper to manage conda environments

Docker

In Docker we will review the basics of Docker Containers.

Session sections:

  • What is Docker?
  • How to work with Docker and R

Git and GitHub

In Git and GitHub we will review the widely used version control and web hosting systems.

Session sections:

  • What is Git and GitHub?
  • Working locally and remotely to version control projects
  • Typical project work flows

Reproducible Research Summary

A summary of Reproducible Research and best practices.

Getting help


Course help

For advice, help and comments for the material covered in this course please contact us at the issues page associated to this course.

The link to the help pages can be found here


General Bioinformatics support

If you would like contact us about general bioinformatics advice, support or collaboration, please contact us the Bioinformatics Resource Center at .