Course Overview

Course Integrity

This course is compiled automatically on 2023-07-18

The course is tested and available on MacOS, Windows and Ubuntu Linux for R version 4.3.0 (2023-04-21)



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/.

The download links and associated installation instructions for multiple platforms can be found below provided by Revolution Analytics. https://cran.revolutionanalytics.com

We recommend installing R 4.3.0 as this is the version used to compile the course. Direct downloads for R 4.3.0 for the main platforms can be found below:


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 packages

From the course package

install.packages('BiocManager')
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('testthat')
BiocManager::install('yaml')


Download the material

Download the material




The Presentations


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

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 .