Skip to content

Commit

Permalink
Always make output dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulthran committed Nov 27, 2024
1 parent 84c4753 commit bd1b85b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions unassigner/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,17 @@ def main(argv=None):
elif os.path.exists("unassigner_species.fasta"):
ltp_fp = "unassigner_species.fasta"
else:
if args.output_dir is None:
output_dir = os.path.splitext(args.query_fasta.name)[0] + "_unassigned"
else:
output_dir = args.output_dir

os.makedirs(args.db_dir, exist_ok=True)
ltp_fp = download_type_strain_data(output_dir=args.db_dir)

with open(ltp_fp) as f:
species_names = dict(parse_species_names(f))

if args.output_dir is None:
output_dir = os.path.splitext(args.query_fasta.name)[0] + "_unassigned"
else:
output_dir = args.output_dir

writer = OutputWriter(output_dir, species_names)

alignment_query_fp = writer.output_fp("unassigner_query.fasta")
Expand Down

0 comments on commit bd1b85b

Please sign in to comment.