Skip to content

Missing key error when parsing PDB entry 7O07 #2174

@sforli

Description

@sforli

Description of the bug.

The PDB entry 7Oo7 cannot be parsed because an exception is raised.

Do you have any error messages or logs?

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/entropia/dev/ProDy/prody/proteins/ciffile.py", line 133, in parseMMCIF
    result = parseMMCIFStream(cif, chain=chain, segment=segment, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/entropia/dev/ProDy/prody/proteins/ciffile.py", line 238, in parseMMCIFStream
    hd = getCIFHeaderDict(lines)
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/entropia/dev/ProDy/prody/proteins/cifheader.py", line 172, in getCIFHeaderDict
    value = func(lines)
            ^^^^^^^^^^^
  File "/home/entropia/dev/ProDy/prody/proteins/cifheader.py", line 1331, in _getUnobservedSeq
    unobs_seqs[chid] += AAMAP[item['_pdbx_unobs_or_zero_occ_residues.auth_comp_id']]
                        ~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'ACE'

What is your setup?

Linux Debian 13, micromamba, Python 3.12.11, numpy 2.0.2

How did you install ProDy?

GitHub commit 068d26543

What did your code look like?

import prody
prody.parseMMCIF("7O07")

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions