From cd859b95be7d7b42e8a573e5fe8b0a0e02b48b0e Mon Sep 17 00:00:00 2001
From: Amandine PERRIN <amandine.perrin@pasteur.fr>
Date: Wed, 4 Dec 2019 09:34:50 +0100
Subject: [PATCH] Output dir required with only-mash option

---
 PanACoTA/subcommands/prepare.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/PanACoTA/subcommands/prepare.py b/PanACoTA/subcommands/prepare.py
index ddc057da..5aebd0fe 100644
--- a/PanACoTA/subcommands/prepare.py
+++ b/PanACoTA/subcommands/prepare.py
@@ -395,10 +395,13 @@ def check_args(parser, args):
     if args.no_refseq and not args.outdir:
         parser.error("You must provide an output directory, where your results will be saved.")
 
-    # If user wants only mash steps, check that he gave info file
+    # If user wants only mash steps, check that he gave info file, and outdir
     if args.only_mash and not args.from_info:
         parser.error("If you want to run only Mash filtering steps, please give the "
                      "info file with the required information (see '--info' option)")
+    if args.only_mash and not args.outdir:
+        parser.error("If you want to run only Mash filtering steps, please give the "
+                     "output directory where you want to save your results (see '-o' option)")
 
     # Cannot be verbose and quiet at the same time
     if args.verbose > 0 and args.quiet:
-- 
GitLab