nextflow.command

nextflow.command.get_execution(execution_path, nextflow_command)

Creates an execution object from a location.

Parameters:
  • execution_path (str) – the location of the execution.

  • nextflow_command (str) – the command used to run the pipeline.

Return type:

nextflow.models.Execution

nextflow.command.get_process_execution(process_id, path, log, execution_path)

Creates a process execution from a log and its ID.

Parameters:
  • process_id (str) – the ID of the process.

  • path (str) – the path of the process.

  • log (str) – the log text.

  • execution_path (str) – the location of the execution.

Return type:

nextflow.models.ProcessExecution

nextflow.command.get_process_executions(log, execution_path)

Creates a list of process executions from a log.

Parameters:
  • log (str) – the log text.

  • execution_path (str) – the location of the execution.

Return type:

list of nextflow.models.ProcessExecution

nextflow.command.make_nextflow_command(run_path, output_path, pipeline_path, version, configs, params, profiles, timezone, report, timeline, dag)

Generates the nextflow run commmand.

Parameters:
  • run_path (str) – the location to run the pipeline in.

  • output_path (str) – the location to store the output in.

  • pipeline_path (str) – the absolute path to the pipeline .nf file.

  • version (str) – the nextflow version to use.

  • configs (list) – any config files to be applied.

  • params (dict) – the parameters to pass.

  • profiles (list) – any profiles to be applied.

  • timezone (str) – the timezone to use.

  • report (str) – the filename to use for the execution report.

  • timeline (str) – the filename to use for the timeline report.

  • dag (str) – the filename to use for the DAG report.

Return type:

str

nextflow.command.make_nextflow_command_config_string(configs)

Creates the config setting portion of the nextflow run command string. Absolute paths are recommended.

Parameters:

version (str) – the nextflow version to use.

Return type:

str

nextflow.command.make_nextflow_command_env_string(version, timezone, output_path)

Creates the environment variable setting portion of the nextflow run command string.

Parameters:
  • version (str) – the nextflow version to use.

  • timezone (str) – the timezone to use.

  • output_path (str) – the location to store the output in.

Return type:

str

nextflow.command.make_nextflow_command_log_string(output_path)

Creates the log setting portion of the nextflow run command string.

Parameters:

output_path (str) – the location to store the output in.

Return type:

str

nextflow.command.make_nextflow_command_params_string(params)

Creates the parameter setting portion of the nextflow run command

Parameters:

params (dict) – the parameters to pass.

Return type:

str

nextflow.command.make_nextflow_command_profiles_string(profiles)

Creates the profile setting portion of the nextflow run command string.

Parameters:

profiles (list) – any profiles to be applied.

Return type:

str

nextflow.command.make_reports_string(output_path, report, timeline, dag)

Creates the report setting portion of the nextflow run command string.

Parameters:
  • output_path (str) – the location to store the output in.

  • report (str) – the filename to use for the execution report.

  • timeline (str) – the filename to use for the timeline report.

  • dag (str) – the filename to use for the DAG report.

Return type:

str

nextflow.command.run(*args, **kwargs)

Runs a pipeline and returns the execution.

Parameters:
  • pipeline_path (str) – the absolute path to the pipeline .nf file.

  • run_path (str) – the location to run the pipeline in.

  • output_path (str) – the location to store the output in.

  • runner (function) – a function to run the pipeline command.

  • version (str) – the nextflow version to use.

  • configs (list) – any config files to be applied.

  • params (dict) – the parameters to pass.

  • profiles (list) – any profiles to be applied.

  • timezone (str) – the timezone to use for the log.

  • report (str) – the filename to use for the execution report.

  • timeline (str) – the filename to use for the timeline report.

  • dag (str) – the filename to use for the DAG report.

Return type:

nextflow.models.Execution

nextflow.command.run_and_poll(*args, **kwargs)

Runs a pipeline and polls it for updates. Yields the execution after each update.

Parameters:
  • pipeline_path (str) – the absolute path to the pipeline .nf file.

  • run_path (str) – the location to run the pipeline in.

  • output_path (str) – the location to store the output in.

  • runner (function) – a function to run the pipeline command.

  • version (str) – the nextflow version to use.

  • configs (list) – any config files to be applied.

  • params (dict) – the parameters to pass.

  • profiles (list) – any profiles to be applied.

  • timezone (str) – the timezone to use for the log.

  • report (str) – the filename to use for the execution report.

  • timeline (str) – the filename to use for the timeline report.

  • dag (str) – the filename to use for the DAG report.

  • sleep (int) – the number of seconds to wait between polls.

Return type:

nextflow.models.Execution