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...

Continue Reading

Gene to OMIM phenotype

A couple of weeks ago, I wrote a post on identifying OMIM phenotypes that are associated with a gene of interest. I thought I solved the problem by using one of my favourite R packages (biomaRt) but alas. For example, I could not find any OMIM IDs associated with the TTN gene using biomaRt. In...

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...

Continue Reading

Gene to OMIM Morbid Map

Update 2017 May 10th: I realised that this approach doesn't work for all genes, unfortunately. For example, the gene TTN (which is an HGNC approved gene symbol) is associated with 600334, 603689, 604145, 608807, 611705, and 613765 but biomaRt returns an NA. Please refer to an updated post. I was interested in the number of...

Continue Reading

Intersect in R

A colleague asked me this question: "I'm trying to find a way to find genes that overlap between three datasets. I have used intersect for two dataframes but can't seem to find a solution for three dataframes on google. Do you know any snazzy way of doing that?" I thought using the venn() function from...

Continue Reading

A single exome

In the age of 50,000+ and 60,000+ whole exome catalogues, it's hard to find processed data for a single exome. At least I had trouble trying to find a single VCF file for a single exome from one individual. After searching for a while, I gave up and decided to generate one myself. This post...

Continue Reading