Creating a flowchart using R

The diagram package makes it easy to create flowcharts in R. In this post I'll show an example of creating a simple flowchart. The most important part is to understand how the coordinate systems works; once you understand that, it's just a matter of placing your arrows and boxes accordingly to create your flowchart. To get started, install the package if you haven't already.


Continue reading

Matrix to adjacency list in R

An adjacency list is simply an unordered list that describes connections between vertices. It's a commonly used input format for graphs. In this post, I use the melt() function from the reshape2 package to create an adjacency list from a correlation matrix. I use the geneData dataset, which consists of real but anonymised microarray expression data, from the Biobase package as an example. Finally, I'll show some features of the igraph package.

Continue reading

Interactive plots in R using plotly

I found out about plotly a couple of months ago via R-bloggers:

I finally gave it a go when a friend asked me for help making a Gantt chart and I was impressed with plotly's interactivity and ease of use. Since I use scatter plots a lot, this post will be about making interactive scatter plots in R using plotly.

Continue reading

Wordcloud of PubMed searches

At the start of this year I created a Twitter account that automatically tweets out papers related to transcriptomes, i.e. a Twitter literature bot. This idea isn't new and there are over 200 Twitter literature bots. However, I wrote my Twitter bot using R (and using the RISmed package to search PubMed for papers) and it's running on an EC2 instance, which is part of Amazon Web Services. I went with this approach simply because I wanted to try out Amazon Web Services; I will have to find another server to run my Twitter bot when my free period is over.

Continue reading

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 than a real coverage plot. In this post, I'll use BEDTools to calculate the per base coverage of a defined region and produce an actual coverage plot using R.

Continue reading