APCluster - An R Package for Affinity Propagation Clustering

In order to make Affinity Propagation Clustering [Frey & Dueck, 2007] accessible to a wider audience in bioinformatics, we ported the Matlab code published by the authors Frey and Dueck (cf. Affinity Propagation Website) to R.

Installation

The package is available through CRAN - The Comprehensive R Archive Network (click here to view the archive entry of the package). Therefore, the simplest way to install the package is to enter
install.packages("apcluster")
into your R session. If, for what reason ever, you prefer to install the package manually, follow the instructions in the user manual.

Documentation

  1. User Manual: PDF (927KB; last updated on 2013-04-22)
  2. Reference Manual: PDF (233KB; last updated on 2013-04-22; generated automatically from package help pages)

Getting started

  1. To load the package, enter "library(apcluster)" in your R session.
  2. To view the user manual, enter "vignette("apcluster")".
  3. To do a first example, enter "example(apcluster)".

Citing this package

If you use this package for research that is published later, you are kindly asked to cite it as follows:

U. Bodenhofer, A. Kothmeier, and S. Hochreiter (2011). APCluster: an R package for affinity propagation clustering. Bioinformatics 27:2463-2464. DOI: 10.1093/bioinformatics/btr406.

Moreover, we insist that, any time you use/cite the package, you also cite the original paper in which affinity propagation has been introduced:

B. J. Frey and D. Dueck (2007). Clustering by passing messages between data points. Science, 315:972-976. DOI: 10.1126/science.1136800.

Change log

Version 1.3.1, released 2013-04-22:
  • re-implementation of heatmap() method: dendrograms can now be plotted even for APResult and ExClust objects as well as for cluster hierarchies based on prior clusterings; color bars can now be switched off and colors can be changed by user (by new sideColor argument); dendrograms can be switched on and off (by Rowv and Colv arguments);
  • added as.hclust() and as.dendrogram() methods
  • added new arguments base, showSamples, and horiz to the plot() method
  • with signature (x="AggExResult", y="missing"); moreover, parameters for changing the appearance of the height axis are now respected as well
  • streamlining of methods (redundant definition of inherited methods removed)
  • various minor improvements of code and documentation
Version 1.3.0, released 2013-01-07:
  • added Leveraged Affinity Propagation Clustering
  • re-implementation of main functions as S4 generic methods in order to facilitate the convenient internal computation of similarity matrices
  • for convenience, similarity matrices can be stored as part of clustering results
  • heatmap plotting now done by heatmap() which has been defined as S4 generic
  • extended interface to functions for computing similarity matrices
  • added function corSimMat()
  • implementation of length() method for classes APResult, AggExResult, and ExClust
  • added accessor function to extract clustering levels from AggExResult objects
  • correction of exemplars returned by apcluster() for details=TRUE in slot idxAll of returned APResult object
  • when using data stored in a data frame, now categorical columns are explicitly omitted, thereby, avoiding warnings
  • plotting of clustering results along with original data (2D only) has been accelerated
  • all clustering methods now store their calls into the result objects
  • updates and extensions of help pages and vignette
Version 1.2.1, released 2012-06-12:
  • added convenient accessor functions to extracting cluster indices from APResult and ExClust objects
  • added a function for coercing an APResult object into an ExClust object
  • correction of color bar on the left side of heatmaps (default behavior of RowSideColors parameter changed with R 2.15)
Version 1.2.0, released 2012-03-26:
  • reimplementation of apcluster() in C++ using the Rcpp package which reduces computation times by a factor of 9-10
  • obsolete function apclusterLM() removed
  • updates of help pages and vignette
Version 1.1.1, released 2011-09-08:
  • updated citation
  • minor corrections in help pages and vignette
Version 1.1.0, released 2011-06-15:
  • exemplar-based agglomerative clustering (function aggExCluster()) added
  • added various plotting functions, e.g. for dendrograms and heatmaps
  • added sequence analysis example to vignette
  • extension of vignette according to new functionality
  • re-organization of variable names in vignette
  • added option 'verbose' to apclusterK()
  • numerous minor corrections in help pages and vignette
Version 1.0.3, released 2011-03-01:
  • Makefile in inst/doc eliminated to avoid installation problems
  • renamed vignette to "apcluster"
Version 1.0.2, released 2010-03-19:
  • replacement of computation of responsibilities and availabilities in apcluster() by pure matrix operations; traditional implementation according to Frey and Dueck still available as function apclusterLM();
  • improved support for named objects
  • new function for computing label vectors
  • re-organization of package source files and help pages
Version 1.0.1, released 2010-03-02:
first public release

Contact

For suggestions, bug reports, and other matters regarding the package, please contact apcluster@bioinf.jku.at.