sokrypton / sokrypton/ColabFold

Error in Local Template Search

Open
#610 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
2.9k
Forks
747
PR merge metrics
No merged PRs in 30d

Description

We deployed a local pdb database and try to use it as following cmd:

colabfold_batch --num-models 5 \
                --num-recycle 30 \
                --data /ssd/home/xxxx/models/colabfold/af2   \
                --recycle-early-stop-tolerance 0.1 \
                --model-type alphafold2_multimer_v1  \
                --save-recycles \
                --random-seed 5 \
                --num-seeds 1 \
                --max-msa 256:512 \
                --templates \
                --pdb-hit-file seq_8919_pdb100_230517.m8 \
                --local-pdb-path /ssd/home/xxx/database/colabfold/pdb/divided \
                seq_8919.a3m \
                seq_8919_output

Expected Behavior

Finish colabfold batch and get result.

Current Behavior

Following error raised due to read some pdbs failed (4udf, 1ejg, etc), I think colabfold could ignore these pdbs by catching exception

Traceback (most recent call last):
  File "/ssd/home/scw6byf/software/colabfold/1.5.5/bin/colabfold_batch", line 8, in <module>
    sys.exit(main())
  File "/ssd/home/scw6byf/software/colabfold/1.5.5/lib/python3.10/site-packages/colabfold/batch.py", line 2035, in main
    run(
  File "/ssd/home/scw6byf/software/colabfold/1.5.5/lib/python3.10/site-packages/colabfold/batch.py", line 1412, in run
    mk_hhsearch_db(custom_template_path)
  File "/ssd/home/scw6byf/software/colabfold/1.5.5/lib/python3.10/site-packages/colabfold/batch.py", line 240, in mk_hhsearch_db
    structure = parser.get_structure("none", cif_fh)
  File "/ssd/home/scw6byf/software/colabfold/1.5.5/lib/python3.10/site-packages/Bio/PDB/MMCIFParser.py", line 62, in get_structure
    self._build_structure(structure_id)
  File "/ssd/home/scw6byf/software/colabfold/1.5.5/lib/python3.10/site-packages/Bio/PDB/MMCIFParser.py", line 265, in _build_structure
    structure_builder.init_atom(
  File "/ssd/home/scw6byf/software/colabfold/1.5.5/lib/python3.10/site-packages/Bio/PDB/StructureBuilder.py", line 289, in init_atom
    residue.add(self.atom)
  File "/ssd/home/scw6byf/software/colabfold/1.5.5/lib/python3.10/site-packages/Bio/PDB/Residue.py", line 48, in add
    raise PDBConstructionException(
Bio.PDB.PDBExceptions.PDBConstructionException: Atom C defined twice in residue <Residue LYS het=  resseq=91 icode= >

Your Environment

Include as many relevant details about the environment you experienced the bug in.

  • python 3.8
  • colabfold 1.5.5
  • CentOS 7.9
  • pdb 20240314

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with colabfold/batch.py at mk_hhsearch_db, around line 240, and inspect the Bio.PDB parser call shown in the traceback. Run the supplied colabfold_batch command against the local PDB database; done means malformed structures such as 4udf and 1ejg are skipped and the batch completes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
bioinformatics, cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.