Current Volume | Browse | Search | RSSHome | Instructions for Authors | JSS Style Guide | Editorial Board

Authors: Peter Langfelder, Steve Horvath
Title: [download]
(5979)
Fast R Functions for Robust Correlations and Hierarchical Clustering
Reference: Vol. 46, Issue 11, Mar 2012
Submitted 2010-04-02, Accepted 2011-12-20
Type: Article
Abstract:

Many high-throughput biological data analyses require the calculation of large correlation matrices and/or clustering of a large number of objects. The standard R function for calculating Pearson correlation can handle calculations without missing values efficiently, but is inefficient when applied to data sets with a relatively small number of missing data. We present an implementation of Pearson correlation calculation that can lead to substantial speedup on data with relatively small number of missing entries. Further, we parallelize all calculations and thus achieve further speedup on systems where parallel processing is available. A robust correlation measure, the biweight midcorrelation, is implemented in a similar manner and provides comparable speed. The functions cor and bicor for fast Pearson and biweight midcorrelation, respectively, are part of the updated, freely available R package WGCNA.
The hierarchical clustering algorithm implemented in R function hclust is an order n3 (n is the number of clustered objects) version of a publicly available clustering algorithm (Murtagh 2012). We present the package flashClust that implements the original algorithm which in practice achieves order approximately n2, leading to substantial time savings when clustering large data sets.

Paper: [download]
(5979)
Fast R Functions for Robust Correlations and Hierarchical Clustering
(application/pdf, 1.4 MB)
Supplements: [download]
(397)
flashClust_1.01-1.tar.gz: R source package
(application/x-gzip, 6.9 KB)
[download]
(415)
WGCNA_1.19.tar.gz: R source package
(application/x-gzip, 557.6 KB)
[download]
(422)
v46i11.R: R example code from the paper
(application/octet-stream, 1.7 KB)
[download]
(446)
v46i11-replication.zip: Supplementary replication materials (R code and data)
(application/zip, 12.3 MB)
Resources: BibTeX | OAI
Creative Commons License
This work is licensed under the licenses
Paper: Creative Commons Attribution 3.0 Unported License
Code: GNU General Public License (at least one of version 2 or version 3)
Current Volume | Browse | Search | RSSHome | Instructions for Authors | JSS Style Guide | Editorial Board