Skip to content
Snippets Groups Projects
Commit 895fb9cf authored by Amandine  PERRIN's avatar Amandine PERRIN
Browse files

Test if output dir exists

parent a7637709
No related branches found
No related tags found
No related merge requests found
...@@ -410,6 +410,10 @@ def write_outputfiles(genomes, sorted_genomes, genomes_removed, outdir, gspecies ...@@ -410,6 +410,10 @@ def write_outputfiles(genomes, sorted_genomes, genomes_removed, outdir, gspecies
------- -------
return code return code
""" """
if not os.path.isdir(outdir):
logger.error(f"The given output directory ({outdir}) does not exist. We cannot "
"create output files there")
sys.exit(1)
list_file = os.path.join(outdir, f"LSTINFO-{gspecies}-filtered-{min_dist}.txt") list_file = os.path.join(outdir, f"LSTINFO-{gspecies}-filtered-{min_dist}.txt")
kept_genomes = [] kept_genomes = []
discard_file = os.path.join(outdir, f"discarded-by-minhash-{gspecies}-{min_dist}.txt") discard_file = os.path.join(outdir, f"discarded-by-minhash-{gspecies}-{min_dist}.txt")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment