clustering
Cluster PDB results by UniProt residue-range overlap.
Thin PDB-specific wrapper around protein_quest.clustering that handles PdbResult entries with invalid chain length metadata (these cannot participate in residue-range clustering and are returned/appended separately).
filter_pdbs_on_clustered_resolution(pdbs, top)
Filter PDB results by resolution within clusters.
Clusters are formed by distances between PDB results based on Jaccard-like distance between two PDB residue ranges, see structure_distance.
The clustering is done by complete-linkage hierarchical clustering followed by flat clustering using a distance criterion.
The cluster members are sorted by sort_structures.
The clusters are sorted by chain length, then by start and end residue, and then by PDB ID.
The clusters are flattened to the returned list by taking the top members from each cluster.
PDB results with invalid residue range (for example A=-) or unset resolution are
always placed at the end of the returned list.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pdbs
|
list[PdbResult]
|
PDB results to filter. |
required |
top
|
int
|
Number of top results to retain per cluster. |
required |
Returns:
| Type | Description |
|---|---|
list[PdbResult]
|
Filtered list of PDB results. |