nextflow.script

The nextflow.script package implements the parsing and execution of Nextflow scripts.

Class Diagram

run
execute
parse
include
load0
definitions
1
*
imports
1
*
1
*
1
*
CmdRun
ScriptRunner
scriptFile : ScriptFile
session : Session
ScriptFile
source : Path
main : Path
repository : String
revisionInfo : AssetManager.RevisionInfo
localPath : Path
projectName : String
ScriptParser
BaseScript
meta : ScriptMeta
entryFlow : WorkflowDef
ScriptBinding
scriptPath : Path
args : List<String>
params : ParamsMap
configEnv : Map
entryName : String
ScriptMeta
scriptPath : Path
definitions : Map
imports : Map
module : boolean
IncludeDef
ComponentDef
FunctionDef
target : Object
name : String
alias : String
ProcessDef
processName : String
simpleName : String
baseName : String
rawBody : Closure<BodyDef>
WorkflowDef
name : String
body : BodyDef
declaredInputs : List<String>
declaredOutputs : List<String>
variableNames : Set<String>
ProcessConfig
configProperties : Map
inputs : InputsList
outputs : OutputsList
BodyDef
closure : Closure
source : String
type : ScriptType
isShell : boolean
ChannelOut
target : List<DataflowWriteChannel>
channels : Map
WorkflowBinding
vars : Map
InputsList
target : List<InParam>
OutputsList
target : List<OutParam>
InParam
OutParam

Note

Some classes may be excluded from the above diagram for brevity.

Notes

The execution of a Nextflow pipeline occurs in two phases. In the first phase, Nextflow parses and runs the script (using the language extensions in nextflow.ast and nextflow.extension), which produces the workflow DAG. In the second phase, Nextflow executes the workflow.

Note

In DSL1, there was no separation between workflow construction and execution – dataflow operators were executed as soon as they were constructed. DSL2 introduced lazy execution in order to separate process definition from execution, and thereby facilitate subworkflows and modules.