collectTerms {goCluster} | R Documentation

## A function to collect all annotation terms of a tree

### Description

The function will parse a tree (list of lists) and extract the names of items in all leaves of the tree that are named "annot". A tree with the same structure is returned but the leaves are either removed or replaced by the names of the items they contained.

### Usage

    collectTerms(tree)

### Arguments

`tree` | A tree that contains list that are named "annot".

### Value

A tree with leaves that only hold the names of items of the original tree.

### Author(s)

Gunnar Wrobel, work@gunnarwrobel.de, http://www.gunnarwrobel.de.

### See Also

`clusterVisualHeatmap-class`

### Examples

    namedv1 <- c(0.1,0.1,0.1)
    names(namedv1) <- c("AnnoA","AnnoB","AnnoC")
    namedv2 <- c(0.1,0.1,0.1)
    names(namedv2) <- c("AnnoD","AnnoE","AnnoF")

    a <- list(list(annot = list(namedv1,namedv2), group = 1),
              list(annot = list(namedv2,namedv1), group = 1))

    collectTerms(a)

[Package goCluster version 1.6.0 Index]