Skip to content

Commit

Permalink
add batch option to cli
Browse files Browse the repository at this point in the history
  • Loading branch information
markjschreiber committed Sep 16, 2024
1 parent a7c97ed commit c045b39
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions omics/cli/run_analyzer/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@
[--out=<path>]
[--plot=<directory>]
[--headroom=<float>]
omics-run-analyzer --batch <runId>... [--profile=<profile>] [--region=<region>] [--headroom=<float>]
[--show] --[out=<path>]
omics-run-analyzer (-h --help)
omics-run-analyzer --version
Arguments:
<runId>... One or more workflow run IDs
Options:
-b, --batch=<runId>... Analyze one or more runs and generate aggregate stastics on repeated or scattered tasks
-b, --batch Analyze one or more runs and generate aggregate stastics on repeated or scattered tasks
-f, --file=<path> Load input from file
-H, --headroom=<float> Adds a fractional buffer to the size of recommended memory and CPU. Values must be between 0.0 and 1.0.
-o, --out=<path> Write output to file
Expand Down Expand Up @@ -47,8 +49,12 @@
omics-run-analyzer 1234567 -s -o run-1234567.json
# Plot a timeline of a workflow run and write the plot the HTML to "out/"
omics-run-analyzer 1234567 -P out
# Putput a workflow run analysis with 10% headroom added to recommended CPU and memory
# Output a workflow run analysis with 10% headroom added to recommended CPU and memory
omics-run-analyzer 1234567 -P timeline -H 0.1
# Analyze multiple runs and output aggregate statistics to stdout as JSON
omics-run-analyzer -b 1234567 2345678 3456789 --show
# Analyze multiple runs and output aggregate statistics to a file
omics-run-analyzer -b 1234567 2345678 3456789 -o out.csv
"""
import csv
import datetime
Expand Down Expand Up @@ -425,6 +431,8 @@ def get_timeline_event(res, resources):
if __name__ == "__main__":
# Parse command-line options
opts = docopt.docopt(__doc__, version=f"v{importlib.metadata.version("amazon-omics-tools")}")
print(opts, file=sys.stderr)
exit(0)

try:
session = boto3.Session(profile_name=opts["--profile"], region_name=opts["--region"])
Expand Down

0 comments on commit c045b39

Please sign in to comment.