Package: pyscomotif
pyScoMotif: Discovery of similar 3D structural motifs across proteinsDescriptionpyScoMotif is a Python package that enables the rapid search of similar 3D structural motifs across large sets of proteins. Concretely, given a reference set of residues in a PDB file, it will find other protein structures with the same set of residues that are in a similar geometrical arragement.Typical use cases include the search of catalytic and binding sites.Reference publication: "pyScoMotif: Discovery of similar 3D structural motifs across proteins". Gabriel Cia, Jean Kwasigroch, Basile Stamatopoulos, Marianne Rooman, Fabrizio Pucci. DOI:https://doi.org/10.1093/bioadv/vbad158LICENSE: pyScoMotif is free to use for non-commercial purposes. To use pyScoMotif for commercial purposes, please contact us.InstallNote that a Python version >= 3.9 is required.To install pyScoMotif, simply run:pip install pyscomotifIf the install was successful, you should be able to type and runpyscomotifin your terminal.Dependencies are listed in thepyproject.tomlfile.TutorialThis tutorial shows how to use pyScoMotif, as well as some more advanced options such asmutated motifs and position specific exchanges. A detailed explanation of each parameter available for the different commands can be displayed by typingpyscomotif <command name> --help.Note that pyScoMotif's speed is highly dependant on the computer/cluster hardware, and therefore timings could be different than those reported in our publication.Pre-built indexesTo use pyScoMotif to search for similar motifs, we first need an index of the set of PDB files on which we want to perform the search. Given indexing large sets of PDB files such as the entire Protein Data Bank or AlphaFold2 (AF2) proteomes can take some time, pre-built indexes are available for download for the entire PDB, the AF2 global health proteomes and the AF2 human proteome athttp://babylone.ulb.ac.be/pyScoMotif/data/.Creating an indexIf our pre-built indexes don't cover the PDBs you are interested in, then you will have to build an index yourself (don't panic, it's easy !). For that, we use thecreate-indexcommand, which has 2 mandatory parameters:The full path of the directory that contains our PDB files, which is given as the final argument of the command.The file extension pattern of the PDB files, which can be specified with the--patternoption.Additionaly, we can specify the path of the directory that will contain all the index files through the--index_pathoption, and we can also parallelize the indexing through the--n_coresoption.Suppose we have downloaded the human proteome dataset fromAlphaFoldDB, our command would bepyscomotif create-index --pattern=*.pdb.gz --n_cores=6 /home/user/Downloads/UP000005640_9606_HUMAN_v3To update an index with new PDB files, see thepyscomotif update-index --helpcommand.Searching for similar motifsOnce we have the index of our set of PDB structures, we can perform the similar motif search.We will showcase the search of theserine protease catalytic site, which is a 3 residue motif (His-Asp-Ser) that catalyzes the proteolyses of peptide bonds.
For that, we use themotif-searchcommand, which has 3 mandatory parameters:The full path of the index directory, which by default is created inside our database folder and is named 'pyScoMotif_index'.The path of the PDB file that contains our motif of interest.The list of residue identifiers of our motif.Additionally, we can control the distance and angle tolerance values when searching for similar pairs of residues through the--distance_delta_thrand--angle_delta_throptions, and can also control the maximum RMSD of the hits returned by pyScoMotif through the--RMSD_thresholdoption. Search can also be parallelized through the--n_coresoption. Finally, we can specify the path of the output csv file that will contain the results through the--results_output_pathoption.Here we use PDB 1pq5 and residues A56, A99 and A195 as our reference motif, so our search command would bepyscomotif motif-search --results_output_path=/home/user/Downloads/serine_protease_pyScoMotif_result.csv --n_cores=6 /home/user/Downloads/UP000005640_9606_HUMAN_v3/pyScoMotif_index /home/user/Downloads/1pq5.pdb A56 A99 A195This generates the following output table (first 5 results only)matched_motifsimilar_motif_foundRMSDn_mutationsPDB_IDheader_description0A56H A99D A195SA225H A270D A366S0.1290AF-Q86T26-F1-model_v3alphafold monomer v2.0 prediction for transmembrane protease serine 11b (q86t26)1A56H A99D A195SA74H A122D A218S0.1340AF-Q6UWY2-F1-model_v3alphafold monomer v2.0 prediction for serine protease 57 (q6uwy2)2A56H A99D A195SA70H A112D A205S0.1440AF-P49862-F1-model_v3alphafold monomer v2.0 prediction for kallikrein-7 (p49862)3A56H A99D A195SA357H A406D A513S0.1440AF-P00750-F1-model_v3alphafold monomer v2.0 prediction for tissue-type plasminogen activator (p00750)4A56H A99D A195SA70H A117D A202S0.1490AF-P08246-F1-model_v3alphafold monomer v2.0 prediction for neutrophil elastase (p08246)matched_motif: Reference motif residue IDs that were matched.similar_motif_found: Residue IDs of the similar motif that was found.RMSD: Root Mean Square Deviation between the reference and similar motif found.n_mutations: Number of mutated residues relative to the original reference motif.PDB_ID: PDB ID that contains the similar motif that was found.header_description: Text description of the PDB file that contains the similar motif found.Searching for similar motifs with potential mutationsThe serine protease catalytic site example is simple in the sense that we only want to find PDB structures with motifs that exactly match the residue types of the reference motif (i.e Histidine, Aspartate and Serine). But in some cases the constraints may be more relaxed for certain residues, in which case one needs to also search for mutated versions of the motif. pyScoMotif'smotif-searchcommand comes with this capability built-in.In this section we showcase the search of thealcohol dehydrogenasecatalytic site, which can tolerate different mutations at different positions.There are two options that control the search for mutated versions of a reference motif:The--residue_type_policyoption, for which there are 4 possibilities:"strict" (default): no mutations allowed, only search for motifs that have exactly the same residue types as the reference motif."relaxed": residues can mutate according to their residue type group, which are: non-polar (GAVLI), polar (STPNQ), sulfur (MC), positives (KRH), negatives (DE), aromatic (FYW)."fully_relaxed": residues can be mutated to any of the other 19 possible residues.A custom position specific exchange in JSON format. This allows complete control over the possible mutations of each residue. The format takes residue IDs as keys and a string of possible mutations as values (e.g: '{"A1":"KR", "A2":"YW", "A5":"D"}'. Note the use of single and double quotes).The--max_n_mutated_residuesoption, which controls the maximum number of combinations of mutations that should be allowed when generating mutated motifs. This option can be very useful if you want to search for similar motifs carrying multiple mutations. It is set to 1 by default.Here we use PDB 1hso and residues A46, A48, A51, A67 and A174 as our reference motif, and take advantage of the fully_relaxed option to search for all the possible mutated versions carrying 1 mutation, so our search command would be:pyscomotif motif-search --residue_type_policy=fully_relaxed --results_output_path=/home/user/Downloads/alcohol_dehydrogenase_pyScoMotif_result.csv --n_cores=6 /home/user/Downloads/UP000005640_9606_HUMAN_v3/pyScoMotif_index /home/user/Downloads/1hso.pdb A46 A48 A51 A67 A174