Skip to content

Allow numbers as chainIDs/segIDs #4

@mtrellet

Description

@mtrellet

When a PDB has numbers instead of characters as chainIDs and/or segIDs, calc_fcc_matrix returns the following error:

1 + BEGIN: Mon Nov 13 01:18:23 2017
2 + Parsing 202 contact files
3 Traceback (most recent call last):
4   File "/home/enmr/services-enmr/HADDOCK2.2/server/run/userrun002472/run1/tools/calc_fcc_matrix.py", line 142, in ?
5     c = parse_contact_file(args, exclude_chains)
6   File "/home/enmr/services-enmr/HADDOCK2.2/server/run/userrun002472/run1/tools/calc_fcc_matrix.py", line 26, in parse_contact_file
7     contacts = [ set([ int(l) for l in open(f)]) for f in f_list if f.strip()]
8 ValueError: invalid literal for int(): 10087-1510438-14

This is due to a wrong output of the contacts by make_contacts:

10242-1510309-14
10242-1510310-14
10244-1510308-14

Switching back to alphabetical characters in the PDB solves the problem. However, numbers are allowed in the official PDB format.

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