haddock.fcc.cluster_fcc module

Asymmetric Taylor-Butina Disjoint Clustering Algorithm.

Authors:

RODRIGUES Joao TRELLET Mikael MELQUIOND Adrien

class haddock.fcc.cluster_fcc.Cluster(name, center)[source]

Bases: object

Defines a Cluster. A Cluster is created with a name and a center (Element class)

add_member(element)[source]

Adds one single element to the cluster.

center
members
name
populate()[source]

Populates the Cluster member list through the neighbor list of its center.

class haddock.fcc.cluster_fcc.Element(name)[source]

Bases: object

Defines a ‘clusterable’ Element

add_neighbor(neighbor)[source]

Adds another element to the neighbor list

assign_cluster(clust_id)[source]

Assigns the Element to Cluster. 0 if unclustered

cluster
name
neighbors
haddock.fcc.cluster_fcc.cluster_elements(element_pool, threshold)[source]

Groups Elements within a given threshold together in the same cluster.

haddock.fcc.cluster_fcc.output_clusters(handle, clusters)[source]

Outputs the cluster name, center, and members.

haddock.fcc.cluster_fcc.read_matrix(path, cutoff, strictness)[source]

Reads in a four column matrix (1 2 0.123 0.456

)

and creates an dictionary of Elements.

The strictness factor is a <float> that multiplies by the cutoff to produce a new cutoff for the second half of the matrix. Used to allow some variability while keeping very small interfaces from clustering with anything remotely similar.

haddock.fcc.cluster_fcc.remove_true_singletons(element_pool)[source]

Removes from the pool elements without any neighbor