prepareAxis {goCluster} | R Documentation |
The function expects a tree representing clusters from a hierarchical
clustering as input. Each cluster represented my contain only one
selected annotation term per annotation. This is usually achieved by
feeding the output of the minimizeSelection
output to this
function as input. prepareAxis
will merge all overlapping
clusters in the tree to the non-overlapping clusters with annotation
terms of minimal p-values. This forms an axis along the genes
originally used for clustering. When ordered according to the tree of
the hierarchical clustering the vector can easily be used for display purposes.
prepareAxis(minSelection, Clusters, annotations)
minSelection |
The tree of representing the clusters of the hierarchical tree. Each cluster may only contain zero or one selected annotation terms per annotation. |
Clusters |
A tree of the same structure as given for
minSelection but each node identifies the genes included in
that cluster. |
annotations |
The number of annotations represented by the tree. |
A list with a length that corresponds to the number of annotations present in the original tree. Each list item contains a vector that matches the list of genes. For each gene the annotation term with minimal p-values (if any) is given.
Gunnar Wrobel, work@gunnarwrobel.de, http://www.gunnarwrobel.de.
namedv1 <- c(0.01,0.1) names(namedv1) <- c("GeneA", "GeneB") namedv2 <- c(0.01,0.01) names(namedv2) <- c("GeneB", "GeneC") namedv3 <- c(0.5,0.1) names(namedv3) <- c("GeneD", "GeneE") a1 <- list(annotationA = namedv1, annotationB = namedv2, annotationC = namedv3) a2 <- list(annotationA = namedv2, annotationB = namedv3, annotationC = namedv1) b <- list(list(a1,a2),list(a2,a1)) c <- minimizeSelection(b, 3) clusters <- list(list(c(1,2),c(8,9)),list(c(20,21),c(20,21))) prepareAxis(c, clusters, 3)