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

Amino acids ambiguties are not handled correctly #9

Closed
yaccos opened this issue Nov 13, 2020 · 1 comment
Closed

Amino acids ambiguties are not handled correctly #9

yaccos opened this issue Nov 13, 2020 · 1 comment

Comments

@yaccos
Copy link
Contributor

yaccos commented Nov 13, 2020

When running the function get_protein_mass_mapping_with_sbml I got the following error: KeyError: 'G8ZSL3' at line 141 in get_protein_mass_mapping.py. The key error does not trigger on all queries, but it does on the query with UniProt ID G8ZSL3. After a manual query (https://www.uniprot.org/uniprot/?query=G8ZSL3&format=tab&columns=id,sequence,mass), we see that this accession ID is valid, but has two amino acids ambiguties. Hence ProteinAnalysis will yield a ValueError which is handled by progressing to the next iteration of the loop. However, the dictionary uniprot_id_protein_mass_mapping does not get updated with the key 'G8ZSL3', which triggers the error when trying to access the entry later. I suggest you instead implement the solution I suggested in #8 (comment), because even though two amino acids are ambigous, UniProt can still find a reasonable protein mass. Alternatively, you could replace the ambigous amino acids from the string before feeding it into ProteinAnalysis, which will still give a good esimate as ambigious amino acids consititue only small fractions of proteins.
https://github.com/ARB-Lab/autopacmen/blob/69a158003d5bab3f597ec5da727515d250f35a43/autopacmen/submodules/get_protein_mass_mapping.py#L133

@Paulocracy
Copy link
Member

As described in my comment in #8, I just merged your proposed solution into the master branch, which should fix this issue.

@yaccos yaccos closed this as completed Nov 23, 2020
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