Skip to content

Commit 1931635

Browse files
author
Jon Palmer
committed
fix parsing for outputdir
1 parent 58d2600 commit 1931635

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

bin/funannotate-functional.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,12 @@ def parseEggNoggMapper(input, output, GeneDict):
503503
inputdir = os.path.join(args.input, 'predict_results')
504504
outputdir = args.input
505505
else:
506-
inputdir = os.path.join(args.input) #here user specified the predict_results folder, or it is a custom folder
506+
inputdir = os.path.abspath(args.input) #here user specified the predict_results folder, or it is a custom folder
507+
if '_results' in inputdir: #then it is the _results dir, so move up one directory
508+
outputdir = os.path.dirname(inputdir)
509+
else:
510+
lib.log.error('Unable to detect funannotate folder as input, please provide -o,--out directory')
511+
sys.exit(1)
507512

508513
annotTBL = os.path.join(outputdir, 'annotate_misc', 'genome.tbl')
509514

0 commit comments

Comments
 (0)