Skip to content

Commit

Permalink
additional checks and docs improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
karolamik13 committed Nov 13, 2024
1 parent ee64b51 commit 8c19c0f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions prody/proteins/interactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3374,6 +3374,9 @@ def runFoldseek(pdb_file, chain, **kwargs):
https://github.com/steineggerlab/foldseek?tab=readme-ov-file#databasesand
This function will not work under Windows.
Example usage: runFoldseek('5kqm.pdb', 'A', database_folder='~/Downloads/foldseek/pdb')
where previous a folder called 'foldseek' were created and PDB database was uploaded using:
>>> foldseek databases PDB pdb tmp (Linux console)
:arg pdb_file: A PDB file path
:type pdb_file: str
Expand Down Expand Up @@ -3404,6 +3407,9 @@ def runFoldseek(pdb_file, chain, **kwargs):
coverage_threshold = kwargs.pop('coverage_threshold', 0.3)
tm_threshold = kwargs.pop('tm_threshold', 0.5)

if not isinstance(pdb_file, str):
raise TypeError('Please provide the name of the PDB file.')

full_path = os.path.expanduser(database_folder)
if not os.path.exists(full_path.strip('pdb')):
raise ValueError('The required database is not found in {0}. Please download it first.'.format(database_folder.strip('pdb')))
Expand Down Expand Up @@ -3682,6 +3688,8 @@ def calcSignatureInteractions(mapping_file, PDB_folder, **kwargs):
"""Analyzes protein structures to identify various interactions using InSty.
Processes data from the MSA file and folder with selected models.
Example usage: calcSignatureInteractions('shortlisted_resind.msa','./struc_homologs')
:arg mapping_file: Aligned residue indices, MSA file type
:type mapping_file: str
Expand Down

0 comments on commit 8c19c0f

Please sign in to comment.