Skip to content

ycl6/Simple-R-gists

Repository files navigation

Simple R gists

Showcase short R examples


License: GPL-3.0

National survey

This notebook shows how to use readxl package to retreive the Deaths registered monthly in England and Wales Dataset from Office for National Statistics and create various plots to show the number of deaths with ggplot2.

This notebook shows how to use readxl package to retreive the Monthly COVID-19 Vaccinations Dataset from NHS England and create various plots to show key statistics with ggplot2.

Gene expression

This notebook shows readers how to use ggplot2 package to create various plots to show the magnitude of the change in expression between two groups (M) in comparison to the magnitude of average expression over all samples (A).

This is a reproducible demo that shows readers how to use perform count normalisation of RNA-seq data using several common methods:

  • DESeq2’s median-of-ratios
  • edgeR’s TMM (trimmed mean of M-values)
  • RPM/FPM/CPM (reads/fragments/counts per million mapped reads/fragments)
  • TPM (transcripts per million mapped reads)
  • RPKM/FPKM (reads/fragments per kilobase of transcript length per million mapped reads/fragments)

This is a reproducible demo that shows readers how to use the function plotReducedDimLR which make use of the ggnewscale R package to ovelay the expressions of ligand and receptor genes on a single plot of UMAP or t-SNE projection.

Others

This notebook shows readers how to use ggforce package to create parallel sets diagram to show the interaction between 2 categorical variables.

This notebook shows how to use SPIAT to perform spatial data processing, quality control, visualization and analysis.