Creating a coverage plot using BEDTools and R

One of my Top 10 posts is on creating a coverage plot using R. For that post I used CAGE data, which is a transcriptomic data set containing transcription start sites, and I used R exclusively for building a “coverage plot.” The main issue with that post was that the plots were density plots rather…

Continue Reading

Animated plots using R

I learned the simple concept of animation back in school, when some of my classmates would draw stick figures on the edge of large textbooks. At first I was wondering why one would defile a textbook in such a way, but then as they flipped through the pages and brought the stick figures to life,…

Continue Reading

Thesis cover art

I was recommended to have some sort of cover art on my thesis, so I decided to make my cover using the awesome Gviz package. Below is all the code for how I generated my thesis cover art. Suggestions and comments most welcome!

Continue Reading

Plotting error bars with R

Updated 2018 May 20th Error bars may show confidence intervals, standard errors, and standard deviations. Each feature conveys a different message and this paper on error bars in experimental biology explains it very nicely. For this post I will demonstrate how to plot error bars that show the standard error (SE) or standard error of…

Continue Reading

Repetitive elements in vertebrate genomes

Updated 2015 February 8th to include some scatter plots of genome size versus repeat content. I was writing about the make up of genomes today and was looking up statistics on repetitive elements in vertebrate genomes. While I could find individual papers with repetitive element statistics for a particular genome, I was unable to find…

Continue Reading

Getting started with Shiny

Shiny is a package from RStudio that makes it incredibly easy to build interactive web applications with R. Have a look at some of the applications built using Shiny and perhaps you’ll be as impressed as me. I will set up a local Shiny server on Ubuntu (12.04) running under VirtualBox. You don’t actually need…

Continue Reading

Using Gviz

Updated: 2013 November 15th A while ago I asked on Twitter, what are some tools that people use to visualise hundreds of bam files. One of the suggestions was Gviz (thanks Sebastian!) and I had a quick glimpse at the Bioconductor package and the plots looked really great! Here I use Gviz to plot features…

Continue Reading

Creating a coverage plot in R

Disclaimer (2015 August 5th): as pointed out in this comment thread below, this post created a density plot rather than a coverage plot. I have written a new post that uses BEDTools to calculate the coverage and R to produce an actual coverage plot. I’ve recently discovered GitHub Gist, so for this post I’m going…

Continue Reading

Using the ENCODE ChIA-PET dataset

Updated: 2014 March 14th From the Wikipedia article: Chromatin Interaction Analysis by Paired-End Tag Sequencing (ChIA-PET) is a technique that incorporates chromatin immunoprecipitation (ChIP)-based enrichment, chromatin proximity ligation, Paired-End Tags, and High-throughput sequencing to determine de novo long-range chromatin interactions genome-wide. Let’s get started on using the ENCODE ChIA-PET dataset by downloading the bed files,…

Continue Reading

R data visualisation

Once upon a time, I made my graphs using Excel because it was the only software that I was aware of for making graphs. Now one can do amazing things with Excel and produce fairly good looking graphs, but after looking at some examples of R graphs, I wanted to learn a bit more about…

Continue Reading