1 Introduction

A common problem in R is labelling scatter plots with large numbers of points and/or labels. We provide a utility for easy labelling of scatter plots and quick plotting of volcano plots and MA plots for gene expression analyses. Using an interactive shiny and plotly interface, users can hover over points to see where specific points are located and click on points to easily label them. Labels can be toggled on/off simply by clicking. An input box and batch input window provides an easy way to label points by name. Labels can be dragged around the plot to place them optimally. Notably we provide an easy way to export directly to PDF for publication.

2 Installation

Install from CRAN

install.packages("easylabel")
library(easylabel)

Install from Github

devtools::install_github("myles-lewis/easylabel")
library(easylabel)

If you wish to use the optional useQ argument with easyVolcano() and easyMAplot(), you will need to install additional package qvalue from Bioconductor:

if (!requireNamespace("BiocManager", quietly = TRUE))
  install.packages("BiocManager")
BiocManager::install("qvalue")

If you wish to use the optional fullGeneNames argument, you will need to install packages AnnotationDbi and org.Hs.eg.db from Bioconductor:

BiocManager::install("AnnotationDbi")
BiocManager::install("org.Hs.eg.db")

3 Scatter plots

Use easylabel() to open a shiny app and plot and label scatter plots. A table of the main data is supplied in the Table tab for easy viewing of data.

data(mtcars)
easylabel(mtcars, x = 'mpg', y = 'wt',
          colScheme = 'royalblue')