Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ workflow {
PIPELINE_INITIALISATION (
params.version,
params.validate_params,
params.monochrome_logs,
args,
params.outdir,
params.input,
Expand Down
15 changes: 0 additions & 15 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -262,21 +262,6 @@
"branch": "master",
"git_sha": "654daca6c7d8a17479d1c56fb5fb8d1663f11428",
"installed_by": ["subworkflows"]
},
"utils_nextflow_pipeline": {
"branch": "master",
"git_sha": "05954dab2ff481bcb999f24455da29a5828af08d",
"installed_by": ["subworkflows"]
},
"utils_nfcore_pipeline": {
"branch": "master",
"git_sha": "df4d1c8cdee98a1bbbed8fc51e82296568e0f9c1",
"installed_by": ["subworkflows"]
},
"utils_nfschema_plugin": {
"branch": "master",
"git_sha": "e753770db613ce014b3c4bc94f6cba443427b726",
"installed_by": ["subworkflows"]
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,8 @@ manifest {

// Nextflow plugins
plugins {
id 'nf-schema@2.5.1' // Validation of pipeline parameters and creation of an input channel from a sample sheet
id 'nf-schema@2.5.1'
id 'nf-core-utils@0.5.0'
}

validation {
Expand Down
75 changes: 45 additions & 30 deletions subworkflows/local/utils_nfcore_methylseq_pipeline/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,20 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/

include { UTILS_NFSCHEMA_PLUGIN } from '../../nf-core/utils_nfschema_plugin'
include { paramsSummaryMap } from 'plugin/nf-schema'
include { samplesheetToList } from 'plugin/nf-schema'
include { paramsHelp } from 'plugin/nf-schema'
include { completionEmail } from '../../nf-core/utils_nfcore_pipeline'
include { completionSummary } from '../../nf-core/utils_nfcore_pipeline'
include { imNotification } from '../../nf-core/utils_nfcore_pipeline'
include { UTILS_NEXTFLOW_PIPELINE } from '../../nf-core/utils_nextflow_pipeline'
include { UTILS_NFCORE_PIPELINE } from '../../nf-core/utils_nfcore_pipeline'
include { checkCondaChannels } from 'plugin/nf-core-utils'
include { checkConfigProvided } from 'plugin/nf-core-utils'
include { checkProfileProvided } from 'plugin/nf-core-utils'
include { completionEmail } from 'plugin/nf-core-utils'
include { completionSummary } from 'plugin/nf-core-utils'
include { dumpParametersToJSON } from 'plugin/nf-core-utils'
include { getWorkflowVersion } from 'plugin/nf-core-utils'
include { imNotification } from 'plugin/nf-core-utils'

include { paramsHelp } from 'plugin/nf-schema'
include { paramsSummaryLog } from 'plugin/nf-schema'
include { paramsSummaryMap } from 'plugin/nf-schema'
include { samplesheetToList } from 'plugin/nf-schema'
include { validateParameters } from 'plugin/nf-schema'

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -29,7 +34,6 @@ workflow PIPELINE_INITIALISATION {
take:
version // boolean: Display version and exit
validate_params // boolean: Boolean whether to validate parameters against the schema at runtime
monochrome_logs // boolean: Do not use coloured log outputs
nextflow_cli_args // array: List of positional nextflow CLI args
outdir // string: The output directory where the results will be saved
input // string: Path to input samplesheet
Expand All @@ -44,13 +48,16 @@ workflow PIPELINE_INITIALISATION {
//
// Print version and exit if required and dump pipeline parameters to JSON file
//
UTILS_NEXTFLOW_PIPELINE (
version,
true,
outdir,
workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1
)
if (version) {
log.info("${workflow.manifest.name} ${getWorkflowVersion()}")
System.exit(0)
}

dumpParametersToJSON(outdir, params)

if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
checkCondaChannels()
}

//
// Validate parameters and generate parameter summary to stdout
Expand All @@ -74,25 +81,33 @@ workflow PIPELINE_INITIALISATION {
"""
command = "nextflow run ${workflow.manifest.name} -profile <docker/singularity/.../institute> --input samplesheet.csv --outdir <OUTDIR>"

UTILS_NFSCHEMA_PLUGIN (
workflow,
validate_params,
null,
help,
help_full,
show_hidden,
before_text,
after_text,
command
)
if (help || help_full) {
log.info paramsHelp(
[
beforeText: before_text,
afterText: after_text,
command: command,
showHidden: show_hidden,
fullHelp: help_full,
],
params.help instanceof String ? params.help : "",
)
exit 0
}

log.info before_text
log.info paramsSummaryLog(workflow)
log.info after_text

if (validate_params) {
validateParameters()
}

//
// Check config provided to the pipeline
//
UTILS_NFCORE_PIPELINE (
nextflow_cli_args
)
checkConfigProvided()
checkProfileProvided(nextflow_cli_args)

//
// Custom validation for pipeline parameters
Expand Down
126 changes: 0 additions & 126 deletions subworkflows/nf-core/utils_nextflow_pipeline/main.nf

This file was deleted.

38 changes: 0 additions & 38 deletions subworkflows/nf-core/utils_nextflow_pipeline/meta.yml

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading