Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow numbers as chainIDs/segIDs #4

Open
mtrellet opened this issue Nov 14, 2017 · 5 comments
Open

Allow numbers as chainIDs/segIDs #4

mtrellet opened this issue Nov 14, 2017 · 5 comments

Comments

@mtrellet
Copy link
Member

mtrellet commented Nov 14, 2017

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.

JoaoRodrigues added a commit that referenced this issue Nov 14, 2017
Fixed segid formatting on contact files. Addresses issue #4
@JoaoRodrigues
Copy link
Member

Solved by #5

@LilySnow
Copy link

Still have this problem.

  • BEGIN: Wed Mar 27 09:54:38 2019
  • Ignoring chains. Expect a considerable slowdown!!
  • Parsing 336 contact files
    Traceback (most recent call last):
    File "/home/abonvin/haddock_git/haddock2.4/tools/calc_fcc_matrix.py", line 142, in
    c = parse_contact_file(args, exclude_chains)
    File "/home/abonvin/haddock_git/haddock2.4/tools/calc_fcc_matrix.py", line 24, in parse_contact_file
    contacts = [ [ int(l[0:5]+l[6:-1]) for l in open(f)] for f in f_list if f.strip()]
    ValueError: invalid literal for int() with base 10: '102771510323-14'

@JoaoRodrigues JoaoRodrigues reopened this Apr 10, 2019
@JoaoRodrigues
Copy link
Member

Hi @LilySnow @amjjbonvin

Back to work, trying to figure this out. Could you provide me with an example PDB file to reproduce this issue? Please paste it as a gist (https://gist.github.com) instead of pasting it here.

@LilySnow
Copy link

@JoaoRodrigues
Copy link
Member

This seems to work properly here on my laptop. Did you update the code to the latest version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants