Skip to main content

TCR geometry calculation and visualization tools

Project description

Extra dependencies

For TCR numbering, ANARCI must be installed via bioconda:

conda install -c bioconda anarci

For visualization, PyMOL must be installed via bioconda:

conda install conda-forge::pymol-open-source

Set up environment

The file environment.yml specifies the dependencies required to run the TRangle package. You can create a conda environment using this file:

conda env create -f environment.yml

In the main project directory run

pip install -e .

Measure angles of existing TCR structures

To measure angles in existing TCR structures, you can use the new_calc.py script provided in the TRangle package. This script allows you to calculate angles and distances in a TCR structure file.

python trangle/calc_geometry.py --input_pdb path/to/your/input.pdb

This will output a CSV file with the measured angles and distances. It will also output a PDB of the extracted variable domain, was well as a visualiseation of the measured angles and distance saved as an image and a .pse file which can be opened in PyMOL.

Measure angles of existing TCR trajectories

To measure angles in existing TCR trajectories, you can use the new_calc_MD.py script provided in the TRangle package. This script allows you to calculate angles and distances in a TCR trajectory file.

python trangle/calc_geometry_MD.py --input_pdb path/to/your/input.pdb --input_md path/to/your/input.traj

Change geometry of a TCR structure

To change the geometry of a TCR structure, you can use the change_geometry.py script provided in the TRangle package. This script allows you to modify angles and distances in a TCR structure based on a configuration file.

python trangle/change_geometry.py --input_pdb path/to/your/input.pdb --BA 113.22 --BC1 98.75 --BC2 9.35 --AC1 71.58 --AC2 154.62 --dc 23.98

This script will read the configuration file, apply the specified changes to the angles and distances, and output a new PDB file with the modified geometry. It will also generate a visualization of the modified structure for inspection.

Extract loop anchor residue coordinates

To extract the coordinates of loop anchor residues from a TCR structure, you can use the extract_loop_anchor.py script provided in the TRangle package. This script allows you to specify the loop anchor residues and extract their coordinates from a TCR structure file.

python trangle/get_anchor_coords.py path/to/your/input.pdb

This will output a CSV file containing the coordinates of the specified loop anchor residues, which can be used for input to the CDR loop diffusion model.

Dataset: From STCRDB get non-redundant abTCR set of IMGT-numbered structures (resolution cutoff 3.0, sequence identity cutoff 70%)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tcrgeometry-0.1.0.tar.gz (707.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tcrgeometry-0.1.0-py3-none-any.whl (709.0 kB view details)

Uploaded Python 3

File details

Details for the file tcrgeometry-0.1.0.tar.gz.

File metadata

  • Download URL: tcrgeometry-0.1.0.tar.gz
  • Upload date:
  • Size: 707.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for tcrgeometry-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e898b14f58ee170f8798002b77382a061ea86dd9ff6bf8a75b659a3a8d93dc0d
MD5 8258e97953c413cbde1e90d75a69b79e
BLAKE2b-256 d7ed2d21ae2d0e8774206535f8f9f0fd4ada1178f18c9cd09d16ef25cd67d6c0

See more details on using hashes here.

File details

Details for the file tcrgeometry-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: tcrgeometry-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 709.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for tcrgeometry-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2489c8211325f0fb217d567328abb1156228b1b72d431f2caaae4f04738c3a22
MD5 d96d489ee0d25dc7d5baf1628c3c2b03
BLAKE2b-256 ca03aff9694eff08e36537a7b762e3d6e3cf95cb3f4da4b17716498ce6bf6efa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page