Skip to content

Commit b59e01e

Browse files
authored
Merge pull request #48 from edgeemer/patch-1
Fix taxonomy check for kingdom in training script Address missing kingdom and TypeError related to non-searchable NCBI species names by safely accessing the taxonomy dictionary.
2 parents 807e571 + 40a6c14 commit b59e01e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

funannotate2/train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ def train(args):
350350
if which_path("gmes_petap.pl") and which_path("gmhmme3"):
351351
logger.info(f"Training GeneMark-ES using {args.genemark_mode} mode")
352352
fungus_flag = False
353-
if taxonomy["kingdom"] == "Fungi":
353+
if taxonomy and taxonomy.get("kingdom") == "Fungi":
354354
fungus_flag = True
355355
genemark_train = train_genemark(
356356
TrainingGenomeFasta,

0 commit comments

Comments
 (0)