You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
When running the function
get_protein_mass_mapping_with_sbml
I got the following error:KeyError: 'G8ZSL3'
at line 141 inget_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. HenceProteinAnalysis
will yield aValueError
which is handled by progressing to the next iteration of the loop. However, the dictionaryuniprot_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 intoProteinAnalysis
, 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
The text was updated successfully, but these errors were encountered: