Home

Awesome

nf-core/sublime

Nextflow and nf-core workflow completions, commands, syntax highlighting and snippets for Sublime Text 4

This package provides Nextflow workflow language:

Essentially, this package tries to make Nextflow workflow development a bit easier especially when trying to develop nf-core conventions and best practices for developing Nextflow pipelines.

Nextflow completions and commands

Process module include command

include { MAKE_BED_MASK } from '../modules/local/make_bed_mask' addParams( options: modules['make_bed_mask'] )

The addParams( options: modules['make_bed_mask'] ) may not be needed and can be removed; it assumes that you have a conf/modules.config with a map of your module args, publish_dir, etc (see nf-core/modules for more info).

Workflow params

NOTE: Completions and info popups for params depend on a valid nextflow_schema.json in your workflow root directory. Example nextflow_schema.json for nf-core/viralrecon workflow.

Navigate cursor to a params.<variable> to show a popup with info pulled from the nextflow_schema.json for that workflow parameter.

Conda completion

NOTE: Conda must be installed along with any channels (e.g. bioconda, conda-forge) to get packages information (needs to be able to run conda search).

process PANGOLIN {
  conda '<press ctrl+space to bring up completion list>'
}

Process output channel completion

Get process named output (i.e. using the emit option) completions after typing <PROCESS_NAME>.out..

Process output channel popup

Show useful info about what output the a process is emitting.

Container directive insert command

This command inserts similar code to what you'd find in an nf-core modules process definition with respect to process container directives. The Biocontainers information is pulled from the Singularity images https://depot.galaxyproject.org/singularity/ and cached as a Python pickle file. Docker container image tags point to the Biocontainers Quay.io page.

if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
  container 'https://depot.galaxyproject.org/singularity/fastqc:0.11.9--hdfd78af_1'
} else {
  container 'quay.io/biocontainers/fastqc:0.11.9--hdfd78af_1'
}

Nextflow Syntax Highlighting

Nextflow syntax highlighting extends Sublime Text 4's Groovy syntax with highlighting of:

Process syntax highlighting and scoping allows one to easily go to the definition or usages of a process (ctrl+shift+g keyboard shortcut):

Nextflow Snippets

Type one of the following and press TAB:

Changelog

1.1.0 - [2022-05-13]

Added:

Fixed:

1.0.0 - [2021-06-30]

0.1.0-alpha.1 - [2019-03-27]

License

MIT License

Copyright (c) Peter Kruczkiewicz