Mercurial > repos > shellac > guppy_basecaller
comparison env/lib/python3.7/site-packages/ephemeris/common_parser.py @ 2:6af9afd405e9 draft
"planemo upload commit 0a63dd5f4d38a1f6944587f52a8cd79874177fc1"
author | shellac |
---|---|
date | Thu, 14 May 2020 14:56:58 -0400 |
parents | 26e78fe6e8c4 |
children |
comparison
equal
deleted
inserted
replaced
1:75ca89e9b81c | 2:6af9afd405e9 |
---|---|
1 #!/usr/bin/env python | |
2 | |
3 import argparse | |
4 | |
5 | |
6 def get_common_args(login_required=True, log_file=False): | |
7 | |
8 parser = argparse.ArgumentParser(add_help=False) | |
9 general_group = parser.add_argument_group('General options') | |
10 general_group.add_argument("-v", "--verbose", help="Increase output verbosity.", action="store_true") | |
11 if log_file: | |
12 general_group.add_argument("--log_file", | |
13 dest="log_file", | |
14 help="Where the log file should be stored. " | |
15 "Default is a file in your system's temp folder", | |
16 default=None) | |
17 | |
18 con_group = parser.add_argument_group('Galaxy connection') | |
19 con_group.add_argument("-g", "--galaxy", | |
20 help="Target Galaxy instance URL/IP address", | |
21 default="http://localhost:8080") | |
22 | |
23 if login_required: | |
24 con_group.add_argument("-u", "--user", | |
25 help="Galaxy user email address") | |
26 con_group.add_argument("-p", "--password", | |
27 help="Password for the Galaxy user") | |
28 con_group.add_argument("-a", "--api_key", | |
29 dest="api_key", | |
30 help="Galaxy admin user API key (required if not defined in the tools list file)") | |
31 | |
32 return parser |