diff --git a/detector.py b/detector.py index c95d25a..49c084b 100644 --- a/detector.py +++ b/detector.py @@ -41,7 +41,7 @@ def cli(): @cli.command() -@click.argument('path', type=click.Path()) +@click.argument('path', type=click.Path(exists=True)) @click.argument('db', type=click.Path()) def build(path, db): """ @@ -61,7 +61,7 @@ def build(path, db): # find fasta files and concatenate them to a temporary file with open(full_fasta, 'w') as f_out: - for file in path: + for file in os.listdir(path): if file.lower().endswith('.fasta'): click.echo("\tFound file: %s" % file) fasta_count += 1