-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add script to recreate model graphs from model files in XML format; i…
…ncrease version to 1.05
- Loading branch information
Showing
3 changed files
with
270 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env python | ||
|
||
import argparse | ||
import sys | ||
|
||
from sshmm.MyHMM import MyHMMOpenXML | ||
|
||
def parseArguments(args): | ||
"""Sets up the command-line parser and calls it on the command-line arguments to the program. | ||
arguments: | ||
args -- command-line arguments to the program""" | ||
parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter, | ||
description='Takes a ssHMM model file in XML format and produces a model graph in PNG format.') | ||
parser.add_argument('model', type=str, help='model file in XML format') | ||
parser.add_argument('sequence_number', type=int, help='number of training sequences that were used to generate the model. This number can be found in the verbose log file.') | ||
parser.add_argument('output', type=str, help='model graph output') | ||
return parser.parse_args() | ||
|
||
options = parseArguments(sys.argv) | ||
model = MyHMMOpenXML(options.model) | ||
model.printAsGraph(options.output, options.sequence_number) | ||
print "Success: Wrote model graph ", options.output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters