This repository contains the data and code required to reproduce results or run TUnA.
$ git clone https://github.com/Wang-lab-UCSD/TUnA
$ cd TUnA
$ conda env create --file environment.yml
$ conda activate tuna
NOTE: The torch packages in environment.yml may need to be edited depending on which CUDA you are using: https://pytorch.org/get-started/previous-versions/
The embedding step may take some time.
$ python3 process_xspecies.py
$ python3 process_bernett.py
NOTE:The embedded Bernett data can be downloaded here: https://huggingface.co/yk0/TUnA_embeddings/tree/main. Please place the three folders in the data/embedded/bernett/ directory.
$ python3 main.py
Hyperparameters and other options can be controlled using the config.yaml file. Please make sure the directories to the train/val/test dictionary and interaction files are correct. Every epoch, the performance on the validation set will be logged in output/results.txt
NOTE: You need to specify your cuda device in config.yaml. Please edit the config file so that you are using the cuda device available in your setup.
First, download the pretrained models you wish from: https://huggingface.co/datasets/yk0/TUnA_data/tree/main. Then, place the model file in the results/dataset/model/output directory. For example: place the bernett-TUnA model in the results/bernett/TUnA/output
Then to evaluate either the re-trained or pre-trained models on the test sets:
$ cd results/bernett/TUnA # navigate to the model you wish to use. The pretrained model needs to be placed in output/
$ python3 inference.py