Connecting: Combines the spectral clusters to build the connected...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/Connecting.R

Description

Considering some biological criterion based on density, the clusters which are identified by spectral clustering are combined to estimate biological populations.

Usage

1
Connecting(full, society,conductance, number.of.clusters, labels.for_num.of.clusters, separation.factor, talk=TRUE)

Arguments

full

The matrix containing the coordinates of all data points.

society

The list of communities.

conductance

A matrix in which each entry is the conductance between two communities.

number.of.clusters

A list containing the desired cluster numbers.

labels.for_num.of.clusters

The k'th element of this list, is a vector containing the labels as result of clustering to k parts.

separation.factor

This threshold controls to what extend clusters should be combined or kept separate.

talk

A boolean flag with default value TRUE. Setting it to FALSE will keep running the procedure quite with no messages.

Details

A hint for setting separation.factor: While separation.factor=0.7 is normally an appropriate value for many datasets, for others some value in range 0.3 to 1.2 may produce better results depending on what populations are of particular interest.

Value

Returns two objects: 1) label, a vector containing the labels that determines to which component each data point belongs. 2) clusters.graph, the max.conductance matrix that describes the original graph based on clusters.

Author(s)

Habil Zare and Parisa Shooshtari

References

Zare, H. and Shooshtari, P. and Gupta, A. and Brinkman R.B: Data Reduction for Spectral Clustering to Analyse High Throughput Flow Cytometry Data. BMC Bioinformatics, 2010, 11:403.

See Also

SamSPECTRAL

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
	## Not run: 
	    library(SamSPECTRAL)

	   # Reading data file which has been transformed using log transform
	    data(small_data)
		full <- small
	
		# Parameters:
		m <- 3000; ns <- 200; sl <- 3; cwt <-1; precision <- 6; mnc <-30 
	
    	# Sample the data and build the communities
    	society <- Building_Communities(full=full,m=m, space.length=sl, community.weakness.threshold=cwt)
    	
	
    	# Compute conductance between communities
    	conductance <- Conductance_Calculation(full=full, normal.sigma=ns, space.length=sl, society=society, precision=precision)
    	
    	# Use spectral clustering to cluster the data
	    clust_result <- Civilized_Spectral_Clustering(full=full, maximum.number.of.clusters=mnc, society=society, conductance=conductance)    
    	number.of.clusters <- clust_result@number.of.clusters
    	labels.for_num.of.clusters <- clust_result@labels.for_num.of.clusters
		L <- labels.for_num.of.clusters[[number.of.clusters]]
    	# plot(full, pch='.', col= L)
		
    	
    	# Connect components
    	L <- Connecting(full=full, society=society, conductance=conductance, number.of.clusters=number.of.clusters,
			 labels.for_num.of.clusters=labels.for_num.of.clusters, separation.factor=0.39)
    	
    	plot(full, pch='.', col= L)

	
## End(Not run)

Bioconductor-mirror/SamSPECTRAL documentation built on June 1, 2017, 2:17 a.m.