Skip to main content
TSR Research Group

Software

BioTSR

BioTSR is the unified software implementation of the Triangular Spatial Relationship (TSR) methodology. One Python package and one command line compute TSR keys for protein structures, amino acids, ligands, carbohydrates and nucleotides, and for the interfaces between them, and compare structures by the keys they share.

Version
1.0.0
Released
Licence
Apache License 2.0
Python
3.9–3.13
Platforms
Linux and macOS

Install

BioTSR 1.0.0 is on PyPI. In an existing Python environment:

bash
python -m pip install "biotsr==1.0.0"

Parallel batch processing is part of this standard installation: joblib, the one runtime dependency, is installed with it, so --jobs works without anything extra.

The optional plotting extra adds matplotlib, which only the clustered heat-map figure needs:

bash
python -m pip install "biotsr[plot]==1.0.0"

BioTSR supports CPython 3.9–3.13 on Linux and macOS. Windows is not supported. The commands are pinned to 1.0.0 so that what you install matches the documentation linked on this page.

Getting started sets up a virtual environment and runs a first calculation. The user guide, §1 covers installation from the GitHub tag and offline installation.

What BioTSR computes

BioTSR runs 20 TSR methods in four groups, all through one shared core for geometry, vertex ordering, binning and key encoding. Each method runs under one standard profile: the TSR science as set by the TSR Research Group.

Method familyPoints that form the trianglesMethods
Protein Cαone Cα atom per residue2
Atomic — proteinthe heavy atoms of amino-acid residues5
Atomic — ligand, carbohydrate, nucleotidethe heavy atoms of a molecule, a glycan or a strand8
Cross TSRatoms or Cα atoms on two named sides; every triangle spans both5

The modifiers described on the method pages are options of these methods, not separate programs:

  • amino-acid grouping — the Cα methods;
  • SSE annotation (SSE-TSR) — the Cα methods; it annotates triangles and changes no key;
  • mirror images — the Cα and atomic methods, not the cross methods;
  • size filtering — every method.

Not every TSR research method is part of BioTSR 1.0. The deep neural network and the feature-selection options used in the hsp70/actin comparison, for example, remain separate research code; see Earlier implementations. Each method page says whether BioTSR runs that method, and how. The capability matrix lists exactly what each method supports, and the reproducibility note gives the command for each published method that BioTSR implements.

Command line and Python

Both interfaces drive the same core. Similarity, clustering and plotting are available from Python only in 1.0.

TaskCommand linePython
Compute TSR keys, any of the 20 methodsbiotsr runbiotsr.analyze; biotsr.analyze_cross for cross methods
A dataset from a CSV manifest, in parallelbiotsr batch --jobsbiotsr.batch.run
Download PDB-format structuresbiotsr fetchbiotsr.fetch_structures
Inspect a saved resultbiotsr describebiotsr.load_result
Keys shared by a set of samplesbiotsr analyze common-keysbiotsr.analysis
Similarity measures and clustering—biotsr.analysis
The clustered heat map—biotsr.analysis.render, with the plotting extra

Documentation

All links point to the documentation released with version 1.0.0.

For a first look before the documentation, Learn BioTSR has an interactive lesson and a hands-on notebook built on one ubiquitin example.

BioTSR runs every method under one standard definition and has no option to reproduce the output files of the earlier TSR programs. Where its definition differs from an earlier program's, such as dividing angles by π rather than 3.14 or applying a contact cutoff to both sides of a cross, the method's page says how, and the known limitations, §1 give the general rule.

Questions and problems

For a reproducible bug in BioTSR, open an issue on its GitHub repository and include the command you ran and the message it printed. For questions about which method to use or what a result means, email the group.

Cite BioTSR

Please cite BioTSR and the relevant method publication(s).

Khajouie, P., Rauniyar, K., Raghavan, V. V., & Xu, W. BioTSR (version 1.0.0) [Computer software]. https://github.com/TSRMethod/BioTSR

The “Cite this repository” button on BioTSR's GitHub page gives the same reference in other formats. Each method page on this site links the paper that describes the method.

BioTSR is distributed under the Apache License 2.0, and its notices file lists the third-party code it includes. This licence covers BioTSR only; the earlier implementations and research tools each have their own terms. Licence · Notices

Technical figures

Two reference figures for BioTSR 1.0.0, drawn from its released documentation: which method supports what, and how the package is organised.

Figure: BioTSR 1.0.0 methods and capabilities
Table of the 20 BioTSR 1.0.0 methods in four families: 2 protein Cα, 5 atomic protein, 8 atomic ligand, carbohydrate and nucleotide, and 5 cross methods. For each method it marks the type of vertex (Cα or heavy atom), the scope (pooled, one calculation per residue, or two-sided cross) and which options it supports. Amino-acid grouping and SSE annotation are available for the two protein Cα methods only. Mirror images are available for all 15 Cα and atomic single-structure methods and for no cross method. Size filtering is available for all 20 methods.
Read from the capability matrix released with BioTSR 1.0.0. Open the full-size figure (SVG): Figure: BioTSR 1.0.0 methods and capabilities (opens in a new tab)
Figure: how BioTSR 1.0.0 is organised
Diagram of BioTSR 1.0.0. Inputs are PDB-format structure files, either your own or downloaded from the RCSB with biotsr fetch, and a request: one biotsr run, or a CSV manifest run by biotsr batch. The command line and the Python API both call one shared core, which reads the structure, selects points, forms candidate triangles, orders each triangle's vertices, measures it, bins the angle and the longest edge, and encodes one integer key. Modifiers apply within that core: amino-acid grouping and SSE annotation for Cα methods, mirror images for Cα and atomic methods, and size filtering for every method. Every method runs under one standard profile. Each result is written as four files and records two fingerprints, for the key space and for how triangles were drawn. Analysis offers common keys from the command line, and similarity, clustering and the heat map from Python.
Drawn for this site from BioTSR 1.0.0's released documentation. Open the full-size figure (SVG): Figure: how BioTSR 1.0.0 is organised (opens in a new tab)

Earlier implementations

The programs the TSR methods were first published with, and the separate tools written for particular papers, now have their own page under Methods & research, with each repository and its licence.

Earlier implementations