Skip to content

Commit

Permalink
Merge pull request #148 from timothymillar/f/version
Browse files Browse the repository at this point in the history
Add version command
  • Loading branch information
timothymillar authored Jul 29, 2022
2 parents 248a2d7 + 2bce167 commit d767873
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mchap/application/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
from mchap.application import assemble
from mchap.application import call
from mchap.application import call_exact
from mchap import __version__


def main():
parser = argparse.ArgumentParser(
"Bayesian assemby of micro-haplotypes in polyploids"
)

subprograms = ["assemble", "call", "call-exact"]
subprograms = ["assemble", "call", "call-exact", "version"]
parser.add_argument(
"program", nargs=1, choices=subprograms, help="Specify sub-program"
)
Expand All @@ -30,5 +31,7 @@ def main():
elif prog == "call-exact":
prog = call_exact.program
prog.cli(sys.argv).run_stdout()
elif prog == "version":
print(__version__)
else:
assert False
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ def read_file(file_name):
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Scientific/Engineering :: Bio-Informatics",
],
)

0 comments on commit d767873

Please sign in to comment.