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

Error occurred while constructing edges from pdb files #387

Open
Runinthenight opened this issue Apr 19, 2024 · 1 comment
Open

Error occurred while constructing edges from pdb files #387

Runinthenight opened this issue Apr 19, 2024 · 1 comment

Comments

@Runinthenight
Copy link

Runinthenight commented Apr 19, 2024

The bug information provided is as follows, what can I do to overcome it? Please help me,Thank you

  File "protein_pretrain.py", line 60, in protein_graph
    g = construct_graph(config=config, path=str(protein_path)+str(pdb_ID)+".pdb")
  File "anaconda3/envs/torch2.0/lib/python3.9/site-packages/graphein/protein/graphs.py", line 833, in construct_graph
    g = initialise_graph_with_metadata(
  File "anaconda3/envs/torch2.0/lib/python3.9/site-packages/graphein/protein/graphs.py", line 565, in initialise_graph_with_metadata
    protein_df.loc[protein_df["chain_id"] == c]["residue_name"]
  File "anaconda3/envs/torch2.0/lib/python3.9/site-packages/pandas/core/series.py", line 4771, in apply
    return SeriesApply(self, func, convert_dtype, args, kwargs).apply()
  File "anaconda3/envs/torch2.0/lib/python3.9/site-packages/pandas/core/apply.py", line 1123, in apply
    return self.apply_standard()
  File "anaconda3/envs/torch2.0/lib/python3.9/site-packages/pandas/core/apply.py", line 1174, in apply_standard
    mapped = lib.map_infer(
  File "pandas/_libs/lib.pyx", line 2924, in pandas._libs.lib.map_infer
  File "anaconda3/envs/torch2.0/lib/python3.9/site-packages/graphein/protein/utils.py", line 379, in three_to_one_with_mods
    return RESI_THREE_TO_1[res]
KeyError: 'AYA'
@a-r-j
Copy link
Owner

a-r-j commented Apr 19, 2024

Hi, thanks for raising this.

It looks like 'AYA' is a modified residue we've not included. You can modify RESI_THREE_TO_1

RESI_THREE_TO_1: Dict[str, str] = {
to include: "AYA": "A"

a-r-j pushed a commit that referenced this issue Apr 23, 2024
@a-r-j a-r-j mentioned this issue Apr 23, 2024
5 tasks
a-r-j added a commit that referenced this issue Aug 3, 2024
* add AYA to constants #387

* bump changelog

* reset index after handling altlocs #384

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: Arian Jamasb <arian.jamasb@roche.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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

2 participants