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

Mapping repeats

Most eukaryotic genomes are interspersed with repetitive elements and some of these elements have transcriptional activity, hence they appear when we sequence the RNA population. From the trend of things, some of these elements seem to be important. One strategy for analysing these repeats is to map them to the genome, to see where they…

Continue Reading

Using the Bioconductor annotation packages

Another post related to this course I’m going through (I can’t link it enough times). I have almost finished with the first day of the course and couldn’t resist writing about this lecture on using the Bioconductor annotation packages. I had not realised that the annotation packages could be queried (pardon my ignorance) in the…

Continue Reading

Using aggregate and apply in R

2016 October 13th: I wrote a post on using dplyr to perform the same aggregating functions as in this post; personally I prefer dplyr. I recently came across a course on data analysis and visualisation and now I’m gradually going through each lecture. I just finished following the second lecture and the section “Working with…

Continue Reading

Creating plots using the xkcd package in R

xkcd styled graphs using the xkcd package in R. Steps done on R version 3.0.1 (2013-05-16) and on Windows, i386-w64-mingw32/i386 (32-bit). Steps followed are from the xkcd-intro.pdf file i.e. the xkcd vignette. install.packages("xkcd") library(xkcd) library(extrafont) library(ggplot2) #do you have xkcd fonts? if( "xkcd" %in% fonts()) { p <- ggplot() + geom_point(aes(x=mpg, y=wt), data=mtcars) + theme(text…

Continue Reading

Singular Vector Decomposition using R

In linear algebra terms, a Singular Vector Decomposition (SVD) is the decomposition of a matrix X into three matrices, each having special properties. If X is a matrix with each variable in a column and each observation in a row then the SVD is $$!X = UDV^T$$ where the columns of U are orthogonal (left…

Continue Reading

Fitting a Michaelis-Menten curve using R

Updated 2017 November 22nd Many biological phenomena follow four different types of relationships that include sigmoid, exponential, linear and Michaelis-Menten (MM) type relationships. The MM model is given by where is the reaction rate of product to substrate , represents the maximum rate achieved by the system, and is the substrate concentration at which the…

Continue Reading

Using the R SeqinR package

Just a quick demonstration of the SeqinR package in R using sequences available from the NONCODE database version 3. First download the fasta file, which is available at http://noncode.org/datadownload/ncrna_NONCODE[v3.0].fasta.tar.gz, then install the necessary packages in R and load the fasta file (note I have extracted and renamed the fasta file into ncrna_noncode_v3.fa).

Continue Reading

On curve fitting using R

For linear relationships we can perform a simple linear regression. For other relationships we can try fitting a curve. From Wikipedia: Curve fitting is the process of constructing a curve, or mathematical function, that has the best fit to a series of data points, possibly subject to constraints. I will use the dataset from this…

Continue Reading