Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SOaAS
psot.repository
Commits
158711ed
Commit
158711ed
authored
Apr 03, 2018
by
Lukas Jelonek
Browse files
Move repository parameter to main parser. Improve debug output
parent
7429e324
Changes
1
Hide whitespace changes
Inline
Side-by-side
psot/main.py
View file @
158711ed
...
...
@@ -7,15 +7,16 @@ import shutil
from
psot.nextflow
import
setup_execution_directory
,
execute_analysis
import
tempfile
import
sys
import
json
def
main
():
parser
=
argparse
.
ArgumentParser
(
description
=
'Make bioinformatic observations on aminoacid sequences'
)
parser
.
set_defaults
(
func
=
help
)
parser
.
add_argument
(
'--repository'
,
'-r'
,
action
=
'append'
,
help
=
'Include the given repository'
)
subparsers
=
parser
.
add_subparsers
()
info_parser
=
subparsers
.
add_parser
(
'info'
)
info_parser
.
add_argument
(
'--listanalyses'
,
'-l'
,
action
=
'store_true'
,
help
=
'Show available analysis steps'
)
info_parser
.
add_argument
(
'--repository'
,
'-r'
,
action
=
'append'
,
help
=
'Include the given repository'
)
info_parser
.
set_defaults
(
func
=
info
)
analyze_parser
=
subparsers
.
add_parser
(
'analyze'
)
...
...
@@ -29,7 +30,6 @@ def main():
analyze_parser
.
add_argument
(
'--debug'
,
'-d'
,
action
=
'store_true'
,
help
=
'Debug mode, computation directory will not be removed after computation'
)
analyze_parser
.
add_argument
(
'--execution_dir'
,
'-e'
,
help
=
'Use the specified execution directory and do not delete it after the computation'
)
analyze_parser
.
add_argument
(
'--use_cluster'
,
'-C'
,
action
=
'store_true'
,
help
=
'Use compute cluster for execution'
)
analyze_parser
.
add_argument
(
'--repository'
,
'-r'
,
action
=
'append'
,
help
=
'Include the given repository'
)
analyze_parser
.
set_defaults
(
func
=
analyze
)
args
=
parser
.
parse_args
()
...
...
@@ -49,7 +49,7 @@ def analyze(args, config):
sys
.
exit
(
1
)
execution
=
generate_execution
(
config
,
args
)
if
args
.
debug
:
print
(
execution
)
print
(
json
.
dumps
(
execution
,
indent
=
2
)
)
setup_execution_directory
(
execution
)
execute_analysis
(
execution
)
cleanup
(
execution
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment