R Data Visualization Exercises


Go back to the main page
Go back to the R overview page


R

Datasets to practice all topics of Data analysis & visualization

Pic Source: own work

In the data files below, you will find datasets that are generated by a program and contain (partially fictional) biological data.

dataset01

dataset02

dataset03

dataset04

dataset05

dataset06

dataset07

dataset08

dataset09

dataset10

You can practice your ‘R’ skills with these datasets:

  • load a dataset in R; check the separator first and decide which code you need to load the data in RStudio

  • each dataset contains missing data; remove these from the dataset first before analysing and/or visualising in graphs

    • HINT: check columns that should have numbers, but contain character type data
  • group data for different variables and use them for graphs, such as boxplots and barplots

  • filter for certain conditions (e.g. Probability SP > 0.7, #Exons < 10,…)

  • use (statistical) calculations for several variables and for different groups (e.g. ‘Gene family’, ‘Signal petpide’, etc.) try to create the following graphs (including titles, axis titles, etc.):

  • Boxplot:

    • Mol. weight for monomers, dimers, trimers,….

    • Probability SP for signal peptides (SPI, SPII,….)

    • GC-content for Gene family

  • Barplot (with the Gene symbol on the x-axis):

    • Average Mol. weight for a particluar Gene family

    • Average isoelectric point for a localisation

  • XY-scatterplot (for only Motor proteins):

    • GC-content vs gene size

    • Gene size vs #exons for membrane proteins

    • Pos. residues vs Neg. residues for proteins containing a SPI signal peptide

NOTE: these analyses are not very meaningful biologically, but these exercises are meant to help you analyse and visualize data in R.

The following datasets are useful for XY-scatterplots only. These datasets are generated by a program, but do contain correlation between the x- and y-values. The x-values are in the first column, the y-values in the rest of the columns.

dataset11

dataset12

dataset13

dataset14

dataset15

The files are in different formats (csv, txt, tsv,…), so you will have to figure out how to load these data in RStudio.

Later on, some examples of analyses and graphs will be provided.


Go back to the main page
Go back to the R overview page
⬆️ Back to Top


This web page is distributed under the terms of the Creative Commons Attribution License which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited. Creative Commons License: CC BY-SA 4.0.