SwiftTCR is a powerful tool designed to predict bindings between T-cell receptors (TCR) and peptide-MHC complexes.
To get started with SwiftTCR, follow these steps:
To quickly install all the necessary packages, you can use the provided swifttcr_install.yml
file. Run the following commands:
conda env create -f swifttcr_install.yml
conda activate swifttcr
Use the following command to execute SwiftTCR:
python3 scripts/swift_tcr.py -r /your/input/peptide-mhc -l /your/input/tcr -o output_directory -op output_prefix -c number_of_cores -t clustering_threshold (default=9)
Example command:
python3 scripts/swift_tcr.py -r example/input/benchmark_dataset/3w0w/3w0w_pmhc_renumbered.pdb -l example/input/benchmark_dataset/3w0w/3w0w_tcr.pdb -o example/output/ -op first_test -c 6 -t 9
Because of prepare.py
, this program requires both Python 2.7 and Python 3.12.9. Follow these steps to install and configure both versions.
If you don't have Conda installed, you can download and install Miniconda or Anaconda.
Run the following command to create a new Conda environment named swifttcr
with Python 3.12.9:
conda create -n swifttcr python=3.12.9
Activate the newly created environment:
conda activate swifttcr
Install any required packages for your project within this environment. For example, if you need numpy
and pandas
, you can do so with:
conda install numpy pandas
To install Python 2.7, you can use the following commands:
Run this command to download the Python 2.7 source code:
wget https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz
Extract the downloaded tarball:
tar -xvf Python-2.7.18.tgz
Change into the newly created Python directory:
cd Python-2.7.18
Run the configure script with the --prefix
option to specify the installation directory:
./configure --prefix=$HOME/.local
Compile and install Python 2.7 with:
make
make install
To make Python 2.7 accessible from the command line, add it to your PATH by running:
echo 'export PATH=$HOME/.local/bin:$PATH' >> ~/.bashrc
Apply the changes to your current session:
source ~/.bashrc
Verify the installations by checking the versions:
python2.7 --version
python3 --version # This will point to Python 3.12.9 in the active Conda environment.
.local
directory is used as an example; you can choose a different directory if preferred.conda activate swifttcr
for Python 3.12.9 and use python2.7
for Python 2.conda deactivate