View source: R/hclustThreshold.R
| hclustThreshold | R Documentation | 
From a Sorensen-Dice threshold dissimilarity matrix, generate an object of class "hclust"
hclustThreshold(
  x,
  onTheFlyDev = NULL,
  method = "complete",
  jobName = paste("Equivalence cluster", method, sep = "_"),
  ylab = "Sorensen equivalence threshold dissimilarity",
  ...
)
x | 
 an object of class "dist" with the Sorensen-Dice equivalence threshold dissimilarities matrix  | 
onTheFlyDev | 
 character, name of the graphical device where to immediately display the resulting
diagram. The appropriate names depend on the operating system. Defaults to   | 
method | 
 character, one of the admissible methods in function   | 
jobName | 
 character, main plot name, defaults to
  | 
ylab | 
 character, label of the vertical axis of the plot, defaults to "Sorensen equivalence threshold dissimilarity"  | 
... | 
 additional arguments to   | 
An object of class equivClustSorensen, descending from class hclust
# Gene lists to analyse:
data("allOncoGeneLists")
# Obtaining ENTREZ identifiers for the gene universe of humans:
library(org.Hs.eg.db)
humanEntrezIDs <- keys(org.Hs.eg.db, keytype = "ENTREZID")
# First, compute the Sorensen-Dice threshold equivalence dissimilarity
# for ontology BP at level 4:
# # Very time consuming, it requires building all joint enrichment contingency tables
# dOncBP4 <- sorenThreshold(allOncoGeneLists, onto = "BP", GOLevel = 4,
#                         geneUniverse = humanEntrezIDs, orgPackg = "org.Hs.eg.db")
# Better (much faster), using the previously tabulated contingency tables:
data("cont_all_BP4")
dOncBP4 <- sorenThreshold(cont_all_BP4)
clust.threshold <- hclustThreshold(dOncBP4)
plot(clust.threshold, main = "AllOnco genelists, BP ontology at level 4",
     ylab = "Sorensen equivalence threshold")
# With the same data, an UPGMA dendrogram:
clust.threshold <- hclustThreshold(dOncBP4, method = "average")
plot(clust.threshold, main = "AllOnco genelists, BP ontology at level 4",
     ylab = "Sorensen equivalence threshold")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.