-
Notifications
You must be signed in to change notification settings - Fork 0
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
ValueError in notebooks/proteomics_data_relaxations.ipynb cell 17 line 1. #1
ValueError in notebooks/proteomics_data_relaxations.ipynb cell 17 line 1. #1
Comments
Hi! Thank you for opening this issue. Unfortunately, I cannot reproduce this. I have set up a fresh virtual environment (python3.10), installed latest master from geckopy, pip install git+https://github.com/ginkgobioworks/geckopy.git cloned this repository and run the notebook. The molecular weights are properly fetched as they were.
The molecular weights are fetched from uniprot, using the Possible solutions to your problem:
Let me know if there is any progress! |
Wait, I was on the wrong commit, I can reproduce this now. The reason I don't get the error with an earlier commit is because the MW fallback was removed for some reason, I have open a pull request for this on upstream geckopy. Installing geckopy from the branch should work now pip install git+https://github.com/ginkgobioworks/geckopy.git@fix-re-mw-fallback
# cobrapy may cause some issues, so it is safer to downgrade it
pip install --upgrade "cobra==0.22.1" Thanks for spotting this! |
Hello.
I got a ValueError in notebooks/proteomics_data_relaxations.ipynb cell 17 line 1.
I checked excel file that there are not MW row in msb20209536-sup-0010-datasetev9.xlsx sheet 'EV9-AbsoluteMassFractions-2'.
Perhaps, it is lack of data about MW.
Could you tell me about error below.
Best regards.
ValueError Traceback (most recent call last)
/Users/userName/geckopy/simult_supp_material/notebooks/proteomics_data_relaxations.ipynb セル 17 line 1
----> 1 ev9_valid["MW"] = extract_proteins(None, prot_dict)["MW"]
File ~/.pyenv/versions/3.8.18/envs/geckopy/lib/python3.8/site-packages/geckopy/experimental/molecular_weights.py:194, in extract_proteins(model, all_proteins, key_fn)
192 df_prot["MW"] = 0
193 for index, row in df_prot.iterrows():
--> 194 df_prot.loc[index, "MW"] = _molecular_weight(row["Sequence"])
195 return df_prot[["uniprot", "protein_id", "MW", "Sequence"]]
File ~/.pyenv/versions/3.8.18/envs/geckopy/lib/python3.8/site-packages/geckopy/experimental/molecular_weights.py:95, in _molecular_weight(seq)
93 weight = sum(weight_table[x] for x in seq) - (len(seq) - 1) * water
94 except KeyError as e:
---> 95 raise ValueError(
96 f"'{e}' is not a valid unambiguous letter for proteins"
97 ) from None
99 return weight
ValueError: ''X'' is not a valid unambiguous letter for proteins
The text was updated successfully, but these errors were encountered: