Mercurial > repos > shellac > sam_consensus_v3
comparison env/lib/python3.9/site-packages/ephemeris/common_parser.py @ 0:4f3585e2f14b draft default tip
"planemo upload commit 60cee0fc7c0cda8592644e1aad72851dec82c959"
author | shellac |
---|---|
date | Mon, 22 Mar 2021 18:12:50 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4f3585e2f14b |
---|---|
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 |