From d82d6f88c2764444dda1555e1b30da62bb58bb00 Mon Sep 17 00:00:00 2001 From: Jon Palmer Date: Thu, 2 Apr 2026 11:50:44 -0700 Subject: [PATCH 1/2] fix: improve error handling and robustness in taxonomy and API requests Agent-Id: agent-5c7f232c-bd2a-4764-9f0c-3f4058692304 --- funannotate2/predict.py | 2 +- funannotate2/utilities.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/funannotate2/predict.py b/funannotate2/predict.py index ba2e341..0a10db5 100755 --- a/funannotate2/predict.py +++ b/funannotate2/predict.py @@ -893,7 +893,7 @@ def sort_gff_line(line): ) taxonomy = params["taxonomy"] busco_tax = choose_best_busco_species( - {"superkingdom": taxonomy["superkingdom"], "kingdom": taxonomy["kingdom"]} + {"superkingdom": taxonomy.get("superkingdom"), "kingdom": taxonomy.get("kingdom")} ) # pull the latest odb version from downloads link odb_version = get_odb_version( diff --git a/funannotate2/utilities.py b/funannotate2/utilities.py index 9d4361b..e97a661 100755 --- a/funannotate2/utilities.py +++ b/funannotate2/utilities.py @@ -339,7 +339,7 @@ def lookup_taxonomy(name): try: resp = requests.get(url + name, verify=False) if 500 <= resp.status_code <= 599: - return resp.status_code + return False result = resp.json()[name] if "error" in result: return False From cedc305184caee500f0e62393ab4698f6b59a98c Mon Sep 17 00:00:00 2001 From: Jon Palmer Date: Thu, 2 Apr 2026 11:57:28 -0700 Subject: [PATCH 2/2] fix: update dbCAN database URLs to use new pro.unl.edu domain Agent-Id: agent-5c7f232c-bd2a-4764-9f0c-3f4058692304 --- funannotate2/downloads.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/funannotate2/downloads.json b/funannotate2/downloads.json index eb02c69..c4b827a 100755 --- a/funannotate2/downloads.json +++ b/funannotate2/downloads.json @@ -3,9 +3,9 @@ "uniprot": "https://ftp.ebi.ac.uk/pub/databases/uniprot/current_release/knowledgebase/complete/uniprot_sprot.fasta.gz", "uniprot-release": "https://ftp.ebi.ac.uk/pub/databases/uniprot/current_release/knowledgebase/complete/reldate.txt", "merops": "https://ftp.ebi.ac.uk/pub/databases/merops/current_release/meropsscan.lib", - "dbCAN": "http://dbcan-hcc.unl.edu/download/dbCAN-HMMdb-V14.txt", - "dbCAN-tsv": "http://dbcan-hcc.unl.edu/download/Databases/V12/CAZyDB.08062022.fam-activities.txt", - "dbCAN-log": "http://dbcan-hcc.unl.edu/download/Databases/V11/readme.txt", + "dbCAN": "https://pro.unl.edu/dbCAN2/download/Databases/V14/dbCAN-HMMdb-V14.txt", + "dbCAN-tsv": "https://pro.unl.edu/dbCAN2/download/Databases/V12/CAZyDB.08062022.fam-activities.txt", + "dbCAN-log": "https://pro.unl.edu/dbCAN2/download/Databases/V11/readme.txt", "pfam": "https://ftp.ebi.ac.uk/pub/databases/Pfam/current_release/Pfam-A.hmm.gz", "pfam-tsv": "https://ftp.ebi.ac.uk/pub/databases/Pfam/current_release/Pfam-A.clans.tsv.gz", "pfam-log": "https://ftp.ebi.ac.uk/pub/databases/Pfam/current_release/Pfam.version.gz",