From 1931635df74fe6ba66154165bb39a570b2dbf0cb Mon Sep 17 00:00:00 2001 From: Jon Palmer Date: Mon, 29 Jul 2019 21:28:56 -0700 Subject: [PATCH] fix parsing for outputdir --- bin/funannotate-functional.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/funannotate-functional.py b/bin/funannotate-functional.py index 848fc037..0396a50b 100755 --- a/bin/funannotate-functional.py +++ b/bin/funannotate-functional.py @@ -503,7 +503,12 @@ def parseEggNoggMapper(input, output, GeneDict): inputdir = os.path.join(args.input, 'predict_results') outputdir = args.input else: - inputdir = os.path.join(args.input) #here user specified the predict_results folder, or it is a custom folder + inputdir = os.path.abspath(args.input) #here user specified the predict_results folder, or it is a custom folder + if '_results' in inputdir: #then it is the _results dir, so move up one directory + outputdir = os.path.dirname(inputdir) + else: + lib.log.error('Unable to detect funannotate folder as input, please provide -o,--out directory') + sys.exit(1) annotTBL = os.path.join(outputdir, 'annotate_misc', 'genome.tbl')