Skip to content

clustering

Cluster 3D-beacons UniProt summaries by PDBe residue-range overlap.

PDBe Overviews are clustered and pruned with the source-agnostic filter_structures_on_clustered_resolution. Overviews from other providers (AlphaFold, SWISS-MODEL, ...) pass through unchanged.

Attributes:

Name Type Description
PDBE_PROVIDER_RESPONSE

Provider name used in the Overview summaries to identify entries provided by PDBe.

OverviewClusterableEntry dataclass

Adapter exposing the ClusterableStructure protocol.

Wraps an Overview so the generic clustering algorithm can consume it.

cluster_overviews_per_uniprot(summaries, top)

Cluster PDBe Overviews of each UniProt summary and keep at most top per accession cluster.

Overviews from providers other than PDBe are passed through unchanged and appended after the pruned PDBe Overviews.

Parameters:

Name Type Description Default
summaries list[UniprotSummary]

UniProt summaries to prune.

required
top int

Maximum number of PDBe Overviews to retain per UniProt accession cluster.

required

Returns:

Type Description
list[UniprotSummary]

New list of UniprotSummary with PDBe Overviews pruned.

Raises:

Type Description
ValueError

If top is not a positive integer.