Visualise Clusterings at Different Resolutions

Deciding what resolution to use can be a difficult question when approaching a clustering analysis. One way to approach this problem is to look at how samples move as the number of clusters increases. This package allows you to produce clustering trees, a visualisation for interrogating clusterings as resolution increases.


Project Status Lifecycle Travis-CI Build Status AppVeyor Build Status Coverage Status CRAN Status CRAN Monthly Downloads CRAN Downloads

Deciding what resolution to use can be a difficult question when approaching a clustering analysis. One way to approach this problem is to look at how samples move as the number of clusters increases. This package allows you to produce clustering trees, a visualisation for interrogating clusterings as resolution increases.

You can install the release version of clustree from CRAN with:

install.packages("clustree")

If you want to use the development version that can be installed from GitHub using the remotes package:

# install.packages("remotes")
remotes::install_github("lazappi/clustree")

To also build the vignettes use:

# install.packages("remotes")
remotes::install_github("lazappi/clustree", dependencies = TRUE,
                         build_vignettes = TRUE)

NOTE: Building the vignettes requires the installation of additional packages.

Documentation

The documentation for clustree is available from CRAN at https://cran.r-project.org/package=clustree.

To view the vignette and all the package documentation for the development version visit http://lazappi.github.io/clustree.

Citing clustree

If you use clustree or the clustering trees approach in your work please cite our publication "Zappia L, Oshlack A. Clustering trees: a visualization for evaluating clusterings at multiple resolutions. Gigascience. 2018;7. DOI:gigascience/giy083.

citation("clustree")
 
   Zappia L, Oshlack A. Clustering trees: a visualization for
   evaluating clusterings at multiple resolutions. Gigascience.
   2018;7. DOI:gigascience/giy083
 
A BibTeX entry for LaTeX users is
 
   @Article{,
     author = {Luke Zappia and Alicia Oshlack},
     title = {Clustering trees: a visualization for evaluating clusterings at
              multiple resolutions},
     journal = {GigaScience},
     volume = {7},
     number = {7},
     month = {jul},
     year = {2018},
     url = {http://dx.doi.org/10.1093/gigascience/giy083},
     doi = {10.1093/gigascience/giy083},
   }

Contributors

Thank you to everyone who has contributed code to the clustree package:

  • @andreamrau - added the edge_arrow_ends option
  • @mojaveazure - added support for Seurat v3 objects

News

clustree 0.4.0 (2019-04-18)

Minor changes

  • Add support for Seurat v3 objects (thanks to @mojaveazure)
  • Add SC3 stability index section to vignette (Fixes #28)

clustree 0.3.0 (2019-02-24)

Minor changes

  • Make the cluster node attribute a factor to improve use as node colour (Fixes #20)
  • Add show_axis argument that displays the y-axis with resolution values and gridlines (Fixes #24)
  • Add ability to add additional node labels with custom information (Fixes #23)
  • Update CITATION to give information about the GigaScience paper
  • Update README
  • Update vignette
    • Add custom labels section
    • Add references
    • Add table of contents and number sections

Bug fixes

  • Add checks for metadata column and node aesthetic names (Fixes #15)
  • Use fixed patterns when identifying clustering columns in data.frames (Fixes #19)

Development versions

clustree 0.3.0.9000 (2019-04-27)

  • Add support for Seurat v3 objects (thanks to @mojaveazure)

clustree 0.3.0.9001 (2019-04-27)

  • Add SC3 stability index section to vignette (Fixes #28)

clustree 0.2.2 (2018-07-10)

  • Replace SingleCellExperiment and Seurat example datasets with a list
  • Add additional checks for suggested packages
  • Remove links to suggested packages in documentation

clustree 0.2.2.9000 (2018-08-01)

  • Use fixed patterns when identifying clustering columns in data.frames

clustree 0.2.2.9001 (2018-08-06)

  • Make the cluster node attribute a factor to improve use as node colour

clustree 0.2.2.9002 (2019-02-02)

  • Add show_axis argument

clustree 0.2.2.9003 (2019-02-12)

  • Add checks for metadata column and node aesthetic names
  • Adjust show_axis to use gridlines

clustree 0.2.2.9004 (2019-02-17)

  • Add ability to add additional node labels

clustree 0.2.2.9005 (2019-02-24)

  • Update CITATION
  • Update README
  • Add spelling checks
  • Update vignette
    • Add custom labels section
    • Add references
    • Add table of contents and number sections

clustree 0.2.1 (2018-07-09)

  • Bump version for CRAN

clustree 0.2.1.9000 (2018-07-10)

  • Replace SingleCellExperiment and Seurat example datasets with a list

clustree 0.2.1.9001 (2018-07-10)

  • Add additional checks for suggested packages
  • Remove links to suggested packages in documentation

clustree 0.2.0 (2018-06-24)

  • Calculate the SC3 stability index for cluster nodes
  • Improvements to the clustree function:
    • Add option to use core network to calculate layout
    • Add option to highlight core network
    • Add option to return plot, graph or layout
  • New clustree_overlay function
    • Allows overlaying of clustering trees on other data dimensions
  • Store trees as tbl_graph instead of igraph objects
  • Switch to GPL-3 license
  • Updates to vignette, documentation and tests

clustree 0.1.2 (2018-04-11)

  • Adjust tests to work with new checkmate version (v1.8.6)
  • Update R requirement to >= 3.4 (for compatibility with SingleCellExperiment)
  • Add CITATION file and update author entries in DESCRIPTION

clustree 0.1.2.9000 (2018-05-08)

  • Add functions to calculate the SC3 stability index
  • Switch to GPL-3 license

clustree 0.1.2.9001 (2018-05-09)

  • Add option to use core network to calculate layout
  • Add option to highlight core network
  • Add option to return plot, graph or layout

clustree 0.1.2.9002 (2018-05-22)

  • Store tree as tbl_graph instead of igraph object
  • Update vignette

clustree 0.1.2.9003 (2018-06-20)

  • Add checks for suggested packages

clustree 0.1.2.9004 (2018-06-22)

  • Add clustree_overlay function

clustree 0.1.2.9005 (2018-06-23)

  • Add plot_sides argument to clustree_overlay

clustree 0.1.1 (2018-03-23)

  • Add edge_arrow_ends argument

clustree 0.1.1.9000 (2018-04-11)

  • Adjust tests to match checkmate messages

clustree 0.1.1.9001 (2018-04-11)

  • Update R requirement to >= 3.4

clustree 0.1.1.9002 (2018-04-11)

  • Add CITATION file
  • Update author entries in DESCRIPTION

clustree 0.1.0 (2018-03-01)

  • First release
  • Remove theme_clustree function

clustree 0.0.0 (2018-01-22)

clustree 0.0.0.9000 (2018-01-22)

  • Start development

clustree 0.0.0.9001 (2018-01-23)

  • Implement basic plotting

clustree 0.0.0.9002 (2018-01-24)

  • Add node aesthetic options

clustree 0.0.0.9003 (2018-01-25)

  • Add more control over aesthetics

clustree 0.0.0.9004 (2018-01-26)

  • Add SingleCellExperiment example data
  • Add SingleCellExperiment method

clustree 0.0.0.9005 (2018-01-27)

  • Add Seurat example data
  • Add Seurat method

clustree 0.0.0.9006 (2018-01-27)

  • Add documentation
  • Add parameter checks

clustree 0.0.0.9007 (2018-01-27)

  • Add tests and run checks

clustree 0.0.0.9008 (2018-01-27)

  • Add vignettes

clustree 0.0.0.9009 (2018-02-02)

  • Add data option to exprs for Seurat objects

clustree 0.0.0.9010 (2018-02-05)

  • Check that at least two resolutions have been provided
  • Add node text colour option
  • Improve example scRNA-seq datasets

clustree 0.0.0.9011 (2018-02-09)

  • Fix missing node when all aesthetics static

clustree 0.0.0.9012 (2018-02-15)

  • Switch from using function for aggregation to function names
  • Improve naming of aesthetics
  • Set alpha scale limits
  • Add Sugiyama layout
  • Update vignette
  • Tidy code

clustree 0.0.0.9013 (2018-02-28)

  • Fix resolution colour ordering

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("clustree")

0.4.0 by Luke Zappia, 3 months ago


https://github.com/lazappi/clustree


Report a bug at https://github.com/lazappi/clustree/issues


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


Authors: Luke Zappia [aut, cre] , Alicia Oshlack [aut] , Andrea Rau [ctb] , Paul Hoffman [ctb]


Documentation:   PDF Manual  


GPL-3 license


Imports checkmate, igraph, dplyr, grid, ggplot2, viridis, methods, rlang, tidygraph, ggrepel

Depends on ggraph

Suggests testthat, knitr, rmarkdown, SingleCellExperiment, Seurat, covr, SummarizedExperiment, pkgdown, spelling


See at CRAN