makeClusters: Creates clusters from a co-expression minimal linkage...

Description Usage Arguments Value Author(s) See Also Examples

Description

This function uses minimal linkage data to perform rapid clustering by singleton agglomeration (i.e., a gene will always cluster with its nearest neighbours provided the distance to those neighbours does not exceed some threshold). For alternative (but slower) clustering options, see the makeClustersFF function.

Usage

1
makeClusters(aM, cD, threshold = 0.5)

Arguments

aM

A data frame constructed by associatePosteriors or kCluster, defining for each gene the nearest neighbour of higher row index and the dissimilarity with that neighbour.

cD

The data given as input to associatePosteriors or kCluster that produced 'aM'.

threshold

A threshold on the maximum dissimilarity at which two genes can cluster. Defaults to 0.5.

Value

An IntegerList object, each member of whom defines a cluster of co-expressed genes. The object is ordered decreasingly by the size of each cluster.

Author(s)

Thomas J Hardcastle

See Also

makeClustersFF kCluster associatePosteriors

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
#Load in the processed data of observed read counts at each gene for each sample. 
data(ratThymus, package = "clusterSeq")

# Library scaling factors are acquired here using the getLibsizes
# function from the baySeq package.
libsizes <- getLibsizes(data = ratThymus)

# Adjust the data to remove zeros and rescale by the library scaling
# factors. Convert to log scale.
ratThymus[ratThymus == 0] <- 1
normRT <- log2(t(t(ratThymus / libsizes)) * mean(libsizes))

# run kCluster on reduced set.
normRT <- normRT[1:1000,]
kClust <- kCluster(normRT)

# make the clusters from these data.
mkClust <- makeClusters(kClust, normRT, threshold = 1)

tjh48/clusterSeq documentation built on May 31, 2019, 3:40 p.m.