Skip to content
Snippets Groups Projects
Commit 97ea50bf authored by B13nch3n's avatar B13nch3n
Browse files

Updated UniProtKB API

parent d96fc204
No related branches found
No related tags found
No related merge requests found
......@@ -572,7 +572,7 @@ def _fetch_upkb_entry(up_ac):
data["up_sequence"] = ""
data["up_ac"] = up_ac
rspns = requests.get(
f"https://www.uniprot.org/uniprot/{up_ac}.txt", timeout=180
f"https://rest.uniprot.org/uniprotkb/{up_ac}.txt", timeout=180
)
for line in rspns.iter_lines(decode_unicode=True):
if line.startswith("ID "):
......@@ -654,7 +654,7 @@ def _get_upkb_for_sequence(sqe, up_ac):
if sqe != up_data["up_sequence"]:
raise RuntimeError(
f"Sequences not equal from file: {sqe}, from UniProtKB: "
+ f"{up_data['up_sequence']}"
+ f"{up_data['up_sequence']} ({up_ac})"
)
return up_data
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment