Size-Filtering TSR
Compares proteins of very different sizes fairly, by discarding triangles from the larger structure that the smaller one could not possibly contain.
Read the paper: A study of a hierarchical structure of proteins and ligand binding sites of receptors using the triangular spatial relationship-based structure comparison method and development of a size-filtering feature designed for comparing different sizes of protein structures (opens in a new tab)Proteins: Structure, Function, and Bioinformatics, 2022, 90(1), 239–257

On this page
Overview
Protein comparison often encounters difficulties when analysing proteins of vastly different sizes. Smaller proteins may appear structurally dissimilar to larger ones simply because of the size difference, leading to underestimation of structural similarities. The size-filtering algorithm is an enhancement to the Triangular Spatial Relationship (TSR)-based method designed to address this.
Size filtering works by calculating the MaxDist — the maximum distance between Cα atoms — for all triangles in the proteins being compared. Triangles from the larger protein that exceed the MaxDist of the smaller one are filtered out, removing outliers that skew the similarity calculation. After filtering, the comparison is performed using Jaccard similarity, resulting in improved clustering of proteins.
Studies demonstrated the effectiveness of this method across several protein families. Applying size filtering to glucocorticoid receptors led to improved clustering results, grouping proteins that had previously been separated because of size differences. Similar improvements were observed with other protein families, including phosphatases and GPCRs.
By refining structural similarity measurements, size filtering enables more accurate comparisons between proteins of different sizes and helps uncover their functional relationships.
Run it with BioTSR
Size filtering is an option of every BioTSR method, --size-filter, followed
by a distance in ångströms. A run keeps only the triangles whose longest edge,
MaxDist, is below that distance:
python -m pip install "biotsr==1.0.0"
biotsr fetch 1UBQ --pdb-dir structures
biotsr run --method protein --pdb structures/1UBQ.pdb --chain A --size-filter 25 --output resultsWith a 25 Å cutoff, ubiquitin chain A keeps 60,742 of its 70,300 triangles,
which give 37,522 distinct keys. The files are written under the prefix
results/1UBQ_A_protein_size25, and the run records how many triangles the
filter removed.
- Choosing the cutoff: BioTSR applies one fixed cutoff per run and does not derive it from a second structure. In the published comparison the cutoff for the larger protein was the MaxDist of the smaller one, so choose the value from the smaller structure and pass it when computing the larger.
- Compared with the earlier package: the filter is the same as in TSR-Package, where a value of 10000 meant no filtering, and keeps triangles strictly below the cutoff. In BioTSR it is off unless the option is given, and a run reports the triangles it removed.
- Which methods take it: all 20 methods, the cross methods included.
- From Python:
biotsr.analyze(..., size_filter=25.0). - Comparing results: filtering keeps the same key space, so filtered keys are still comparable with unfiltered ones, but the analysis functions ask you to confirm that you mean to mix the two (tutorial 07).
| Option | Protein Cα2 methods | Atomic: amino acids5 methods | Atomic: ligands, carbohydrates, nucleotides8 methods | Cross TSR5 methods | Effect on keys |
|---|---|---|---|---|---|
Amino acid grouping--aa-grouping | all methods | not available | not available | not available | Grouped residue labels: a different key space. |
Secondary structure (SSE-TSR)--sse | all methods | not available | not available | not available | Keys unchanged; each key’s count is split over 18 categories. |
Mirror images--mirror | all methods | all methods | all methods | not available | A key is negated when its angle before folding exceeds 90°: a different key space. |
Size filtering--size-filterthis page | all methods | all methods | all methods | all methods | Same keys; triangles whose longest edge is at or above the cutoff are left out. |
Contact cutoff--contact-cutoff | not available | not available | not available | all methods | Chooses which atoms on each side take part; not a key change. |
Tutorial 01 runs the option beside the other Cα options, and the user guide, §11 describes every option.
Source code
BioTSR (opens on GitHub)
Current software
Used by the examples on this page.
Licence Apache License 2.0
TSR-Package (opens on GitHub)
Earlier implementation
Size filtering was first implemented here, as the size_filter argument of the TSR() function. It is kept unchanged for provenance and for work that depends on it; its README has its own installation instructions.
Licence MIT License