GOterms_heatmap {ViSEAGO} | R Documentation

## Build a clustering heatmap on GO terms.

### Description

This method computes a clustering heatmap based on GO terms semantic similarity.

### Usage

    GOterms_heatmap(myGOs, showIC = TRUE, showGOlabels = TRUE,
      GO.tree = list(tree = list(distance = "Wang", aggreg.method =
      "ward.D2", rotate = NULL), cut = list(dynamic = list(pamStage = TRUE,
      pamRespectsDendro = TRUE, deepSplit = 2, minClusterSize = 2))),
      samples.tree = NULL)

    ## S4 method for signature 'GO_SS'
    GOterms_heatmap(myGOs, showIC = TRUE,
      showGOlabels = TRUE, GO.tree = list(tree = list(distance = "Wang",
      aggreg.method = "ward.D2", rotate = NULL), cut = list(dynamic =
      list(pamStage = TRUE, pamRespectsDendro = TRUE, deepSplit = 2,
      minClusterSize = 2))), samples.tree = NULL)

### Arguments

`myGOs` | a `GO_SS-class` object from `compute_SS_distances`.
`showIC` | `logical` (default to TRUE) to display the GO terms Information Content (IC) side bar.
`showGOlabels` | `logical` (default to TRUE) to display the GO terms ticks on y axis.
`GO.tree` | a named `list` of parameters to build and cut the GO terms `dendrogram`. tree (a named `list` with:) distance ("Wang" by default) distance computed from the semantic similarity which could be IC-based ("Resnik", "Rel", "Lin", or "Jiang") or graph-based ("Wang"). aggreg.method ("ward.D2" by default) aggregation method criteria from `hclust` ("ward.D", "ward.D2", "single", "complete", "average", "mcquitty", "median", or "centroid") to build a `dendrogram`. rotate sort the branches of the tree based on a vector - eithor of labels order or the labels in their new order cut (a named `list` with:) static (default to NULL) a `numeric` value that is the height (between 0 and 1), or the number of clusters (value > 1) to cut the `dendrogram`. dynamic (a named `list` which only contains `cutreeDynamic` options values below) pamStage (default to TRUE) second (PAM-like) stage will be performed. pamRespectsDendro (default to TRUE) PAM stage will respect the dendrogram in the sense that objects and small clusters will only be assigned to clusters that belong to the same branch that the objects or small clusters being assigned belong to. deepSplit (default to 2) provides a rough control over sensitivity for cluster splitting (range 0 to 4). The higher the value (or if TRUE), the more and smaller clusters will be produced. minClusterSize (default to 2) minimum cluster size.
`samples.tree` | a named `list` of parameters to build and cut the samples `dendrogram` (default to NULL). tree (a named `list` with:) distance ("pearson" by default) distance computed that could be correlation ("abs.pearson","pearson", "kendall", or "spearman"), or `dist` method (euclidean", "maximum", "manhattan", "canberra", "binary", or "minkowski). aggreg.method ("average" by default) same options than for `GO.tree` argument cut same options than for `GO.tree` argument.

### Details

This method computes a clustering heatmap based on GO terms semantic similarity (computed with `compute_SS_distances`).
The dendrogram produced could be cutted in static or dynamic mode.

1. build dendrograms on GO terms and optionally on samples.

2. cut in static or dynamic mode and color the dendrogram branchs.

3. build an interactive clustering heatmap based on `heatmaply`.

### Value

a `GO_clusters-class` object.

### References

Matt Dowle and Arun Srinivasan (2017). data.table: Extension of 'data.frame'. R package version 1.10.4. https://CRAN.R-project.org/package=data.table.

Tal Galili (2015). dendextend: an R package for visualizing, adjusting, and comparing trees of hierarchical clustering. Bioinformatics. DOI:10.1093/bioinformatics/btv428.

Tal Galili (2017). heatmaply: Interactive Cluster Heat Maps Using 'plotly'. R package version 0.9.1. https://CRAN.R-project.org/package=heatmaply.

Peter Langfelder, Bin Zhang and with contributions from Steve Horvath (2016). dynamicTreeCut: Methods for Detection of Clusters in Hierarchical Clustering Dendrograms. R package version 1.63-1. https://CRAN.R-project.org/package=dynamicTreeCut.

Erich Neuwirth (2014). RColorBrewer: ColorBrewer Palettes. R package version 1.1-2. https://CRAN.R-project.org/package=RColorBrewer.

Carson Sievert, Chris Parmer, Toby Hocking, Scott Chamberlain, Karthik Ram, Marianne Corvellec and Pedro Despouy (2017). plotly: Create Interactive Web Graphics via 'plotly.js'. R package version 4.6.0. https://CRAN.R-project.org/package=plotly.

Hadley Wickham (2016). scales: Scale Functions for Visualization. R package version 0.4.1. https://CRAN.R-project.org/package=scales.

H. Wickham. ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York, 2009.

### See Also

Other GO_terms: `GOcount`, `annotate`, `create_topGOdata`, `gene2GO-class`, `merge_enrich_terms`

Other semantic_similiarity: `GOclusters_heatmap`

Other visualization: `GOclusters_heatmap`, `GOcount`, `Upset`, `available_organisms`, `overLapper`, `show_heatmap`, `show_table`

### Examples

    ###################
    # load data example
    utils::data(
        myGOs,
        package="ViSEAGO"
    )
    ## Not run:
    ###################
    # compute GO terms Semantic Similarity distances
    myGOs<-ViSEAGO::compute_SS_distances(
       myGOs,
       distance="Wang"
    )

    ##################
    # GOtermsHeatmap with default parameters
    Wang_clusters_wardD2<-ViSEAGO::GOterms_heatmap(
        myGOs,
        showIC=TRUE,
        showGOlabels=TRUE,
        GO.tree=list(
            tree=list(
                distance="Wang",
                aggreg.method="ward.D2",
                rotate=NULL
            ),
            cut=list(
                dynamic=list(
                    pamStage=TRUE,
                    pamRespectsDendro=TRUE,
                    deepSplit=2,
                    minClusterSize =2
                )
            )
        ),
        samples.tree=NULL
    )

    ## End(Not run)

[Package ViSEAGO version 1.0.0 Index]