Skip to content

Commit 94a450a

Browse files
committed
Require the arguments to the CLI
1 parent 7bf8d7d commit 94a450a

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

CAI/cli.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
from .CAI import CAI
55

66
@click.command()
7-
@click.option("-s", "--sequence", type=click.Path(exists=True, dir_okay=False), help="The sequence to calculate the CAI for.")
8-
@click.option("-r", "--reference", type=click.Path(exists=True, dir_okay=False), help="The reference sequences to calculate CAI against.")
7+
@click.option("-s", "--sequence", type=click.Path(exists=True, dir_okay=False), help="The sequence to calculate the CAI for.", required=True)
8+
@click.option("-r", "--reference", type=click.Path(exists=True, dir_okay=False), help="The reference sequences to calculate CAI against.", required=True)
99
@click.option("-g", "--genetic-code", type=int, default=11, help="The genetic code to use. Defaults to 11.")
1010
def cli(reference, sequence, genetic_code):
1111
sequence = SeqIO.read(sequence, "fasta").seq
1212
reference = [str(x.seq) for x in SeqIO.parse(reference, "fasta")]
1313
print(CAI(sequence, reference=reference, genetic_code=genetic_code))
1414

15+
1516
if __name__ == '__main__':
1617
cli()

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
setup(
1010
name='CAI',
1111
packages=["CAI"],
12-
version='1.0.1',
12+
version='1.0.2',
1313
description='Python implementation of codon adaptation index',
1414
long_description=long_description,
1515
author='Benjamin Lee',
@@ -18,7 +18,7 @@
1818
classifiers=["Intended Audience :: Science/Research",
1919
"Topic :: Scientific/Engineering :: Bio-Informatics",
2020
"Programming Language :: Python"],
21-
install_requires=['scipy', 'biopython', 'click'],
21+
install_requires=['scipy', 'biopython', 'click>=7'],
2222
tests_require=["pytest"],
2323
setup_requires=['pytest-runner'],
2424
license="MIT",

0 commit comments

Comments
 (0)