Skip to content

Tutorial 1 Input generation

LucaChiesa edited this page Feb 8, 2024 · 3 revisions

Introduction

LIT-AlphaFold was built on top of AlphaPulldown which uses .pkl files to contain the monomer inputs for structure prediction.

In this tutorial you will learn how to generate monomer files, and how to set the basic parameters for input generation. Tutorial 2 will cover more complex input generation parameters.

To perform input generation, regardless of the method, it is necessary to give LIT-AlphaFold the sequences of the target proteins in a .fasta file. For this tutorial the sequences are in the input_sequences.fasta file.

>CXCR4
MEGISIYTSDNYTEEMGSGDYDSMKEPCFREENANFNKIFLPTIYSIIFLTGIVGNGLVILVMGYQKKLRSMTDKYRLHLSVADLLFVITLPFWAVDAVANWYFGNFLCKAVHVIYTVNLYSSVLILAFISLDRYLAIVHATNSQRPRKLLAEKVVYVGVWIPALLLTIPDFIFANVSEADDRYICDRFYPNDLWVVVFQFQHIMVGLILPGIVILSCYCIIISKLSHSKGHQKRKALKTTVILILAFFACWLPYYIGISIDSFILLEIIKQGCEFENTVHKWISITEALAFFHCCLNPILYAFLGAKFKTSAQHALTSVSRGSSLKILSKGKRGGHSSVSTESESSSFHSS

>CXCL12
KPVSLSYRCPCRFFESHVARANVKHLKILNTPNCALQIVARLKNNNRQVCIDPKLKWIQEYLEKALNK

NOTE: The lines starting with > are the descriptions of the sequence and are used to name the output files (CXCR4.pkl and CXCL12.pkl in this case). If the description contains spaces these will be automatically replaced by _ to guarantee the correct functioning of the program.

Three different use cases are considered:

  1. Input generation using local databases
  2. Input generation using the MMSeqs2 webserver
  3. Input generation using the MMseqs2 webserver for MSA and a local database for templates

NOTE: Generationg monomer files using local databases might require multiple hours, while using the MMseqs2 webserver requires few minutes. Take these time constrains into account while following these tutorials.

NOTE: While using the MMseqs2 webserver is considerably faster than local search, it is a public resource with a limited number of slots per day. In case you need to perform large calculations on multiple targets we ask you to use a local database, or to spread your requests over multiple days.

Script parameters

Inputs files are generated by the script create_individual_features.py. Regardelss of the searched database certain arguments of the function are common to all methods.

python $LITAF/create_individual_features.py \
--fasta_paths=input_sequences.fasta \
--data_dir=$AFDATA \
--save_msa_files=True \
--output_dir=protein_features_local \
--use_precomputed_msas=True \
--max_template_date='2050-01-01' \
--skip_existing=True \

Arguments:

  • fasta_paths, file or files containing the sequences to search in the databases.
  • data_dir, direcotry containing the AF databases and models' weights.
  • save_msa_files, save the files generated by the search.
  • output_dir, directory where to save the search results.
  • use_precomputed_msa, if available use results from a previous search.
  • max_template_date, maximum publication date for the considered templates, it is written in YYYY-MM-DD format.
  • skip_existing, if an object with the same name already exists do not perform calculations.

Input generation using local databases

python $LITAF/create_individual_features.py \
--fasta_paths=input_sequences.fasta \
--data_dir=$AFDATA \
--save_msa_files=True \
--output_dir=protein_features_local \
--use_precomputed_msas=True \
--max_template_date='2050-01-01' \
--skip_existing=True \
--paired_msa=True \
--db_preset='full_dbs'

Local database search arguments:

  • paired_msa, perform search in the unclustered Uniprot database, this is necessary only for multimer predictions, it can be skipped for calculations with only monomers or homooligomers
  • db_preset, use the entire big fantastic database (bfd) or its small version (small_bfd) for predictions.

NOTE: For monomer predictions the bfd is the larget searched database. Please test the largest sequence length your machine can handle before launching multiple searches. Using small_bfd singificantly reduces the memory requirements.

Input generation using the MMseqs2 webserver

This is the method used by ColabFold. The search is performed using only the MMseqs2 webserver, leading to faster results. Important, the results of the search using MMseqs2 are different from the ones obtained using the default local databases.

python $LITAF/create_individual_features.py \
--fasta_paths=input_sequences.fasta \
--save_msa_files=True \
--output_dir=protein_features_mmseqs2 \
--use_precomputed_msas=True \
--max_template_date='2050-01-01' \
--use_mmseqs2=True \
--use_mmseqs2_templates=True \
--skip_existing=True \

MMseqs2 arguments:

  • use_mmseqs2, use MMseqs2 for MSA search
  • use_mmseqs2_templates, use MMseqs2 for template search

Input generation using the MMseqs2 webserver for MSA and the local template database

This is the method originally used by AlphaPulldown when using the MMseqs2 server. The MSA is computed using the MMseqs2 server, while the template serach is performed in the default local template database.

python $LITAF/create_individual_features.py \
--fasta_paths=input_sequences.fasta \
--data_dir=$AFDATA \
--save_msa_files=True \
--output_dir=test_features_mmseqs2_local \
--use_precomputed_msas=True \
--max_template_date='2050-01-01' \
--use_mmseqs2=True \
--skip_existing=True \

Conclusion

In this tutorial you have learned how to generate inputs using LIT-AF using local database and the MMseqs2 server.

Clone this wiki locally