public class CAST_Clustering extends Clustering
CAST_Clustering
class represents a
clustering (i.e., grouping or partitioning) of a collection of genes using
the CAST (cluster affinity search technique) clustering method.clusters, experiments, genes
Constructor and Description |
---|
CAST_Clustering(String fileName,
double affinityThreshold)
Creates an initially empty
CAST_Clustering . |
Modifier and Type | Method and Description |
---|---|
int |
addGenesWithHighAffinity(Cluster current)
Adds to the specified
Cluster all unassigned genes that are closer to the genes in the Cluster , on average, than the affinity threshold. |
void |
cast()
Performs CAST clustering.
|
static void |
main(String[] args)
The
main method creates a Clustering based on gene and experiment data from a tab-delimited text file. |
int |
removeGenesWithLowAffinity(Cluster current)
Removes from the specified
Cluster any genes that are farther from the genes in the Cluster , on average, than the affinity threshold. |
getExperimentNamesFromFile, getGeneInformationFromFile, getNumClusters, getNumExperiments, getNumGenes, toString
public CAST_Clustering(String fileName, double affinityThreshold)
CAST_Clustering
.
A set of genes and experiments are determined from the specified String
representing the name of a file.
Genes and experiments are read-in from the tab-delimited file. Initially, the constructed
CAST_Clustering
is empty, i.e., none of the genes are assigned
to clusters.
fileName
- the name of a tab-delimited text file containing gene and experiment dataaffinityThreshold
- the distance between any gene and the other genes in its cluster, on average, must be at least this threshold valuepublic int addGenesWithHighAffinity(Cluster current)
Cluster
all unassigned genes that are closer to the genes in the Cluster
, on average, than the affinity threshold.current
- the Cluster
to add genes toint
indicating the number of genes added to the clusterpublic int removeGenesWithLowAffinity(Cluster current)
Cluster
any genes that are farther from the genes in the Cluster
, on average, than the affinity threshold.current
- the Cluster
to remove genes fromint
indicating the number of genes removed from the clusterpublic void cast()
Repeast the following until all genes are assigned to some cluster. Chooses a gene not already assigned to a cluster and assigns it to a new cluster. Then, iteratively (1) adds to the new cluster any unassigned genes that are closer to the genes in the new cluster, on average, than the affinity threshold and (2) removes from the new cluster any genes that are farther from the genes in the new cluster, on average, than the affinity threshold.
public static void main(String[] args)
main
method creates a Clustering
based on gene and experiment data from a tab-delimited text file.
The clustering is determined using CAST clustering. The text file and the affinity threshold are specified as command line arguments. The computed set of clusters is output to standard output (and can be redirected to a file).
args
- an array of Strings
representing any command line arguments