import click
from taca.analysis import analysis as an


@click.group()
def analysis():
	""" Analysis methods entry point """
	pass

# analysis subcommands
@analysis.command()
@click.option('-r', '--run', type=click.Path(exists=True), default=None,
				 help='Demultiplex only a particular run')
def demultiplex(run):
	""" Demultiplex all runs present in the data directories
	"""
	an.run_preprocessing(run)

@analysis.command()
@click.argument('rundir')
def transfer(rundir):
    """Transfers the run without qc"""
    an.transfer_run(rundir)

import click
from taca.analysis import analysis as an


@click.group()
def analysis():
	""" Analysis methods entry point """
	pass

# analysis subcommands
@analysis.command()
@click.option('-r', '--run', type=click.Path(exists=True), default=None,
				 help='Demultiplex only a particular run')
def demultiplex(run):
	""" Demultiplex all runs present in the data directories
	"""
	an.run_preprocessing(run)

@analysis.command()
@click.option('-a','--analysis', is_flag=True, help='Trigger the analysis for the transferred flowcell')
@click.argument('rundir')
def transfer(rundir, analysis):
    """Transfers the run without qc"""
    an.transfer_run(rundir, analysis=analysis)

Add option for triggering or not the analysis
Add option for triggering or not the analysis

  import click
  from taca.analysis import analysis as an
  
  
  @click.group()
  def analysis():
  	""" Analysis methods entry point """
  	pass
  
  # analysis subcommands
  @analysis.command()
  @click.option('-r', '--run', type=click.Path(exists=True), default=None,
  				 help='Demultiplex only a particular run')
  def demultiplex(run):
  	""" Demultiplex all runs present in the data directories
  	"""
  	an.run_preprocessing(run)
  
  @analysis.command()
+ @click.option('-a','--analysis', is_flag=True, help='Trigger the analysis for the transferred flowcell')
  @click.argument('rundir')
- def transfer(rundir):
+ def transfer(rundir, analysis):
      """Transfers the run without qc"""
-     an.transfer_run(rundir)
+     an.transfer_run(rundir, analysis=analysis)
  
Add option for triggering or not the analysis
## Code Before:
import click
from taca.analysis import analysis as an


@click.group()
def analysis():
	""" Analysis methods entry point """
	pass

# analysis subcommands
@analysis.command()
@click.option('-r', '--run', type=click.Path(exists=True), default=None,
				 help='Demultiplex only a particular run')
def demultiplex(run):
	""" Demultiplex all runs present in the data directories
	"""
	an.run_preprocessing(run)

@analysis.command()
@click.argument('rundir')
def transfer(rundir):
    """Transfers the run without qc"""
    an.transfer_run(rundir)

## Instruction:
Add option for triggering or not the analysis
## Code After:
import click
from taca.analysis import analysis as an


@click.group()
def analysis():
	""" Analysis methods entry point """
	pass

# analysis subcommands
@analysis.command()
@click.option('-r', '--run', type=click.Path(exists=True), default=None,
				 help='Demultiplex only a particular run')
def demultiplex(run):
	""" Demultiplex all runs present in the data directories
	"""
	an.run_preprocessing(run)

@analysis.command()
@click.option('-a','--analysis', is_flag=True, help='Trigger the analysis for the transferred flowcell')
@click.argument('rundir')
def transfer(rundir, analysis):
    """Transfers the run without qc"""
    an.transfer_run(rundir, analysis=analysis)
