Namespaces
This page lists all of the available namespaces in the Nextflow standard library.
Global namespace
The global namespace contains globally available constants and functions. Alias of Alias of Directory where a module script is located (equivalent to Map of workflow parameters specified in the config file or as command line options. Alias of Map of pipeline secrets. See Secrets for more information. Alias of Create a branch criteria to use with the branch operator. Get the value of the environment variable with the specified name in the Nextflow launch environment. Throw a script runtime error with an optional error message. Use Stop the pipeline execution and return an exit code and optional error message. Get a file from a file name or glob pattern. Returns a collection of files if the glob pattern yields zero or multiple files. Available options: When When When When Maximum number of directory levels to visit (default: no limit). Type of paths returned, can be See also: channel.fromPath. Get a collection of files from a file name or glob pattern. Supports the same options as Create a grouping key to use with the groupTuple operator. Create a multi-map criteria to use with the multiMap operator. Print a value to standard output. Print a formatted string with the given values to standard output. Print a value to standard output with a newline. Send an email. See Notifications for more information. Sleep for the given number of milliseconds. Create a tuple object from the given arguments.Constants
baseDir: Pathworkflow.projectDir.launchDir: Pathworkflow.launchDir.moduleDir: PathprojectDir if used in the main script).paramsprojectDir: Pathworkflow.projectDir.secrets: Map<String,String>workDir: Pathworkflow.workDir.Functions
branchCriteria( criteria: Closure ) -> Closureenv( name: String ) -> Stringerror( message: String = null )exit( exitCode: int = 0, message: String = null )error() insteadfile( filePattern: String, [options] ) -> Path | List<Path>checkIfExists: booleantrue, throws an exception if the specified path does not exist in the file system (default: false).followLinks: booleantrue, follows symbolic links when traversing a directory tree, otherwise treats them as files (default: true).glob: booleantrue, interprets characters *, ?, [] and {} as glob wildcards, otherwise handles them as normal characters (default: true).hidden: booleantrue, includes hidden files in the resulting paths (default: false).maxDepth: inttype: String'file', 'dir' or 'any' (default: 'file').files( filePattern: String, [options] ) -> Iterable<Path>file().groupKey( key, size: int ) -> GroupKeymultiMapCriteria( criteria: Closure ) -> Closureprint( value )printf( format: String, values... )println( value )sendMail( [options] )sleep( milliseconds: long )tuple( collection: List ) -> ArrayTuple
channel
The channel namespace contains the built-in channel factories. See Channel factories for details.
log
The Log an error message to the console. This function does not terminate the pipeline -- use the global Log an info message to the console. Log a warning message to the console.log namepsace contains functions for logging messages to the console.error( message: String )error() function instead.info( message: String )warn( message: String )
nextflow
The Nextflow runtime build number. Nextflow runtime compile timestamp. Nextflow runtime version number. See VersionNumber for more information.nextflow namespace contains information about the current Nextflow runtime.build: inttimestamp: Stringversion: VersionNumber
workflow
The Command line as entered by the user to launch the workflow execution. Git commit ID of the executed workflow repository. When providing a Git tag, branch name, or commit hash using the Available only in the Timestamp of workflow when execution is completed. Configuration files used for the workflow execution. Docker image used to run workflow tasks, or a map of process names to process containers when multiple images are used. Returns the name of the container engine (e.g. docker or singularity) or null if no container engine is enabled. Available only in the Time elapsed to complete workflow execution. Available only in the Error message of the task that caused the workflow execution to fail. Available only in the Detailed error of the task that caused the workflow execution to fail. Available only in the Exit status of the task that caused the workflow execution to fail. Whether the See also: errorStrategy Namespace containing information about the current Fusion runtime. The following properties are available: Whether Fusion is enabled. The Fusion version being used. User system home directory. Directory where the workflow was launched. Namespace corresponding to the Workflow output directory. Whether the current workflow run is a preview run. Comma-separated list of active configuration profiles. Directory where the workflow project is located. Project repository Git remote URL. Returns Git branch/tag of the executed workflow repository. When providing a Git tag or branch name using the Mnemonic name assigned to this execution instance. Project main script file path. Project main script unique hash ID. Project main script file name. Unique identifier (UUID) associated to current execution. Timestamp of workflow at execution start. Returns Available only in the Reports if the execution completed successfully. User system account name. Namespace containing Wave runtime information. The following properties are available: Whether Wave is enabled. The directory where task temporary files are stored. Define an action to take when the workflow completes (whether successful or not). Define an action to take if the workflow is terminated due to a runtime error or task failure.workflow namespace contains information about the current workflow run.Properties
commandLine: StringcommitId: String-r CLI option, the associated workflow.commitId is also populated.complete: OffsetDateTimeworkflow.onComplete handlerconfigFiles: List<Path>container: String | Map<String,String>containerEngine: Stringduration: Durationworkflow.onComplete handlererrorMessage: Stringworkflow.onComplete and workflow.onError handlerserrorReport: Stringworkflow.onComplete and workflow.onError handlersexitStatus: intworkflow.onComplete and workflow.onError handlersfailOnIgnore: booleanworkflow.failOnIgnore config option was enabled.fusionenabled: booleanversion: StringhomeDir: PathlaunchDir: Pathmanifestmanifest config scope.outputDir: Pathpreview: booleanprofile: StringprojectDir: Pathrepository: Stringresume: booleantrue whenever the current instance is resumed from a previous execution.revision: String-r CLI option, the workflow.revision is also populated.runName: StringscriptFile: PathscriptId: StringscriptName: StringsessionId: UUIDstart: OffsetDateTimestubRun: booleantrue whenever the current instance is a stub-run execution .success: booleanworkflow.onComplete and workflow.onError handlersuserName: Stringwaveenabled: booleanworkDir: PathFunctions
onComplete( action: Closure )onError( action: Closure )