Contents

Introduction

In the overview (seeutils::vignette("overview", package ="ViSEAGO")), we explained how to use ViSEAGO package. In this vignette we explain how to explore the effect of the GO semantic similarity algorithms on the tree structure, and the effect of the trees clustering based on the mouse_bioconductor vignette dataset (see utils::vignette("2_mouse_bioconductor", package ="ViSEAGO")).

Data

Vignette build convenience (for less build time and size) need that data were pre-calculated (provided by the package), and that illustrations were not interactive.

1 Clusters-heatmap of GO terms

The GO annotations of genes created and enriched GO terms are combined using ViSEAGO::build_GO_SS. The Semantic Similarity (SS) between enriched GO terms are calculated using ViSEAGO::compute_SS_distances method. We compute all distances methods with Resnik, Lin, Rel, Jiang, and Wang algorithms implemented in the GOSemSim package [1]. The built object myGOs contains all informations of enriched GO terms and the SS distances between them.

Then, a hierarchical clustering method using ViSEAGO::GOterms_heatmap is performed based on each SS distance between the enriched GO terms using the ward.D2 aggregation criteria. Clusters of enriched GO terms are obtained by cutting branches off the dendrogram. Here, we choose a dynamic branch cutting method based on the shape of clusters using dynamicTreeCut [2,3].

  1. Resnik distance
  1. Lin distance
  1. Rel distance
  1. Jiang distance
  1. Wang distance

2 Trees comparison

2.1 Global trees comparisons

The dendextend package [4], offers a set of functions for extending dendrogram objects in R, letting you visualize and compare trees of hierarchical clusterings (see utils::vignette("introduction", package ="dendextend")). In this package we use dendextend::dendlist and dendextend::cor.dendlist functions in order to calculate a correlation matrix between trees, which is based on the Baker Gamma and cophenetic correlation as mentioned in dendextend.

The correlation matrix can be visualized with the nice corrplot::corrplot function from corrplot package [5].

Drawing

As expected, we can easily tells us that GO semantic similarity algorithms based on the Information Content (IC-based) with Resnik, Lin, Rel, and Jiang methods are more similar than the Wang method which in based on the topology of the GO graph structure (Graph-based).

2.2 Paired trees comparison

We can also compare the dendrograms build with, for example, the Resnik and the Wang algorithms using dendextend::dendlist, dendextend::untangle, and dendextend::tanglegram functions. The quality of the alignment of the two trees can be calculated with dendextend::entanglement (0: good to 1:bad).

Drawing

3 Clusters comparison

Another possibility concerns the comparison of the dendrograms clusters.

3.1 Multiple clusters comparison

We can also explore the GO terms assignation between clusters according the used parameters with ViSEAGO::clusters_cor and plot the results with corrplot::corrplot using corrplot package.

Drawing

As expected, same as in the global trees comparison, we can easily tells us that GO semantic similarity algorithms based on the Information Content (IC-based) with Resnik, Lin, Rel, and Jiang methods are more similar than the Wang method which in based on the topology of the GO graph structure (Graph-based).

3.2 Paired trees comparison

We can also explore in details the GO terms assignation between clusters according the used parameters with ViSEAGO::compare_clusters.

Drawing

NB: For this vignette, this illustration is not interactive.

4 Conclusion

ViSEAGO package provides convenient methods to explore the effect of the GO semantic similarity algorithms on the tree structure, and the effect of the trees clustering playing a key role to ensuring functional coherence.

References

1. Yu G, Li F, Qin Y, Bo X, Wu Y, Wang S. GOSemSim: an R package for measuring semantic similarity among GO terms and gene products. Bioinformatics. 2010;26:976–8.

2. Langfelder P, Zhang B, Horvath S. Defining clusters from a hierarchical cluster tree: the Dynamic Tree Cut package for R. Bioinformatics. 2008;24:719–20.

3. Langfelder P, Zhang B, Steve Horvath. DynamicTreeCut: Methods for detection of clusters in hierarchical clustering dendrograms [Internet]. 2016. Available from: https://CRAN.R-project.org/package=dynamicTreeCut

4. Galili T. Dendextend: An r package for visualizing, adjusting, and comparing trees of hierarchical clustering. Bioinformatics [Internet]. 2015; Available from: http://bioinformatics.oxfordjournals.org/content/31/22/3718

5. Wei T, Simko V. Corrplot: Visualization of a correlation matrix [Internet]. 2016. Available from: https://CRAN.R-project.org/package=corrplot