Skip to content

Commit

Permalink
Clarify output dir, use tempdir for chain processing
Browse files Browse the repository at this point in the history
  • Loading branch information
Magnushhoie committed Sep 15, 2023
1 parent c049ed3 commit b23b841
Show file tree
Hide file tree
Showing 11 changed files with 219 additions and 231 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,25 @@ unzip models.zip

# Now select one of multiple options:

# Now select one of multiple options:

# 1. Predict single PDB (solved)
python discotope3/main.py --pdb_or_zip_file data/example_pdbs_solved/7c4s.pdb

# 2. Predict AlphaFold structure
python discotope3/main.py --pdb_or_zip_file data/example_pdbs_alphafold/7tdm_B.pdb --struc_type alphafold

# 3. Predict a folder of PDBs
python discotope3/main.py --pdb_dir data/example_pdbs_solved
python discotope3/main.py --pdb_dir data/example_pdbs_solved --out_dir output/example_pdbs_solved

# 4. Predict a ZIP file of PDBs
python discotope3/main.py --pdb_or_zip_file pdbs_in_zipfile.zip
python discotope3/main.py --pdb_or_zip_file pdbs_in_zipfile.zip --out_dir output/pdbs_in_zipfile

# 5. Fetch PDBs from RCSB
python discotope3/main.py --list_file pdb_list_solved.txt --struc_type solved --out_dir output/pdb_list_solved

# 5. Fetch PDB IDs from file and predict
# Nb: Fetches from RCSB if struc_type is solved and AlphaFolddb if alphafold
python discotope3/main.py --list_file pdb_list_solved.txt --struc_type solved
# 6. Fetch PDBs from Alphafolddb
python discotope3/main.py --list_file pdb_list_af2.txt --struc_type alphafold --out_dir output/pdb_list_af2
```

# DiscoTope-3.0 output
Expand Down
1 change: 1 addition & 0 deletions discotope3/esm/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from typing import List, Sequence, Tuple, Union

import torch

from discotope3.esm.constants import proteinseq_toks

RawMSA = Sequence[Tuple[str, str]]
Expand Down
3 changes: 2 additions & 1 deletion discotope3/esm/pretrained.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
from argparse import Namespace
from pathlib import Path

import discotope3.esm
import torch

import discotope3.esm


def _has_regression_weights(model_name):
"""Return whether we expect / require regression weights;
Expand Down
1 change: 1 addition & 0 deletions discotope3/esm_util_custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from biotite.structure import filter_backbone, get_chains
from biotite.structure.io import pdb, pdbx
from biotite.structure.residues import get_residues

from discotope3.esm.data import BatchConverter


Expand Down
Loading

0 comments on commit b23b841

Please sign in to comment.