Skip to content

Commit

Permalink
more verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
rvosa committed Aug 17, 2024
1 parent ae77ec9 commit c537cd0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions barcode_validator/taxonomy.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ def collect_lineages(taxids, tree):
logging.debug(f'Found tip {tip.name} with taxid {taxid}')
logging.info(f'Found {len(tips)} tips for {len(taxids)} in the tree')
for tip in tips:
lineage = []
lineage = set()
for node in tree.root.get_path(tip):
logging.debug(f'Traversing {node} from lineage {tip}')
if node.taxonomic_rank == str(config.get('level')).lower():
lineage.append(node.name)
lineage.update(node.name)
logging.info(f'Found ancestor {node} for {tip.name}')
lineages.append(lineage)
logging.info(f'Collected {len(lineages)} lineages')
return lineages
logging.info(f'Collected {len(lineages)} distinct lineages')
return list(lineages)


def run_blast(sequence):
Expand Down
2 changes: 1 addition & 1 deletion config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ncbi_taxonomy: /home/rutger.vos/data/ncbi/taxdump/taxdump.tar.gz

# Configuration for logging. The verbosity level specified here is overridden by the value provided on the command
# line with the -v/-verbosity argument. The log file is written to the current working directory.
log_level: INFO
log_level: DEBUG
log_file: ../log_file.log

# Which translation table is used. This value is an integer that corresponds to the tables used by NCBI and parsed
Expand Down

0 comments on commit c537cd0

Please sign in to comment.