-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparse_input.py
More file actions
23 lines (19 loc) · 772 Bytes
/
Copy pathparse_input.py
File metadata and controls
23 lines (19 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Functions for parsing command line arguments (YAML file) for HDIprep
# Developer: Joshua M. Hess, BSc
# Developed at the Vaccine & Immunotherapy Center, Mass. General Hospital
# Import external modules
import argparse
def ParseCommandYAML():
"""Function for parsing command line arguments for input to YAML HDIprep"""
# if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument("--im", nargs='*')
parser.add_argument("--pars")
parser.add_argument("--out_dir")
args = parser.parse_args()
# Create a dictionary object to pass to the next function
dict = {"im": args.im, "pars": args.pars, "out_dir": args.out_dir}
# Print the dictionary object
print(dict)
# Return the dictionary
return dict