-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrunner_cli.py
More file actions
97 lines (88 loc) · 2.61 KB
/
Copy pathrunner_cli.py
File metadata and controls
97 lines (88 loc) · 2.61 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
import argparse
import sys
from pathlib import Path
# import project path because module is not found
project_root_path = Path(__file__).parent.parent
sys.path.append(str(project_root_path))
from backend.protzilla.runner import Runner
def args_parser():
parser = argparse.ArgumentParser(
argument_default=None,
description="Command line tool to execute a saved PROTzilla workflow using a file-input mapping.",
prog="PROTzilla Runner",
epilog="Thanks for using PROTzilla! :)",
)
# paths to files have to be supplied in quotes on the command line
parser.add_argument(
"workflow",
action="store",
help="name of a workflow, saved in /user_data/workflows",
)
parser.add_argument(
"file_input_map",
metavar="file-input-map",
action="store",
help="path to a YAML file using step_id -> {field_name: path}",
)
parser.add_argument(
"--msfragger-path",
action="store",
help=argparse.SUPPRESS,
)
parser.add_argument(
"--diann-path",
action="store",
help=argparse.SUPPRESS,
)
parser.add_argument(
"--diann-meta-data-path",
action="store",
help=argparse.SUPPRESS,
)
parser.add_argument(
"--meta-data-path",
action="store",
help=argparse.SUPPRESS,
)
parser.add_argument(
"--peptides-path",
action="store",
help=argparse.SUPPRESS,
)
parser.add_argument(
"--evidence-path",
action="store",
help=argparse.SUPPRESS,
)
parser.add_argument(
"--fasta-path",
action="store",
help=argparse.SUPPRESS,
)
parser.add_argument(
"-n",
"--run-name",
action="store",
help="Name of the run. If not provided a random name will be assigned",
)
# parser.add_argument("-d", "--df-mode", action="store", help="disk or memory") # Doenst work according to Joris, so we dont want this in the release. Standard is currently disk.
parser.add_argument(
"-p",
"--all-plots",
action="store_true",
help="create all plots and save them to backend/user_data/runs/<runName>/plots, default: false",
)
parser.add_argument(
"-v",
"--verbose",
action="store_true",
help="when provided, all Parsed Arguments will be shown",
)
return parser
def main(raw_args):
parser = args_parser()
kwargs = parser.parse_args(raw_args).__dict__
runner = Runner(**kwargs)
runner.compute_workflow()
if __name__ == "__main__":
main(sys.argv[1:])