compare_clusters {ViSEAGO} | R Documentation

## Heatmap to compare partitions

### Description

Build an interactive heatmap of the common GO terms frequency between several partitions.

### Usage

    compare_clusters(clusters)

    ## S4 method for signature 'list'
    compare_clusters(clusters)

### Arguments

`clusters` | a `list` of named `GO_clusters-class` objects, from `GOterms_heatmap` or `GOclusters_heatmap` methods.

### Details

Build an interactive heatmap of common GO terms frequency between partitions from several `GO_clusters-class` objects.

### Value

an interactive javascript heatmap.

### References

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

### See Also

Other GO_clusters: `GO_clusters-class`, `GOclusters_heatmap()`, `clusters_cor()`, `show_heatmap()`, `show_table()`

### Examples

    # load example object
    data(
        myGOs,
        package="ViSEAGO"
    )

    ## Not run:
    # compute Semantic Similarity (SS)
    myGOs<-ViSEAGO::compute_SS_distances(
        myGOs,
        distance=c("Resnik","Lin","Rel","Jiang","Wang")
    )

    # Resnik distance GO terms heatmap
    Resnik_clusters_wardD2<-ViSEAGO::GOterms_heatmap(
        myGOs,
        showIC=TRUE,
        showGOlabels=TRUE,
        GO.tree=list(
            tree=list(
                distance="Resnik",
                aggreg.method="ward.D2"
            ),
            cut=list(
                dynamic=list(
                    deepSplit=2,
                    minClusterSize =2
                )
            )
        ),
        samples.tree=NULL
    )

    # Lin distance GO terms heatmap
    Lin_clusters_wardD2<-ViSEAGO::GOterms_heatmap(
        myGOs,
        showIC=TRUE,
        showGOlabels=TRUE,
        GO.tree=list(
            tree=list(
                distance="Lin",
                aggreg.method="ward.D2"
            ),
            cut=list(
                dynamic=list(
                    deepSplit=2,
                    minClusterSize =2
                )
            )
        ),
        samples.tree=NULL
    )

    # Resnik distance GO terms heatmap
    Rel_clusters_wardD2<-ViSEAGO::GOterms_heatmap(
        myGOs,
        showIC=TRUE,
        showGOlabels=TRUE,
        GO.tree=list(
            tree=list(
                distance="Rel",
                aggreg.method="ward.D2"
            ),
            cut=list(
                dynamic=list(
                    deepSplit=2,
                    minClusterSize =2
                )
            )
        ),
        samples.tree=NULL
    )

    # Resnik distance GO terms heatmap
    Jiang_clusters_wardD2<-ViSEAGO::GOterms_heatmap(
        myGOs,
        showIC=TRUE,
        showGOlabels=TRUE,
        GO.tree=list(
            tree=list(
                distance="Jiang",
                aggreg.method="ward.D2"
            ),
            cut=list(
                dynamic=list(
                    deepSplit=2,
                    minClusterSize =2
                )
            )
        ),
        samples.tree=NULL
    )

    # Resnik distance GO terms heatmap
    Wang_clusters_wardD2<-ViSEAGO::GOterms_heatmap(
        myGOs,
        showIC=TRUE,
        showGOlabels=TRUE,
        GO.tree=list(
            tree=list(
                distance="Wang",
                aggreg.method="ward.D2"
            ),
            cut=list(
                dynamic=list(
                    deepSplit=2,
                    minClusterSize =2
                )
            )
        ),
        samples.tree=NULL
    )

    ## End(Not run)

    # clusters to compare
    clusters<-list(
        Resnik="Resnik_clusters_wardD2",
        Lin="Lin_clusters_wardD2",
        Rel="Rel_clusters_wardD2",
        Jiang="Jiang_clusters_wardD2",
        Wang="Wang_clusters_wardD2"
    )

    ## Not run:
    # clusters content comparisons
    clusters_comp<-ViSEAGO::compare_clusters(clusters)

    ## End(Not run)

[Package ViSEAGO version 1.2.0 Index]