Skip to content

Commit

Permalink
Log the file taxonomy is loaded from (#386)
Browse files Browse the repository at this point in the history
This is generally useful, and in particular helps with a current CI issue where
the wrong file is seemingly loaded in CI
  • Loading branch information
jakobnissen authored Jan 9, 2025
1 parent a0c1a2a commit 8fa3280
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions vamb/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1558,12 +1558,12 @@ def run_vaevae(opt: BinTaxVambOptions):
)
contig_taxonomies = predicted_contig_taxonomies.to_taxonomy()
elif isinstance(opt.taxonomy, RefinedTaxonomy):
logger.info("Loading already-refined taxonomy from file")
logger.info(f'Loading already-refined taxonomy from file "{opt.taxonomy.path}"')
contig_taxonomies = vamb.taxonomy.Taxonomy.from_refined_file(
opt.taxonomy.path, composition.metadata, False
)
else:
logger.info("Loading unrefined taxonomy from file")
logger.info(f'Loading unrefined taxonomy from file "{opt.taxonomy.path}"')
contig_taxonomies = vamb.taxonomy.Taxonomy.from_file(
opt.taxonomy.path, composition.metadata, False
)
Expand Down Expand Up @@ -1697,12 +1697,15 @@ def run_reclustering(opt: ReclusteringOptions):
)
taxonomy = predicted_tax.to_taxonomy()
else:
logger.info(f'Loading taxonomy from file "{alg.taxonomy.path}"')
if isinstance(alg.taxonomy, UnrefinedTaxonomy):
logger.info(
f'Loading unrefined taxonomy from file "{alg.taxonomy.path}"'
)
taxonomy = vamb.taxonomy.Taxonomy.from_file(
alg.taxonomy.path, composition.metadata, True
)
else:
logger.info(f'Loading refined taxonomy from file "{alg.taxonomy.path}"')
taxonomy = vamb.taxonomy.Taxonomy.from_refined_file(
alg.taxonomy.path, composition.metadata, True
)
Expand Down

0 comments on commit 8fa3280

Please sign in to comment.