Global namespace
The global namespace contains globally available constants and functions.
Constants
baseDir: Path
Alias of workflow.projectDir.
launchDir: Path
Alias of workflow.launchDir.
moduleDir: Path
Directory where a module script is located (equivalent to projectDir if used in the main script).
params
Map of workflow parameters specified in the config file or as command line options.
projectDir: Path
Alias of workflow.projectDir.
secrets: Map<String,String>
Map of pipeline secrets. See Secrets for more information.
workDir: Path
Alias of workflow.workDir.
Functions
branchCriteria( criteria: Closure ) -> Closure
Create a branch criteria to use with the branch operator.
env( name: String ) -> String
Get the value of the environment variable with the specified name in the Nextflow launch environment.
error( message: String = null )
Throw a script runtime error with an optional error message.
exit( exitCode: int = 0, message: String = null )
Use error() instead
Stop the pipeline execution and return an exit code and optional error message.
file( filePattern: String, [options] ) -> Path | List<Path>
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.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>
Get a collection of files from a file name or glob pattern. Supports the same options as file().
groupKey( key, size: int ) -> GroupKey
Create a grouping key to use with the groupTuple operator.
multiMapCriteria( criteria: Closure ) -> Closure
Create a multi-map criteria to use with the multiMap operator.
print( value )
Print a value to standard output.
printf( format: String, values... )
Print a formatted string with the given values to standard output.
println( value )
Print a value to standard output with a newline.
sendMail( [options] )
Send an email. See Notifications for more information.
Available options: The mail target recipients. Specify multiple addresses as a comma-separated list. The mail CC recipients. Specify multiple addresses as a comma-separated list. The mail BCC recipients. Specify multiple addresses as a comma-separated list. The mail sender address. The mail subject. The mail content charset (default: The mail plain text content. The mail body content. Can be either plain text or HTML content. To send an email that includes both plain text and HTML content, use both the The mail body mime type (default: automatically detected). List of file attachments. Each attachment may specify the following options:toccbccfromsubjectcharsetUTF-8).textbodytext and body attributes: text is used for the plain text content, while body is used for the rich HTML content.typeattach
contentId: The Content-ID header fielddisposition: The Content-Disposition header fieldfileName: The filename parameter of the Content-Disposition header fielddescription: The Content-Description header field
sleep( milliseconds: long )
Sleep for the given number of milliseconds.
record( [options] ) -> Record
Create a record from the given named arguments.
tuple( collection: List ) -> ArrayTuple
Create a tuple from the given arguments.