Skip to content

Commit

Permalink
Lint!
Browse files Browse the repository at this point in the history
  • Loading branch information
ingkebil committed Jul 24, 2019
1 parent dfab58c commit 39381b8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions trailblazer/cli/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,23 +74,25 @@ def log_cmd(context, sampleinfo, sacct, quiet, config):
@click.option('-p', '--priority', type=click.Choice(['low', 'normal', 'high']), default='normal')
@click.option('-d', '--dryrun', is_flag=True, help='only generate SBATCH scripts')
@click.option('--command', is_flag=True, help='only show the MIP command')
@click.option('-sw', '--start-with', help='start the pipeline beginning with program, see format for program in mip.pl')
@click.option('-sw', '--start-with', help='start the pipeline beginning with program,\
see format for program in mip.pl')
@click.argument('case', required=False)
@click.pass_context
def start(context, mip_config, email, priority, dryrun, command, start_with, case):
"""Start a new analysis."""
mip_cli = MipCli(context.obj['script'], context.obj['pipeline'])
mip_config = mip_config or context.obj['mip_config']
email = email or environ_email()
kwargs = dict(config=mip_config, case=case, priority=priority, email=email, dryrun=dryrun, start_with=start_with)
kwargs = dict(config=mip_config, case=case, priority=priority,
email=email, dryrun=dryrun, start_with=start_with)
if command:
mip_command = mip_cli.build_command(**kwargs)
click.echo(' '.join(mip_command))
else:
try:
mip_cli(**kwargs)
if not dryrun:
context.obj['store'].add_pending(family, email=email)
context.obj['store'].add_pending(case, email=email)
except MipStartError as error:
click.echo(click.style(error.message, fg='red'))

Expand Down

0 comments on commit 39381b8

Please sign in to comment.