-
Notifications
You must be signed in to change notification settings - Fork 1
/
mglex-cli
executable file
·41 lines (32 loc) · 1.53 KB
/
mglex-cli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env python3
# This file is subject to the terms and conditions of the GPLv3 (see file 'LICENSE' as part of this source code package)
u"""
This is the mglex command line interface which executes the sub-commands.
Usage:
mglex-cli [--version] [--help] <command> [<args>...]
-h, --help Show this screen
-v, --version Show version
Here are the commands to run:
buildmatrix Construct a responsibility matrix for grouped data
train Train a model
classify Calculate likelihood of data under a model
evaluate Evaluate classifications using a reference (true) responsibility matrix
significance Give a null model log-likelihood distribution and calculate p-values for unseen data
bincompare Calculate bin divergences using the data likelihood values
transform Transform probability matrices
spread Spread numeric sequence features onto models using a data responsibility matrix
See 'mglex-cli <command> --help' for more information on a specific command.
"""
import sys
import importlib
import mglex.cli
__author__ = "[email protected]"
from mglex import __version__
if __name__ == "__main__":
from docopt import docopt
arguments = docopt(__doc__, version=__version__, options_first=True)
try:
command = importlib.import_module(".".join(("mglex", "cli", arguments["<command>"])))
command.main(arguments["<args>"])
except ImportError:
sys.stderr.write("Command '%s' does not exist.\n" % arguments["<command>"])