Fast and Robust Multi-Scale Graph Clustering

A graph community detection algorithm that aims to be performant on large graphs and robust, returning consistent results across runs. SpeakEasy 2 (SE2), the underlying algorithm, is described in Chris Gaiteri, David R. Connell & Faraz A. Sultan et al. (2023) . The core algorithm is written in 'C', providing speed and keeping the memory requirements low. This implementation can take advantage of multiple computing cores without increasing memory usage. SE2 can detect community structure across scales, making it a good choice for biological data, which often has hierarchical structure. Graphs can be passed to the algorithm as adjacency matrices using base 'R' matrices, the 'Matrix' library, 'igraph' graphs, or any data that can be coerced into a matrix.


speakeasyR Community Detection

R-CMD-check CRAN status

This packages provides R functions for running the SpeakEasy 2 community detection algorithm using the SpeakEasy2 C library. See the Genome Biology article.

SpeakEasy 2 (SE2) is a graph community detection algorithm that aims to be performant on large graphs and robust, returning consistent results across runs. SE2 does not require precognition about the number of communities in the network. Additionally, while the user can provide parameters to alter how the algorithm is run, the default option work well on a wide arrange of graphs and tweaking options generally has little affect on the results, reducing the risk of influencing the algorithm.

The core algorithm is written in C, providing speed and keeping the memory requirements low. This implementation can take advantage of multiple computing cores without increasing memory usage. SE2 can detect community structure across scales, making it a good choice for biological data, which is often organized hierarchical structure.

Graphs can be passed to the algorithm as adjacency matrices using the Matrix library, igraph graphs, or any data that can coerced into a matrix.

Installation

For most users, this package should be installed from CRAN using:

install.packages("speakeasyR")

It can also be installed using devtools:

devtools::install_github("speakeasy-2/speakeasyR")

Additionally, it's possible to download the latest release from the release page (the speakeasyR_${release}.tar.gz asset) and install it using install.packages:

install.packages("speakeasyR_${release}.tar.gz")

Where ${release} must be replaced with the value in the tarball's name.

Linux

Installation with devtools::install_github has been tested in clean VMs running Ubuntu and Fedora.

Windows

To set up the development environment on Windows, install the appropriate version of Rtools for your R install. Using Rtools' MSYS2, install the required build tools. This has been tested with ucrt64 environment but likely works in other environments.

pacman -S mingw-w64-ucrt-x86_64-toolchain git

Building from source

For development, clone this repository and use:

git submodule update --init --recursive

To set up the vendored dependencies.

For development astyle is recommended for formatting C code while texlive/latex, qpdf, and checkbashims are expected by R for building the documentation and checking shell scripts during the R CMD build process.

It should now be possible to run devtools::load_all() in R.

Development

GNU autotools is used to generate the configuration script and files needed to run the configuration script. R's build commands do not run autoconf instead, if changes are made to the configuration.ac file, autoconf (and possibly autoreconf -i) needs to be run and manually and the resulting files should be committed along with the source configuration.ac file. The Makefile can determine when the autoconf programs need to be run by either directly calling the configure target (i.e. make configure) or running a build target (i.e. make build or make check or similar).

The makefile in the top level directory is intended for development. It will automate recreating committed generated files when needed. These generated files must be committed with changes to the source files that created them as they are not created by the R CMD build command. It should always be possible to run R CMD build to build the project in a clean state without needing to run make to generate other files. The makefile also sets some flags to provide stricter checks than what are run during the normal build process.

As clang and gcc can behave differently changes should be tested against both. To explicitly set the compiler used run make ${target} CC=${CC} where target is likely build or check and CC is either clang or gcc.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("speakeasyR")

0.1.8 by David Connell, a year ago


https://github.com/SpeakEasy-2/speakeasyR


Report a bug at https://github.com/SpeakEasy-2/speakeasyR/issues


Browse source code at https://github.com/cran/speakeasyR


Authors: David Connell [aut, cre, cph] (ORCID: , Chris Gaiteri [cph] (Author of original SpeakEasy 2 algorithm.) , Gábor Csárdi [cph, ctb] (Author of igraph C library.) , Tamás Nepusz [cph, ctb] (Author of igraph C library.) , Szabolcs Horvát [cph, ctb] (Author of igraph C library.) , Vincent Traag [cph, ctb] (Author of igraph C library.) , Fabio Zanini [cph, ctb] (Author of igraph C library.) , Daniel Noom [cph, ctb] (Author of igraph C library.) , The igraph development team [cph] (Copyright holder of igraph C library.) , Free Software Foundation , Inc. [cph] (Copyright holder of GPL licenses.) , Ross Ihaka [cph, ctb] (Author of Mathlib.) , The R Development Core Team [cph] (Copyright holder of Mathlib.) , Royal Statistical Society [cph] (Copyright holder of Mathlib.) , The R Core Team [cph] (Copyright holder of Mathlib.) , The Regents of the University of California [cph] (Copyright holder of stdlib's qsort.) , Timothy Davis [cph, ctb] (Author of CXSPARSE (cs).) , Richard Lehoucq [cph, ctb] (Author of arpack.) , Danny Scrensen [cph, ctb] (Author of arpack and lapack.) , Phuong Vu [cph, ctb] (Author of arpack.) , Chao Yang [cph, ctb] (Author of arpack.) , Allan Cornet [cph, ctb] (Author of arpack.) , Sylvestre Ledru [cph, ctb] (Author of arpack.) , Chao Yang [cph, ctb] (Author of arpack.) , Rice University [cph] (Copyright holder of arpack.) , Scilab Enterprises [cph] (Copyright holder of arpack-ng.) , Melissa O'Neill [cph, ctb] (Author of PCG random number generator.) , Steven Johnson [cph, ctb] (Author of ax_pthread.) , Daniel G. [cph, ctb] (Author of ax_pthread.) , Marc Stevens [cph, ctb] (Author of ax_pthread.) , Minh Nguyen [cph, ctb] (Author of ax_pthread.) , Elliot Paquette [cph, ctb] (Contributor to igraph.) , Pascal Pons [cph, ctb] (Contributor to igraph.) , Jordi Hermoso [cph, ctb] (Contributor to arpack.) , Sébastien Fabbro [cph, ctb] (Contributor to arpack.) , Shinya Tasaki [cph, ctb] (Provided code used in the gene clustering example.)


Documentation:   PDF Manual  


GPL (>= 3) license


Imports Matrix, methods

Suggests igraph, scRNAseq, SummarizedExperiment, knitr, rmarkdown, testthat

System requirements: arpack (optional)


See at CRAN