Skip to content

An Introduction to R for RNA-Seq Analysis

RNA-Sequencing (RNA-Seq) is a popular method for determining the presence and quantity of RNA in biological samples. In this 3 hour workshop, we will use R to explore publicly-available RNA-Seq data from the Gene Expression Tissue Project (GTEx). Attendees will be introduced to the R syntax, variables, functions, packages, and data structures common to RNA-Seq projects. We will use RStudio to import, tidy, transform, and visualize RNA-Seq count data. Attendees will learn tips and tricks for making the processes of data wrangling and data harmonization more manageable. This workshop will not cover cloud-based workflows for processing RNA-seq reads or statistics and modeling because these topics are covered in our RNA-Seq Concepts and RNA-Seq in the Cloud workshops. Rather, this workshop will focus on general R concepts applied to RNA-Seq data.

Est. Time Lesson name Description
25 min Introduction Overview of RStudio and Binder
30 min Import Data Importing data with read.csv and read.table
30 min Visualize Data Visualizing data with ggplot2
90 min Wrangle Data Tyding and transforming data
5 min Wrap-up Resources

Learning Objectives

In this workshop, you will learn how to use R and RStudio to:

  • import and view files commonly associated with RNA-sequencing experiments
  • select variables and observations that are relevant to research questions (tidy)
  • create and rename variables (transform)
  • join data frames by common variables (harmonize)
  • visualize data using bar graphs, scatter plots, and box plots

Please refer to the RStudio cheat sheets for commonly used R functions. The R for Data Science book provides in depth descriptions and examples of many functions and concepts covered in this course.

Here are the notes from workshops taught with these materials.

Here is a 3 hours video of this workshop being taught at the May 2022 Hackathon.


Familiarity with R and RNA Sequencing is not required but would be useful. This lesson uses a standardized binder environment, which will work on Windows, Mac, and Linux operating systems, and Firefox, Safari, and Chrome web browsers.

Last update: June 23, 2022