Commit da815353 authored by nf-core-bot's avatar nf-core-bot
Browse files

Template update for nf-core/tools version 1.14

parent ccd92eec
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -10,13 +10,14 @@ Remember that PRs should be made against the dev branch, unless you're preparing

Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/cutandrun/tree/master/.github/CONTRIBUTING.md)
-->
<!-- markdownlint-disable ul-indent -->

## PR checklist

- [ ] This comment contains a description of changes (with reason).
- [ ] If you've fixed a bug or added code that should be tested, add tests!
    - [ ] If you've added a new tool - add to the software_versions process and a regex to `scrape_software_versions.py`
  - [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/nf-core/cutandrun/tree/master/.github/CONTRIBUTING.md)
    - [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](<https://github.com/>nf-core/cutandrun/tree/master/.github/CONTRIBUTING.md)
    - [ ] If necessary, also make a PR on the nf-core/cutandrun _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository.
- [ ] Make sure your code lints (`nf-core lint .`).
- [ ] Ensure the test suite passes (`nextflow run . -profile test,docker`).
+4 −1
Original line number Diff line number Diff line
@@ -8,6 +8,9 @@ on:
  release:
    types: [published]

# Uncomment if we need an edge release of Nextflow again
# env: NXF_EDGE: 1

jobs:
  test:
    name: Run workflow tests
@@ -20,7 +23,7 @@ jobs:
    strategy:
      matrix:
        # Nextflow versions: check pipeline minimum and current latest
        nxf_ver: ['20.04.0', '21.03.0-edge']
        nxf_ver: ['20.04.0', '']
    steps:
      - name: Check out pipeline code
        uses: actions/checkout@v2
+1 −1
Original line number Diff line number Diff line
FROM nfcore/base:1.13.3
FROM nfcore/base:1.14
LABEL authors="Chris Cheshire and Charlotte West" \
      description="Docker image containing all software requirements for the nf-core/cutandrun pipeline"

+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ The pipeline is built using [Nextflow](https://www.nextflow.io), a workflow tool

## Quick Start

1. Install [`nextflow`](https://nf-co.re/usage/installation)
1. Install [`nextflow`](https://nf-co.re/usage/installation) (`>=20.04.0`)

2. Install any of [`Docker`](https://docs.docker.com/engine/installation/), [`Singularity`](https://www.sylabs.io/guides/3.0/user-guide/), [`Podman`](https://podman.io/), [`Shifter`](https://nersc.gitlab.io/development/shifter/how-to-use/) or [`Charliecloud`](https://hpc.github.io/charliecloud/) for full pipeline reproducibility _(please only use [`Conda`](https://conda.io/miniconda.html) as a last resort; see [docs](https://nf-co.re/usage/configuration#basic-configuration-profiles))_

+28 −26
Original line number Diff line number Diff line
@@ -112,10 +112,16 @@ class NfcoreSchema {
            }
            // unexpected params
            def params_ignore = params.schema_ignore_params.split(',') + 'schema_ignore_params'
            if (!expectedParams.contains(specifiedParam) && !params_ignore.contains(specifiedParam)) {
            def expectedParamsLowerCase = expectedParams.collect{ it.replace("-", "").toLowerCase() }
            def specifiedParamLowerCase = specifiedParam.replace("-", "").toLowerCase()
            if (!expectedParams.contains(specifiedParam) && !params_ignore.contains(specifiedParam) && !expectedParamsLowerCase.contains(specifiedParamLowerCase)) {
                // Temporarily remove camelCase/camel-case params #1035
                def unexpectedParamsLowerCase = unexpectedParams.collect{ it.replace("-", "").toLowerCase()}
                if (!unexpectedParamsLowerCase.contains(specifiedParamLowerCase)){
                    unexpectedParams.push(specifiedParam)
                }
            }
        }

        //=====================================================================//
        // Validate parameters against the schema
@@ -243,7 +249,7 @@ class NfcoreSchema {
            }
            // Cast Duration to String
            if (p['value'].getClass() == nextflow.util.Duration) {
                new_params.replace(p.key, p['value'].toString())
                new_params.replace(p.key, p['value'].toString().replaceFirst(/d(?!\S)/, "day"))
            }
            // Cast LinkedHashMap to String
            if (p['value'].getClass() == LinkedHashMap) {
@@ -482,10 +488,10 @@ class NfcoreSchema {
        }
        workflow_summary['runName']      = workflow.runName
        if (workflow.containerEngine) {
            workflow_summary['containerEngine'] = "$workflow.containerEngine"
            workflow_summary['containerEngine'] = workflow.containerEngine
        }
        if (workflow.container) {
            workflow_summary['container']       = "$workflow.container"
            workflow_summary['container'] = workflow.container
        }
        workflow_summary['launchDir']    = workflow.launchDir
        workflow_summary['workDir']      = workflow.workDir
@@ -506,17 +512,7 @@ class NfcoreSchema {
                    def params_value = params.get(param)
                    def schema_value = group_params.get(param).default
                    def param_type   = group_params.get(param).type
                    if (schema_value == null) {
                        if (param_type == 'boolean') {
                            schema_value = false
                        }
                        if (param_type == 'string') {
                            schema_value = ''
                        }
                        if (param_type == 'integer') {
                            schema_value = 0
                        }
                    } else {
                    if (schema_value != null) {
                        if (param_type == 'string') {
                            if (schema_value.contains('$projectDir') || schema_value.contains('${projectDir}')) {
                                def sub_string = schema_value.replace('\$projectDir', '')
@@ -535,8 +531,13 @@ class NfcoreSchema {
                        }
                    }

                    if (params_value != schema_value) {
                        sub_params.put("$param", params_value)
                    // We have a default in the schema, and this isn't it
                    if (schema_value != null && params_value != schema_value) {
                        sub_params.put(param, params_value)
                    }
                    // No default in the schema, and this isn't empty
                    else if (schema_value == null && params_value != "" && params_value != null && params_value != false) {
                        sub_params.put(param, params_value)
                    }
                }
            }
@@ -549,22 +550,23 @@ class NfcoreSchema {
     * Beautify parameters for summary and return as string
     */
    private static String params_summary_log(workflow, params, json_schema) {
        Map colors = log_colours(params.monochrome_logs)
        String output  = ''
        def params_map = params_summary_map(workflow, params, json_schema)
        def max_chars  = params_max_chars(params_map)
        for (group in params_map.keySet()) {
            def group_params = params_map.get(group)  // This gets the parameters of that particular group
            if (group_params) {
                output += group + '\n'
                output += colors.bold + group + colors.reset + '\n'
                for (param in group_params.keySet()) {
                    output += "    \u001B[1m" +  param.padRight(max_chars) + ": \u001B[1m" + group_params.get(param) + '\n'
                    output += "  " + colors.blue + param.padRight(max_chars) + ": " + colors.green +  group_params.get(param) + colors.reset + '\n'
                }
                output += '\n'
            }
        }
        output += "[Only displaying parameters that differ from pipeline default]\n"
        output += dashed_line(params.monochrome_logs)
        output += '\n\n' + dashed_line(params.monochrome_logs)
        output += colors.dim + "\n Only displaying parameters that differ from defaults.\n" + colors.reset
        output += dashed_line(params.monochrome_logs)
        return output
    }

Loading