R programming language

Bootstraps and Confidence Intervals

When analyzing data, you might want or need to fit a specific curve to a particular dataset. This type of analysis can result in instructive outputs regarding the relationship between two (or more...) quantifiable parameters. The main object of this post is not how to implement such fitting, but rather how to display the goodness of such a fit i.e. how to calculate a confidence interval around a fitted curve. That being said, I will show how to do curve fitting in [...]

By | 2017-04-29T18:33:55+00:00 September 29, 2016|Categories: Data Analysis, R, Statistics|Tags: |1 Comment

Simple multiprocessing in R (2nd edition)

The last time I spoke about this subject, I presented a really simple way to change an lapply call into its multicore sibling mclapply. Now while this is an extremely easy modification to implement in your code to gain substantial performance benefits, it kinda required you to be making use of the lapply function in the first place. So let's look at another way to introduce multiprocessing into your existing codebase with the use of the foreach and doMC packages. [...]

By | 2017-04-29T16:24:45+00:00 September 19, 2016|Categories: Performance, R|Tags: , |0 Comments

Fastest method to compute an AUC

Context: AUC is an acronym for "Area Under the (ROC) Curve". If you are not familiar with the ROC curve and AUC, I suggest reading this blog post before to continuing further. For several projects, I needed to compute a large number of AUC. It started with 25,000, increased to 230,000 and now I need to compute 1,500,000 AUC. With so many AUC, the time to compute each one becomes critical. On the web, I don't find much information about this specific [...]

By | 2017-04-29T16:56:33+00:00 August 18, 2016|Categories: Performance, Python, R, Statistics|Tags: |0 Comments

Good resources to learn R

Since it's the summer vacations, why not take some time to learn R. There are numerous free resources online to dive into this powerful language. For whomever wants to learn it, the challenge more related to finding the time rather than finding resources. Videos Coursera is an inevitable for online learning. There are a few good video courses offered for R beginners that are more or less oriented toward genomics : https://www.coursera.org/learn/r-programming https://www.coursera.org/learn/exploratory-data-analysis https://www.coursera.org/learn/bioconductor (Bioconductor is a life science packages [...]

By | 2017-04-29T16:57:17+00:00 July 11, 2016|Categories: Bioinformatics, R|Tags: |0 Comments

Standard deviation on a correlation scatter plot

I was recently asked by a colleague to provide visualization of differential gene expression computed using RPKM values (two samples, no replicates) and highlight genes that were outside the distribution by 2 standard deviations or more. As a first draft, I quickly obliged by calculating the fold change distribution, computing standard deviation and drawing lines on either side of the diagonal to obtain: This turns out to be equivalent to computing the standard deviation of the residual of a linear [...]

By | 2017-04-29T17:05:35+00:00 April 5, 2016|Categories: Data Visualization, R, Statistics|Tags: |0 Comments