Skip to main content

TCR geometry calculation and visualization tools

Project description

Installation

This package can be installed via

pip install tcrgeometry

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

Alternatively you can also set up this environment:

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.

trangle-calc --input_pdb file.pdb --out_path ./out

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.

trangle-calc-md --input_pdb file.pdb --input_md trajectory.traj --out_path ./out/MD_test

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.

trangle-change --input file.pdb --out_path ./out --BA 113 --BC1 98.7 --BC2 9.3 --AC1 71.5 --AC2 154 --dc 24

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.

trangle-extract 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.1.tar.gz (707.1 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.1-py3-none-any.whl (709.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tcrgeometry-0.1.1.tar.gz
  • Upload date:
  • Size: 707.1 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.1.tar.gz
Algorithm Hash digest
SHA256 9bee71c121b0372b8a4ebc5580bf6d6de9c79ecbf607573e688372fcd6eb0bad
MD5 f9a4ce0e9c5c8bfaa15424a4b344a07b
BLAKE2b-256 b1c1224fec7f598b5fd78df3ce755bad1dde2b0327be6eb3046ad83ec494fc67

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tcrgeometry-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c505cb9bd178e38d9997bb18595a4f5e8e72f7805b6ae91397e2f3be1da9c343
MD5 872cfbae0aab8f856c9916b23e1a0fac
BLAKE2b-256 2c452aeeb18733c76074d60903ef7dc9f5b5ed14c15c1cb3c493625ecdc7ebc6

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