Skip to content

Unable to extract all REMARK lines from PDB-style .ent files #2052

Open

Description

@mikepm35

Setup

I am reporting a problem with Biopython version, Python version, and operating
system as follows:

Darwin-18.0.0-x86_64-i386-64bit
1.73

Expected behaviour

Expectation is that there is a way to extract all REMARK lines from .ent file, for example:

HEADER    SCOP/ASTRAL domain d2bgra1 [128496]     04-DEC-07   0000
REMARK  99
REMARK  99 ASTRAL ASTRAL-version: 1.73
REMARK  99 ASTRAL SCOP-sid: d2bgra1
REMARK  99 ASTRAL SCOP-sun: 128496
REMARK  99 ASTRAL SCOP-sccs: b.70.3.1
REMARK  99 ASTRAL Source-PDB: 2bgr
REMARK  99 ASTRAL Source-PDB-REVDAT: 14-APR-05
REMARK  99 ASTRAL Region: a:39-508
REMARK  99 ASTRAL ASTRAL-SPACI: 0.47
REMARK  99 ASTRAL ASTRAL-AEROSPACI: 0.47
REMARK  99 ASTRAL Data-updated-release: 1.73
ATOM      9  N   SER A  39      35.704  48.075  78.866  1.00 52.80           N  
ATOM     10  CA  SER A  39      34.927  49.308  78.912  1.00 52.32           C  
ATOM     11  C   SER A  39      35.255  50.263  77.766  1.00 51.75           C  
...

Actual behaviour

It appears that only REMARK reference lines are supported.

Steps to reproduce

  1. Download PDB-style files at http://scop.berkeley.edu/downloads/pdbstyle/pdbstyle-sel-gs-bib-40-2.07.tgz
  2. Setup parsers for d2bgra1
  3. Get headers: parser.get_header()
  4. REMARK lines not present, only:
 'head': 'scop/astral domain d2bgra1 [128496]',
 'deposition_date': '2007-12-04',
 'release_date': '1909-01-08',
 'structure_method': 'unknown',
 'resolution': 0.0,
 'structure_reference': [],
 'journal_reference': '',
 'author': '',
 'compound': {'1': {'misc': ''}},
 'source': {'1': {'misc': ''}}}

Activity

  1. jgreener64 commented on May 8, 2019

    @jgreener64
    Contributor

    It appears that resolution and missing residues are also extracted from the REMARK lines, in addition to the reference as you say:

    elif key == "REMARK":
    if re.search("REMARK 2 RESOLUTION.", hh):
    r = _chop_end_codes(re.sub("REMARK 2 RESOLUTION.", '', hh))
    r = re.sub(r"\s+ANGSTROM.*", "", r)
    try:
    dict['resolution'] = float(r)
    except ValueError:
    # print('nonstandard resolution %r' % r)
    dict['resolution'] = None
    elif hh.startswith("REMARK 465"):
    if tail:
    dict['has_missing_residues'] = True
    missing_res_info = _parse_remark_465(tail)
    if missing_res_info:
    dict['missing_residues'].append(missing_res_info)

    I guess others haven't been added because either there is no clear way to parse the information, or little demand.

    Which particular REMARK lines to you want to read in? If you want them all as free text, you could read in the lines from the file separately using Python.

  2. mikepm35 commented on May 8, 2019

    @mikepm35
    ContributorAuthor

    I liked the convenience of having the remark information in the object, so in my fork I added logic to extract the key/value pairs per the specification here: http://scop.berkeley.edu/astral/pdbstyle

    mikepm35@9adfe52

    ...
                elif hh.startswith("REMARK  99 ASTRAL"):
                    if tail:
                        remark_99_keyval = tail.replace("ASTRAL ", "").split(': ')
                        if type(remark_99_keyval)==list and len(remark_99_keyval)==2:
                            dict['astral'][remark_99_keyval[0]] = remark_99_keyval[1]
    ...
    

    Understood that this may not have broad enough utility to pull in.

  3. jgreener64 commented on May 8, 2019

    @jgreener64
    Contributor

    Nice. If you think it might be of general use there's no harm in opening a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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