clusterEvaluation {GOSim}R Documentation

Evaluate a given grouping of genes or GO terms.

Description

1.
Evaluate a given grouping of genes or terms with respect to their GO similarity.
2.
Perform a GO enrichment analysis of a specific cluster using topGO

Usage

evaluateClustering(clust, Sim)

analyzeCluster(genesInCluster, allgenes, cutoff=0.01)

Arguments

clust vector of cluster labels (integer or character) for each gene
Sim similarity matrix
genesInCluster Entrez gene IDs of genes in the cluster to investigate
allgenes Entrez gene IDs of all genes (on the chip)
cutoff significance cutoff for GO enrichment analysis

Details

If necessary, more details than the description above

Value

evaluateClustering returns a list with two items:

clusterstats matrix (ncluster x 2) of median within cluster similarities and median absolute deviations
clustersil cluster silhouette values
GOTerms list of significant GO terms and their description
p.values vector of p-values for significant GO terms
genes list of genes associated to each GO term

Author(s)

Holger Froehlich

References

Rousseeuw, P., Silhouettes: a graphical aid to the interpretation and validation of cluster analysis, J. Comp. and Applied Mathematics, 1987, 20, 53-6

Adrian Alexa, J"org Rahnenf"uhrer, Thomas Lengauer: Improved scoring of functional groups from gene expression data by decorrelating GO graph structure, Bioinformatics, 2006, 22(13):1600-1607

See Also

getGeneSimPrototypes, getGeneSim, getTermSim

Examples

        ## Not run:        
        setOntology("BP")
        gomap <- get("gomap",env=GOSimEnv)
        allgenes = sample(names(gomap), 1000) # suppose these are all genes
        genesOfInterest = sample(allgenes, 20) # suppose these are all genes of interest
        
        sim = getGeneSim(genesOfInterest,verbose=FALSE) # and these are their similarities
        hc = hclust(as.dist(1-sim), method="ward") # use them to perform a clustering
        plot(hc) # plot the cluster tree
        cl = cutree(hc, k=3) # take 3 clusters  

        if(require(cluster)){
                ev = evaluateClustering(cl, sim) # evaluate the clustering
                print(ev$clusterstats) # print out some statistics
                plot(ev$clustersil,main="") # plot the cluster silhouettes
        }
        
        # investigate cluster 1 further 
        if(require(topGO))
                analyzeCluster(genesOfInterest[cl == 1], allgenes, cutoff=0.05) # print out what cluster 1 is about
        ## End(Not run)

[Package GOSim version 1.1.3.2 Index]