From 7253a130f16cd814331e6d8710e4a7b9244dca0b Mon Sep 17 00:00:00 2001 From: AlexVCaron Date: Thu, 8 Feb 2024 06:02:53 +0000 Subject: [PATCH 01/13] update linting --- .devcontainer/devcontainer.json | 4 +++- .devcontainer/setup_container.sh | 9 ++++++++ .github/workflows/code_linting.yml | 2 +- .github/workflows/test.yml | 14 ++++++------ .gitignore | 2 ++ package-lock.json | 35 ++++++++++++++++++++++++++++++ package.json | 5 +++++ 7 files changed, 62 insertions(+), 9 deletions(-) create mode 100644 package-lock.json create mode 100644 package.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e8c1c5bf..ab70c5dd 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,6 +3,7 @@ "build": { "dockerfile": "Dockerfile" }, "forwardPorts": [3000], "onCreateCommand": "bash .devcontainer/setup_container.sh", + "postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}", "features": { "ghcr.io/devcontainers/features/git:1": {}, "ghcr.io/devcontainers/features/git-lfs:1": {}, @@ -56,7 +57,8 @@ }, "extensions": [ "AlexVCaron.nf-scil-extensions", - "ms-python.autopep8" + "ms-python.autopep8", + "ms-python.vscode-pylance" ] } }, diff --git a/.devcontainer/setup_container.sh b/.devcontainer/setup_container.sh index 63986b60..7d4930c4 100644 --- a/.devcontainer/setup_container.sh +++ b/.devcontainer/setup_container.sh @@ -1,5 +1,14 @@ #!/usr/bin/env bash +NODE_MAJOR=18 + poetry install --no-root echo "export PROFILE=docker" >> ~/.bashrc +mkdir /nodesource && cd /nodesource +curl -fsSL https://deb.nodesource.com/setup_${NODE_MAJOR}.x | bash - &&\ +apt-get install -y nodejs + +npm install --save-dev --save-exact prettier + +echo "function prettier() { npm exec prettier $@; }" >> ~/.bashrc diff --git a/.github/workflows/code_linting.yml b/.github/workflows/code_linting.yml index 9c30b4a7..b595d5a7 100644 --- a/.github/workflows/code_linting.yml +++ b/.github/workflows/code_linting.yml @@ -11,7 +11,7 @@ jobs: contains(github.event.comment.html_url, '/pull/') && contains(github.event.comment.body, '@nf-scil-bot fix linting') && github.repository == 'scilus/nf-scil' - runs-on: ubuntu-latest + runs-on: scilus-nf-scil-runners steps: # Use the @nf-scil-bot token to check out so we can push later - uses: actions/checkout@v4 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3cd8f0b7..5c26578b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,7 +20,7 @@ env: jobs: pre-commit: - runs-on: ubuntu-latest + runs-on: scilus-nf-scil-runners steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v3 @@ -32,7 +32,7 @@ jobs: extra_args: "" prettier: - runs-on: ubuntu-latest + runs-on: scilus-nf-scil-runners steps: - name: Check out repository uses: actions/checkout@v4 @@ -49,7 +49,7 @@ jobs: run: prettier --check . editorconfig: - runs-on: ubuntu-latest + runs-on: scilus-nf-scil-runners steps: - uses: actions/checkout@v4 @@ -65,7 +65,7 @@ jobs: pytest-changes: name: pytest-changes - runs-on: ubuntu-latest + runs-on: scilus-nf-scil-runners outputs: # Expose matched filters as job 'modules' output variable modules: ${{ steps.filter.outputs.changes }} @@ -82,7 +82,7 @@ jobs: token: "" nf-core-lint: - runs-on: ubuntu-latest + runs-on: scilus-nf-scil-runners name: nf-core-lint needs: [pytest-changes] if: ${{ (needs.pytest-changes.outputs.modules != '[]') }} @@ -134,7 +134,7 @@ jobs: if: ${{ startsWith(matrix.tags, 'subworkflows/') }} pytest: - runs-on: ubuntu-latest + runs-on: scilus-nf-scil-runners name: pytest needs: [pytest-changes] if: needs.pytest-changes.outputs.modules != '[]' @@ -212,7 +212,7 @@ jobs: !${{ github.workspace }}/.singularity confirm-pass: - runs-on: ubuntu-latest + runs-on: scilus-nf-scil-runners needs: [prettier, editorconfig, pytest-changes, nf-core-lint, pytest] if: always() steps: diff --git a/.gitignore b/.gitignore index f56ee8e9..276e1a22 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ .DS_Store *.code-workspace + +node_modules/ diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..3746e098 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,35 @@ +{ + "name": "nf-scil", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "devDependencies": { + "prettier": "3.2.5" + } + }, + "node_modules/prettier": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + } + }, + "dependencies": { + "prettier": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", + "dev": true + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 00000000..5254774d --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "devDependencies": { + "prettier": "3.2.5" + } +} From e96dc5552e93e6b2494c0277136420e0f9609b2d Mon Sep 17 00:00:00 2001 From: AlexVCaron Date: Thu, 8 Feb 2024 06:17:13 +0000 Subject: [PATCH 02/13] add doc for prettier install --- .devcontainer/setup_container.sh | 1 - README.md | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.devcontainer/setup_container.sh b/.devcontainer/setup_container.sh index 7d4930c4..4bfb773f 100644 --- a/.devcontainer/setup_container.sh +++ b/.devcontainer/setup_container.sh @@ -5,7 +5,6 @@ NODE_MAJOR=18 poetry install --no-root echo "export PROFILE=docker" >> ~/.bashrc -mkdir /nodesource && cd /nodesource curl -fsSL https://deb.nodesource.com/setup_${NODE_MAJOR}.x | bash - &&\ apt-get install -y nodejs diff --git a/README.md b/README.md index f8f82852..4b950032 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,7 @@ nf-core modules \ - Java Runtime ≥ 11, ≤ 17 - On Ubuntu, install `openjdk-jre-` packages - Nextflow ≥ 21.04.3 +- Node ≥ 14 and Prettier (seel [below](#installing-prettier)) > [!IMPORTANT] > Nextflow might not detect the right `Java virtual machine` by default, more so if @@ -184,3 +185,25 @@ nf-core modules \ ``` The tool can be omitted to run tests for all modules in a category. + + +# Installing Prettier + +To install **Prettier** for the project, you need to have `node` and `npm` installed on your system to at least version 14. On Ubuntu, you can do it using snap : + +```bash +sudo snap install node --classic +``` + +However, if you cannot install snap, or have another OS, refer to the [official documentation](https://nodejs.org/en/download/package-manager/) for the installation procedure. + +Under the current configuration for the *Development Container*, for this project, we use the following procedure, considering `${NODE_MAJOR}` is at least 14 for Prettier : + +```bash +curl -fsSL https://deb.nodesource.com/setup_${NODE_MAJOR}.x | bash - &&\ +apt-get install -y nodejs + +npm install --save-dev --save-exact prettier + +echo "function prettier() { npm exec prettier $@; }" >> ~/.bashrc +``` From dfff75792f838e855563027309b75a5245f492eb Mon Sep 17 00:00:00 2001 From: AlexVCaron Date: Thu, 8 Feb 2024 06:34:30 +0000 Subject: [PATCH 03/13] kaka --- modules/nf-scil/betcrop/blabla/main.nf | 75 +++++++++++++++++++++++++ modules/nf-scil/betcrop/blabla/meta.yml | 70 +++++++++++++++++++++++ 2 files changed, 145 insertions(+) create mode 100644 modules/nf-scil/betcrop/blabla/main.nf create mode 100644 modules/nf-scil/betcrop/blabla/meta.yml diff --git a/modules/nf-scil/betcrop/blabla/main.nf b/modules/nf-scil/betcrop/blabla/main.nf new file mode 100644 index 00000000..142de1f4 --- /dev/null +++ b/modules/nf-scil/betcrop/blabla/main.nf @@ -0,0 +1,75 @@ + +process BETCROP_BLABLA { + tag "$meta.id" + label 'process_single' + + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://scil.usherbrooke.ca/containers/scilus_1.6.0.sif': + 'scilus/scilus:1.6.0' }" + + input: + tuple val(meta), path(dwi), path(bval), path(bvec) + + output: + tuple val(meta), path("*dwi_bet_cropped.nii.gz") , emit: dwi + tuple val(meta), path("*dwi_bet_cropped_mask.nii.gz") , emit: mask + tuple val(meta), path("*dwi_boundingBox.pkl") , emit: bbox + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def prefix = task.ext.prefix ?: "${meta.id}" + + def b0_thr = task.ext.b0_thr ? "--b0_thr " + task.ext.b0_thr : "" + def bet_dwi_f = task.ext.bet_dwi_f ? "-f " + task.ext.bet_dwi_f : "" + + """ + export ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS=1 + export OMP_NUM_THREADS=1 + export OPENBLAS_NUM_THREADS=1 + + scil_extract_b0.py $dwi $bval $bvec ${prefix}__b0.nii.gz --mean \ + $b0_thr --force_b0_threshold + bet ${prefix}__b0.nii.gz ${prefix}__b0_bet.nii.gz -m -R $bet_dwi_f + scil_image_math.py convert ${prefix}__b0_bet_mask.nii.gz ${prefix}__b0_bet_mask.nii.gz --data_type uint8 -f + mrcalc $dwi ${prefix}__b0_bet_mask.nii.gz -mult ${prefix}__dwi_bet.nii.gz -quiet -nthreads 1 + + scil_crop_volume.py $dwi ${prefix}__dwi_bet_cropped.nii.gz -f \ + --output_bbox ${prefix}__dwi_boundingBox.pkl -f + scil_crop_volume.py ${prefix}__b0_bet_mask.nii.gz ${prefix}__dwi_bet_cropped_mask.nii.gz -f\ + --input_bbox ${prefix}__dwi_boundingBox.pkl -f + scil_image_math.py convert ${prefix}__dwi_bet_cropped_mask.nii.gz ${prefix}__dwi_bet_cropped_mask.nii.gz \ + --data_type uint8 -f + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + scilpy: 1.6.0 + mrtrix: \$(mrcalc -version 2>&1 | sed -n 's/== mrcalc \\([0-9.]\\+\\).*/\\1/p') + fsl: \$(flirt -version 2>&1 | sed -n 's/FLIRT version \\([0-9.]\\+\\)/\\1/p') + END_VERSIONS + """ + + stub: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + """ + scil_extract_b0.py -h + bet -h + scil_image_math.py -h + mrcalc -h + scil_crop_volume.py -h + + touch ${prefix}__dwi_bet_cropped.nii.gz + touch ${prefix}__dwi_bet_cropped_mask.nii.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + scilpy: 1.6.0 + mrtrix: \$(mrcalc -version 2>&1 | sed -n 's/== mrcalc \\([0-9.]\\+\\).*/\\1/p') + fsl: \$(flirt -version 2>&1 | sed -n 's/FLIRT version \\([0-9.]\\+\\)/\\1/p') + END_VERSIONS + """ +} diff --git a/modules/nf-scil/betcrop/blabla/meta.yml b/modules/nf-scil/betcrop/blabla/meta.yml new file mode 100644 index 00000000..dde1b21a --- /dev/null +++ b/modules/nf-scil/betcrop/blabla/meta.yml @@ -0,0 +1,70 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json +name: "betcrop_blabla" +description: Perform Brain extraction using FSL BET followed by cropping empty planes around the data. +keywords: + - DWI + - BET + - Crop +tools: + - "FSL": + description: "FSL Toolbox and Scilpy Toolbox" + homepage: "https://fsl.fmrib.ox.ac.uk/fsl/fslwiki" + - "Scilpy": + description: "The Sherbrooke Connectivity Imaging Lab (SCIL) Python dMRI processing toolbox." + homepage: "https://github.com/scilus/scilpy.git" + - "MRtrix3": + description: "Toolbox for image processing, analysis and visualisation of dMRI." + homepage: "https://mrtrix.readthedocs.io/en/latest/" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + + - dwi: + type: file + description: Nifti DWI volume to perform BET + crop. + pattern: "*.{nii,nii.gz}" + + - bval: + type: file + description: B-values in FSL format. + pattern: "*.bval" + + - bvec: + type: file + description: B-vectors in FSL format. + pattern: "*.bvec" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'test', single_end:false ]` + + - dwi: + type: file + description: Nifti DWI volume brain-extracted and cropped. + pattern: "*dwi_bet_cropped.{nii,nii.gz}" + + - mask: + type: file + description: DWI mask brain-extracted and cropped. + pattern: "*dwi_bet_cropped_mask.{nii,nii.gz}" + + - bbox: + type: file + description: DWI BoundingBox used for cropping. + pattern: "*dwi_boundingBox.pkl" + + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@gagnonanthony" From 20de3c706396b83e01818aa79c62a4c2b09ba176 Mon Sep 17 00:00:00 2001 From: AlexVCaron Date: Thu, 8 Feb 2024 07:09:54 +0000 Subject: [PATCH 04/13] update doc for hackathon --- README.md | 6 ++--- docs/MODULE.md | 66 +++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 57 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 4b950032..d835177b 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ nf-core modules \ The project uses _poetry_ to manage python dependencies. To install it using pipx, run the following commands : -``` +```bash pip install pipx pipx ensurepath pipx install poetry @@ -108,7 +108,7 @@ pipx install poetry Once done, install the project with : -``` +```bash poetry install ``` @@ -119,7 +119,7 @@ poetry install The project scripts and dependencies can be accessed using : -``` +```bash poetry shell ``` diff --git a/docs/MODULE.md b/docs/MODULE.md index abcd911a..8e0b10ef 100644 --- a/docs/MODULE.md +++ b/docs/MODULE.md @@ -4,7 +4,7 @@ First verify you are located at the root of this repository (not in `modules`), then run the following interactive command : -``` +```bash nf-core modules create ``` @@ -19,7 +19,7 @@ to the following to ensure configuration abides with `nf-scil` : Alternatively, you can use the following command to supply nearly all information : -``` +```bash nf-core modules create \ --author @scilus \ --label process_single \ @@ -79,7 +79,9 @@ already follow all guidelines. You will find related files in : In the script section, before the script definition (in `""" """`), unpack the optional argument into a `usable variable`. For a optional input `input1`, add : - def optional_input1 = input1 ? "" : "" + ```groovy + def optional_input1 = input1 ? "" : "" + ``` The variable `optional_input1` is the one to use in the script. @@ -142,6 +144,15 @@ don't need to specify them all. At least define the `keywords`, describe the pro > the module ! If you use scripts from `scilpy`, here you describe scilpy. If using > `ANTs`, describe ANts. Etcetera. +Once done, commit your module and push the changes. Then, to look at the documentation it creates for your module, run : + +```bash +nf-core modules \ + --git-remote \ + --branch \ + list +``` + ### Editing `./tests/modules/nf-scil///main.nf` : The module's test suite is a collection of workflows containing isolated test cases. You @@ -183,7 +194,7 @@ so output files that gets generated are checksum correctly. Run : -``` +```bash nf-core modules create-test-yml \ --run-tests \ --force \ @@ -196,6 +207,19 @@ smoothly, look at the test metadata file produced : `tests/modules/nf-scil/ \ + --branch \ + lint / +``` + +YOu'll probably get a bunch of *whitespace* and *indentation* errors, but also image errors, bad *nextflow* syntax and more. You need to fix all `errors` and as much as the `ẁarnings`as possible. + ## Last safety test You're mostly done ! If every tests passes, your module is ready ! Still, you have not tested @@ -214,7 +238,7 @@ testing one. Run the following command, to try installing the module : -``` +```bash nf-core module \ --git-remote https://github.com/scilus/nf-scil.git \ --branch \ @@ -319,7 +343,7 @@ for the `dictionary key` : `params.test_data[][][]`. Thus, a new binding in `tests/config/test_data.config` should resemble the following -``` +```groovy params { test_data { ... @@ -346,7 +370,7 @@ You then use `params.test_data[][][]` in your test c attach the data to the test case, since the `params.test_data` collection is loaded automatically. To do so, in a test workflow, define an `input` object : -``` +```groovy input = [ [ id:'test', single_end:false ], // meta map params.test_data[][][], @@ -365,7 +389,7 @@ and use it as input to the processes to test. The Scilpy Fetcher is a tool that allows you to download datasets from the Scilpy test data depository. To use it, first include the _fetcher workflow_ in your test's `main.nf` : -``` +```groovy include { LOAD_TEST_DATA } from '../../../../../subworkflows/nf-scil/load_test_data/main' ``` @@ -376,11 +400,22 @@ The workflow has two inputs : - A name for the temporary directory where the data will be put. -The directories where the archives contents are unpacked are accessed using the output -parameter of the workflow `LOAD_TEST_DATA.out.test_data_directory`. To create the test -input from it, use the `.map` operator : +To call it, use the following syntax : +```groovy +archives = Channel.from( [ "", "archive2", ... ] ) +LOAD_TEST_DATA( archives, "" ) ``` + +>[!IMPORTANT] +>This will download the `archives` and unpack them under the `directory` +>specified, using the archive's names as `sub-directories` to unpack to. + +The archives contents are accessed using the output parameter of the workflow +`LOAD_TEST_DATA.out.test_data_directory`. To create the test input from it for +a given `PROCESS` to test use the `.map` operator : + +```groovy input = LOAD_TEST_DATA.out.test_data_directory .map{ test_data_directory -> [ [ id:'test', single_end:false ], // meta map @@ -390,7 +425,14 @@ input = LOAD_TEST_DATA.out.test_data_directory ] } ``` +Then feed it to it : + +```groovy +PROCESS( input ) +``` + + > [!NOTE] > The subworkflow must be called individually in each test workflow, even if they download > the same archives, since there is no mechanism to pass data channels to them from the -> outside. +> outside, or share cache between them. From acbc1716b90821043435e3dc0d2542dc69e9971b Mon Sep 17 00:00:00 2001 From: AlexVCaron Date: Thu, 8 Feb 2024 07:11:54 +0000 Subject: [PATCH 05/13] remove debug --- modules/nf-scil/betcrop/blabla/main.nf | 75 ------------------------- modules/nf-scil/betcrop/blabla/meta.yml | 70 ----------------------- 2 files changed, 145 deletions(-) delete mode 100644 modules/nf-scil/betcrop/blabla/main.nf delete mode 100644 modules/nf-scil/betcrop/blabla/meta.yml diff --git a/modules/nf-scil/betcrop/blabla/main.nf b/modules/nf-scil/betcrop/blabla/main.nf deleted file mode 100644 index 142de1f4..00000000 --- a/modules/nf-scil/betcrop/blabla/main.nf +++ /dev/null @@ -1,75 +0,0 @@ - -process BETCROP_BLABLA { - tag "$meta.id" - label 'process_single' - - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://scil.usherbrooke.ca/containers/scilus_1.6.0.sif': - 'scilus/scilus:1.6.0' }" - - input: - tuple val(meta), path(dwi), path(bval), path(bvec) - - output: - tuple val(meta), path("*dwi_bet_cropped.nii.gz") , emit: dwi - tuple val(meta), path("*dwi_bet_cropped_mask.nii.gz") , emit: mask - tuple val(meta), path("*dwi_boundingBox.pkl") , emit: bbox - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def prefix = task.ext.prefix ?: "${meta.id}" - - def b0_thr = task.ext.b0_thr ? "--b0_thr " + task.ext.b0_thr : "" - def bet_dwi_f = task.ext.bet_dwi_f ? "-f " + task.ext.bet_dwi_f : "" - - """ - export ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS=1 - export OMP_NUM_THREADS=1 - export OPENBLAS_NUM_THREADS=1 - - scil_extract_b0.py $dwi $bval $bvec ${prefix}__b0.nii.gz --mean \ - $b0_thr --force_b0_threshold - bet ${prefix}__b0.nii.gz ${prefix}__b0_bet.nii.gz -m -R $bet_dwi_f - scil_image_math.py convert ${prefix}__b0_bet_mask.nii.gz ${prefix}__b0_bet_mask.nii.gz --data_type uint8 -f - mrcalc $dwi ${prefix}__b0_bet_mask.nii.gz -mult ${prefix}__dwi_bet.nii.gz -quiet -nthreads 1 - - scil_crop_volume.py $dwi ${prefix}__dwi_bet_cropped.nii.gz -f \ - --output_bbox ${prefix}__dwi_boundingBox.pkl -f - scil_crop_volume.py ${prefix}__b0_bet_mask.nii.gz ${prefix}__dwi_bet_cropped_mask.nii.gz -f\ - --input_bbox ${prefix}__dwi_boundingBox.pkl -f - scil_image_math.py convert ${prefix}__dwi_bet_cropped_mask.nii.gz ${prefix}__dwi_bet_cropped_mask.nii.gz \ - --data_type uint8 -f - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - scilpy: 1.6.0 - mrtrix: \$(mrcalc -version 2>&1 | sed -n 's/== mrcalc \\([0-9.]\\+\\).*/\\1/p') - fsl: \$(flirt -version 2>&1 | sed -n 's/FLIRT version \\([0-9.]\\+\\)/\\1/p') - END_VERSIONS - """ - - stub: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - - """ - scil_extract_b0.py -h - bet -h - scil_image_math.py -h - mrcalc -h - scil_crop_volume.py -h - - touch ${prefix}__dwi_bet_cropped.nii.gz - touch ${prefix}__dwi_bet_cropped_mask.nii.gz - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - scilpy: 1.6.0 - mrtrix: \$(mrcalc -version 2>&1 | sed -n 's/== mrcalc \\([0-9.]\\+\\).*/\\1/p') - fsl: \$(flirt -version 2>&1 | sed -n 's/FLIRT version \\([0-9.]\\+\\)/\\1/p') - END_VERSIONS - """ -} diff --git a/modules/nf-scil/betcrop/blabla/meta.yml b/modules/nf-scil/betcrop/blabla/meta.yml deleted file mode 100644 index dde1b21a..00000000 --- a/modules/nf-scil/betcrop/blabla/meta.yml +++ /dev/null @@ -1,70 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json -name: "betcrop_blabla" -description: Perform Brain extraction using FSL BET followed by cropping empty planes around the data. -keywords: - - DWI - - BET - - Crop -tools: - - "FSL": - description: "FSL Toolbox and Scilpy Toolbox" - homepage: "https://fsl.fmrib.ox.ac.uk/fsl/fslwiki" - - "Scilpy": - description: "The Sherbrooke Connectivity Imaging Lab (SCIL) Python dMRI processing toolbox." - homepage: "https://github.com/scilus/scilpy.git" - - "MRtrix3": - description: "Toolbox for image processing, analysis and visualisation of dMRI." - homepage: "https://mrtrix.readthedocs.io/en/latest/" - -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test', single_end:false ]` - - - dwi: - type: file - description: Nifti DWI volume to perform BET + crop. - pattern: "*.{nii,nii.gz}" - - - bval: - type: file - description: B-values in FSL format. - pattern: "*.bval" - - - bvec: - type: file - description: B-vectors in FSL format. - pattern: "*.bvec" - -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. `[ id:'test', single_end:false ]` - - - dwi: - type: file - description: Nifti DWI volume brain-extracted and cropped. - pattern: "*dwi_bet_cropped.{nii,nii.gz}" - - - mask: - type: file - description: DWI mask brain-extracted and cropped. - pattern: "*dwi_bet_cropped_mask.{nii,nii.gz}" - - - bbox: - type: file - description: DWI BoundingBox used for cropping. - pattern: "*dwi_boundingBox.pkl" - - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - -authors: - - "@gagnonanthony" From e5659de376d93b30abf1a2c50738459f8200237a Mon Sep 17 00:00:00 2001 From: AlexVCaron Date: Thu, 8 Feb 2024 07:13:24 +0000 Subject: [PATCH 06/13] use pullrequest target --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5c26578b..b4ca57dc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,7 @@ name: Modules Tests on: push: branches: [main] - pull_request: + pull_request_target: branches: [main] merge_group: types: [checks_requested] From 05afb20b001d72185c76d9cc3bc83383fdd838b0 Mon Sep 17 00:00:00 2001 From: AlexVCaron Date: Thu, 8 Feb 2024 07:22:19 +0000 Subject: [PATCH 07/13] trigger GitHub actions From 4f68e5ce629733534fa926bf545ae99404b0f158 Mon Sep 17 00:00:00 2001 From: AlexVCaron Date: Thu, 8 Feb 2024 07:28:31 +0000 Subject: [PATCH 08/13] trigger GitHub actions From 6e0e23be4edd815e31f7f424d4f8d1c92f96b8de Mon Sep 17 00:00:00 2001 From: AlexVCaron Date: Thu, 8 Feb 2024 07:45:15 +0000 Subject: [PATCH 09/13] final fixes --- .github/workflows/test.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b4ca57dc..4c863905 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,12 +1,11 @@ name: Modules Tests on: push: - branches: [main] + branches: + - main pull_request_target: - branches: [main] - merge_group: - types: [checks_requested] - branches: [main] + branches: + - main # Cancel if a newer run is started concurrency: From 90083f47568e55ac1e2f4d70d8c882cb1969572a Mon Sep 17 00:00:00 2001 From: AlexVCaron Date: Thu, 8 Feb 2024 07:49:45 +0000 Subject: [PATCH 10/13] remove bad practice --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4c863905..2ef2e81e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -213,7 +213,7 @@ jobs: confirm-pass: runs-on: scilus-nf-scil-runners needs: [prettier, editorconfig, pytest-changes, nf-core-lint, pytest] - if: always() + if: !cancelled() steps: - name: All tests ok if: ${{ success() || !contains(needs.*.result, 'failure') }} @@ -223,7 +223,7 @@ jobs: run: exit 1 - name: debug-print - if: always() + if: !cancelled() run: | echo "toJSON(needs) = ${{ toJSON(needs) }}" echo "toJSON(needs.*.result) = ${{ toJSON(needs.*.result) }}" From 8c242a29e529771143040bbafb5c7b727239af26 Mon Sep 17 00:00:00 2001 From: AlexVCaron Date: Thu, 8 Feb 2024 07:52:45 +0000 Subject: [PATCH 11/13] fix --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2ef2e81e..d6a3dd29 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -213,7 +213,7 @@ jobs: confirm-pass: runs-on: scilus-nf-scil-runners needs: [prettier, editorconfig, pytest-changes, nf-core-lint, pytest] - if: !cancelled() + if: ${{ !cancelled() }} steps: - name: All tests ok if: ${{ success() || !contains(needs.*.result, 'failure') }} @@ -223,7 +223,7 @@ jobs: run: exit 1 - name: debug-print - if: !cancelled() + if: ${{ !cancelled() }} run: | echo "toJSON(needs) = ${{ toJSON(needs) }}" echo "toJSON(needs.*.result) = ${{ toJSON(needs.*.result) }}" From 70438234c18c6002403cad8c1528dcf710f15dfd Mon Sep 17 00:00:00 2001 From: AlexVCaron Date: Thu, 8 Feb 2024 14:01:09 +0000 Subject: [PATCH 12/13] fix prettier --- README.md | 3 +-- docs/MODULE.md | 17 ++++++------- package-lock.json | 62 +++++++++++++++++++++++------------------------ package.json | 6 ++--- 4 files changed, 43 insertions(+), 45 deletions(-) diff --git a/README.md b/README.md index d835177b..d17acbfc 100644 --- a/README.md +++ b/README.md @@ -186,7 +186,6 @@ nf-core modules \ The tool can be omitted to run tests for all modules in a category. - # Installing Prettier To install **Prettier** for the project, you need to have `node` and `npm` installed on your system to at least version 14. On Ubuntu, you can do it using snap : @@ -197,7 +196,7 @@ sudo snap install node --classic However, if you cannot install snap, or have another OS, refer to the [official documentation](https://nodejs.org/en/download/package-manager/) for the installation procedure. -Under the current configuration for the *Development Container*, for this project, we use the following procedure, considering `${NODE_MAJOR}` is at least 14 for Prettier : +Under the current configuration for the _Development Container_, for this project, we use the following procedure, considering `${NODE_MAJOR}` is at least 14 for Prettier : ```bash curl -fsSL https://deb.nodesource.com/setup_${NODE_MAJOR}.x | bash - &&\ diff --git a/docs/MODULE.md b/docs/MODULE.md index 8e0b10ef..3e2c59d4 100644 --- a/docs/MODULE.md +++ b/docs/MODULE.md @@ -79,9 +79,9 @@ already follow all guidelines. You will find related files in : In the script section, before the script definition (in `""" """`), unpack the optional argument into a `usable variable`. For a optional input `input1`, add : - ```groovy - def optional_input1 = input1 ? "" : "" - ``` + ```groovy + def optional_input1 = input1 ? "" : "" + ``` The variable `optional_input1` is the one to use in the script. @@ -209,7 +209,7 @@ critical to ensure future executions of your test produce valid outputs. ## Lint your code -Before submitting to *nf-scil*, once you've commit and push everything, the code need to be correctly linted, else the checks won't pass. This is done using `prettier` on your new module, through the *nf-core* command line : +Before submitting to _nf-scil_, once you've commit and push everything, the code need to be correctly linted, else the checks won't pass. This is done using `prettier` on your new module, through the _nf-core_ command line : ```bash nf-core module \ @@ -218,7 +218,7 @@ nf-core module \ lint / ``` -YOu'll probably get a bunch of *whitespace* and *indentation* errors, but also image errors, bad *nextflow* syntax and more. You need to fix all `errors` and as much as the `ẁarnings`as possible. +YOu'll probably get a bunch of _whitespace_ and _indentation_ errors, but also image errors, bad _nextflow_ syntax and more. You need to fix all `errors` and as much as the `ẁarnings`as possible. ## Last safety test @@ -407,9 +407,9 @@ archives = Channel.from( [ "", "archive2", ... ] ) LOAD_TEST_DATA( archives, "" ) ``` ->[!IMPORTANT] ->This will download the `archives` and unpack them under the `directory` ->specified, using the archive's names as `sub-directories` to unpack to. +> [!IMPORTANT] +> This will download the `archives` and unpack them under the `directory` +> specified, using the archive's names as `sub-directories` to unpack to. The archives contents are accessed using the output parameter of the workflow `LOAD_TEST_DATA.out.test_data_directory`. To create the test input from it for @@ -431,7 +431,6 @@ Then feed it to it : PROCESS( input ) ``` - > [!NOTE] > The subworkflow must be called individually in each test workflow, even if they download > the same archives, since there is no mechanism to pass data channels to them from the diff --git a/package-lock.json b/package-lock.json index 3746e098..49195d94 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,35 +1,35 @@ { - "name": "nf-scil", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "devDependencies": { - "prettier": "3.2.5" - } + "name": "nf-scil", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "devDependencies": { + "prettier": "3.2.5" + } + }, + "node_modules/prettier": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + } }, - "node_modules/prettier": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", - "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", - "dev": true, - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } + "dependencies": { + "prettier": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", + "dev": true + } } - }, - "dependencies": { - "prettier": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", - "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", - "dev": true - } - } } diff --git a/package.json b/package.json index 5254774d..903698be 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "devDependencies": { - "prettier": "3.2.5" - } + "devDependencies": { + "prettier": "3.2.5" + } } From c042e62229ccd497327f494a628674f64bec110d Mon Sep 17 00:00:00 2001 From: AlexVCaron Date: Thu, 8 Feb 2024 14:06:31 +0000 Subject: [PATCH 13/13] update prettier and editorconfig --- modules/nf-scil/testdata/scilpy/meta.yml | 2 +- nf-test.config | 2 +- run_tests.sh | 2 +- subworkflows/nf-scil/load_test_data/meta.yml | 2 +- tests/modules/nf-scil/betcrop/cropvolume/main.nf | 2 +- tests/modules/nf-scil/betcrop/fslbetcrop/main.nf | 2 +- tests/modules/nf-scil/denoising/mppca/main.nf | 2 +- tests/modules/nf-scil/denoising/mppca/nextflow.config | 2 +- tests/modules/nf-scil/preproc/gibbs/main.nf | 2 +- tests/modules/nf-scil/preproc/gibbs/nextflow.config | 4 ++-- tests/modules/nf-scil/preproc/n4/main.nf | 2 +- tests/modules/nf-scil/reconst/dtimetrics/main.nf | 6 +++--- tests/modules/nf-scil/reconst/fodf/main.nf | 2 +- tests/modules/nf-scil/reconst/frf/main.nf | 10 +++++----- tests/modules/nf-scil/segmentation/fastseg/main.nf | 2 +- .../modules/nf-scil/segmentation/freesurferseg/main.nf | 2 +- tests/modules/nf-scil/tracking/localtracking/main.nf | 4 ++-- tests/modules/nf-scil/tracking/pfttracking/main.nf | 4 ++-- tests/subworkflows/nf-scil/load_test_data/main.nf | 2 +- 19 files changed, 28 insertions(+), 28 deletions(-) diff --git a/modules/nf-scil/testdata/scilpy/meta.yml b/modules/nf-scil/testdata/scilpy/meta.yml index f5e7edd0..6ec5d4ad 100644 --- a/modules/nf-scil/testdata/scilpy/meta.yml +++ b/modules/nf-scil/testdata/scilpy/meta.yml @@ -2,7 +2,7 @@ # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json name: "testdata_scilpy" description: | - Import test data using Scilpy's data fetcher. Archives names can be found at: + Import test data using Scilpy's data fetcher. Archives names can be found at: https://github.com/scilus/scilpy/blob/96ab12eb5d303754ef7ad74d7385137683cb9d47/scilpy/io/fetcher.py#L59 keywords: - test diff --git a/nf-test.config b/nf-test.config index cb456346..12318167 100644 --- a/nf-test.config +++ b/nf-test.config @@ -10,4 +10,4 @@ config { // run all test with the defined docker profile from the main nextflow.config profile "" -} \ No newline at end of file +} diff --git a/run_tests.sh b/run_tests.sh index c2202081..174f47e5 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -34,4 +34,4 @@ fi done -done \ No newline at end of file +done diff --git a/subworkflows/nf-scil/load_test_data/meta.yml b/subworkflows/nf-scil/load_test_data/meta.yml index 7ef37d23..347b5659 100644 --- a/subworkflows/nf-scil/load_test_data/meta.yml +++ b/subworkflows/nf-scil/load_test_data/meta.yml @@ -2,7 +2,7 @@ name: "load_test_data" description: | - Load test data from Scilpy in a local temporary directory. Archives names can be found at: + Load test data from Scilpy in a local temporary directory. Archives names can be found at: https://github.com/scilus/scilpy/blob/96ab12eb5d303754ef7ad74d7385137683cb9d47/scilpy/io/fetcher.py#L59 keywords: - load diff --git a/tests/modules/nf-scil/betcrop/cropvolume/main.nf b/tests/modules/nf-scil/betcrop/cropvolume/main.nf index 6eb24dd2..2dfeda93 100644 --- a/tests/modules/nf-scil/betcrop/cropvolume/main.nf +++ b/tests/modules/nf-scil/betcrop/cropvolume/main.nf @@ -5,7 +5,7 @@ nextflow.enable.dsl = 2 include { BETCROP_CROPVOLUME } from '../../../../../modules/nf-scil/betcrop/cropvolume/main.nf' workflow test_betcrop_cropvolume { - + input = [ [ id:'test', single_end:false ], // meta map file(params.test_data['betcrop']['cropvolume']['image'], checkIfExists: true), diff --git a/tests/modules/nf-scil/betcrop/fslbetcrop/main.nf b/tests/modules/nf-scil/betcrop/fslbetcrop/main.nf index d123784f..ccb681c2 100644 --- a/tests/modules/nf-scil/betcrop/fslbetcrop/main.nf +++ b/tests/modules/nf-scil/betcrop/fslbetcrop/main.nf @@ -5,7 +5,7 @@ nextflow.enable.dsl = 2 include { BETCROP_FSLBETCROP } from '../../../../../modules/nf-scil/betcrop/fslbetcrop/main.nf' workflow test_betcrop_fslbetcrop { - + input = [ [ id:'test', single_end:false ], // meta map file(params.test_data['betcrop']['fslbetcrop']['dwi'], checkIfExists: true), diff --git a/tests/modules/nf-scil/denoising/mppca/main.nf b/tests/modules/nf-scil/denoising/mppca/main.nf index 18f10742..3424e330 100644 --- a/tests/modules/nf-scil/denoising/mppca/main.nf +++ b/tests/modules/nf-scil/denoising/mppca/main.nf @@ -5,7 +5,7 @@ nextflow.enable.dsl = 2 include { DENOISING_MPPCA } from '../../../../../modules/nf-scil/denoising/mppca/main.nf' workflow test_denoising_mppca { - + input = [ [ id:'test', single_end:false ], // meta map file(params.test_data['denoising']['mppca']['dwi'], checkIfExists: true) diff --git a/tests/modules/nf-scil/denoising/mppca/nextflow.config b/tests/modules/nf-scil/denoising/mppca/nextflow.config index 18a46f7f..90fbc34b 100644 --- a/tests/modules/nf-scil/denoising/mppca/nextflow.config +++ b/tests/modules/nf-scil/denoising/mppca/nextflow.config @@ -5,4 +5,4 @@ process { withNAME: "DENOISING_MPPCA" { ext.extent = 3 } -} \ No newline at end of file +} diff --git a/tests/modules/nf-scil/preproc/gibbs/main.nf b/tests/modules/nf-scil/preproc/gibbs/main.nf index af168027..1f20211b 100644 --- a/tests/modules/nf-scil/preproc/gibbs/main.nf +++ b/tests/modules/nf-scil/preproc/gibbs/main.nf @@ -5,7 +5,7 @@ nextflow.enable.dsl = 2 include { PREPROC_GIBBS } from '../../../../../modules/nf-scil/preproc/gibbs/main.nf' workflow test_preproc_gibbs { - + input = [ [ id:'test', single_end:false ], // meta map file(params.test_data['preproc']['gibbs']['dwi'], checkIfExists: true) diff --git a/tests/modules/nf-scil/preproc/gibbs/nextflow.config b/tests/modules/nf-scil/preproc/gibbs/nextflow.config index 50f50a7a..8730f1c4 100644 --- a/tests/modules/nf-scil/preproc/gibbs/nextflow.config +++ b/tests/modules/nf-scil/preproc/gibbs/nextflow.config @@ -1,5 +1,5 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} \ No newline at end of file + +} diff --git a/tests/modules/nf-scil/preproc/n4/main.nf b/tests/modules/nf-scil/preproc/n4/main.nf index 1c3cea0e..1c86a0d8 100644 --- a/tests/modules/nf-scil/preproc/n4/main.nf +++ b/tests/modules/nf-scil/preproc/n4/main.nf @@ -5,7 +5,7 @@ nextflow.enable.dsl = 2 include { PREPROC_N4 } from '../../../../../modules/nf-scil/preproc/n4/main.nf' workflow test_preproc_n4 { - + input = [ [ id:'test', single_end:false ], // meta map file(params.test_data['preproc']['n4']['dwi'], checkIfExists: true), diff --git a/tests/modules/nf-scil/reconst/dtimetrics/main.nf b/tests/modules/nf-scil/reconst/dtimetrics/main.nf index 737ffd89..2bb4c4c2 100644 --- a/tests/modules/nf-scil/reconst/dtimetrics/main.nf +++ b/tests/modules/nf-scil/reconst/dtimetrics/main.nf @@ -5,7 +5,7 @@ nextflow.enable.dsl = 2 include { RECONST_DTIMETRICS } from '../../../../../modules/nf-scil/reconst/dtimetrics/main.nf' workflow test_reconst_dtimetrics { - + input = [ [ id:'test', single_end:false ], // meta map file(params.test_data['reconst']['dtimetrics']['dwi'], checkIfExists: true), @@ -18,7 +18,7 @@ workflow test_reconst_dtimetrics { } workflow test_reconst_dtimetrics_with_b0mask { - + input = [ [ id:'test', single_end:false ], // meta map file(params.test_data['reconst']['dtimetrics']['dwi'], checkIfExists: true), @@ -28,4 +28,4 @@ workflow test_reconst_dtimetrics_with_b0mask { ] RECONST_DTIMETRICS ( input ) -} \ No newline at end of file +} diff --git a/tests/modules/nf-scil/reconst/fodf/main.nf b/tests/modules/nf-scil/reconst/fodf/main.nf index 10333cde..99dc5da3 100644 --- a/tests/modules/nf-scil/reconst/fodf/main.nf +++ b/tests/modules/nf-scil/reconst/fodf/main.nf @@ -66,4 +66,4 @@ workflow test_reconst_fodf_no_mask { ]} RECONST_FODF ( input_no_mask ) -} \ No newline at end of file +} diff --git a/tests/modules/nf-scil/reconst/frf/main.nf b/tests/modules/nf-scil/reconst/frf/main.nf index e6ca9e4a..9714a520 100644 --- a/tests/modules/nf-scil/reconst/frf/main.nf +++ b/tests/modules/nf-scil/reconst/frf/main.nf @@ -5,7 +5,7 @@ nextflow.enable.dsl = 2 include { RECONST_FRF } from '../../../../../modules/nf-scil/reconst/frf/main.nf' workflow test_reconst_frf { - + input = [ [ id:'test', single_end:false ], // meta map file(params.test_data['reconst']['frf']['dwi'], checkIfExists: true), @@ -18,7 +18,7 @@ workflow test_reconst_frf { } workflow test_reconst_frf_nomask { - + input = [ [ id:'test', single_end:false ], // meta map file(params.test_data['reconst']['frf']['dwi'], checkIfExists: true), @@ -31,7 +31,7 @@ workflow test_reconst_frf_nomask { } workflow test_reconst_frf_set_frf { - + input = [ [ id:'test', single_end:false ], // meta map file(params.test_data['reconst']['frf']['dwi'], checkIfExists: true), @@ -44,7 +44,7 @@ workflow test_reconst_frf_set_frf { } workflow test_reconst_frf_set_frf_nomask { - + input = [ [ id:'test', single_end:false ], // meta map file(params.test_data['reconst']['frf']['dwi'], checkIfExists: true), @@ -54,4 +54,4 @@ workflow test_reconst_frf_set_frf_nomask { ] RECONST_FRF ( input ) -} \ No newline at end of file +} diff --git a/tests/modules/nf-scil/segmentation/fastseg/main.nf b/tests/modules/nf-scil/segmentation/fastseg/main.nf index 0ce2c632..fc65e1ad 100644 --- a/tests/modules/nf-scil/segmentation/fastseg/main.nf +++ b/tests/modules/nf-scil/segmentation/fastseg/main.nf @@ -5,7 +5,7 @@ nextflow.enable.dsl = 2 include { SEGMENTATION_FASTSEG } from '../../../../../modules/nf-scil/segmentation/fastseg/main.nf' workflow test_segmentation_fastseg { - + input = [ [ id:'test', single_end:false ], // meta map file(params.test_data['segmentation']['fastseg']['image'], checkIfExists: true) diff --git a/tests/modules/nf-scil/segmentation/freesurferseg/main.nf b/tests/modules/nf-scil/segmentation/freesurferseg/main.nf index f12f8182..9c6a343a 100644 --- a/tests/modules/nf-scil/segmentation/freesurferseg/main.nf +++ b/tests/modules/nf-scil/segmentation/freesurferseg/main.nf @@ -5,7 +5,7 @@ nextflow.enable.dsl = 2 include { SEGMENTATION_FREESURFERSEG } from '../../../../../modules/nf-scil/segmentation/freesurferseg/main.nf' workflow test_segmentation_freesurferseg { - + input = [ [ id:'test', single_end:false ], // meta map file(params.test_data['segmentation']['freesurferseg']['aparc_aseg'], checkIfExists: true), diff --git a/tests/modules/nf-scil/tracking/localtracking/main.nf b/tests/modules/nf-scil/tracking/localtracking/main.nf index fcaa0d4a..00e0ccb7 100644 --- a/tests/modules/nf-scil/tracking/localtracking/main.nf +++ b/tests/modules/nf-scil/tracking/localtracking/main.nf @@ -3,7 +3,7 @@ nextflow.enable.dsl = 2 include { LOAD_TEST_DATA } from '../../../../../subworkflows/nf-scil/load_test_data/main.nf' -include { +include { TRACKING_LOCALTRACKING as WM_TRACKING; TRACKING_LOCALTRACKING as FA_TRACKING; } from '../../../../../modules/nf-scil/tracking/localtracking/main.nf' @@ -12,7 +12,7 @@ workflow test_tracking_localtracking_wm { input_fetch = Channel.from( [ "tracking.zip" ] ) LOAD_TEST_DATA ( input_fetch, "test.load-test-data" ) - + input_wm = LOAD_TEST_DATA.out.test_data_directory .map{ test_data_directory -> [ [ id:'test', single_end:false ], // meta map diff --git a/tests/modules/nf-scil/tracking/pfttracking/main.nf b/tests/modules/nf-scil/tracking/pfttracking/main.nf index 5aebea4f..d5f24708 100644 --- a/tests/modules/nf-scil/tracking/pfttracking/main.nf +++ b/tests/modules/nf-scil/tracking/pfttracking/main.nf @@ -3,7 +3,7 @@ nextflow.enable.dsl = 2 include { LOAD_TEST_DATA } from '../../../../../subworkflows/nf-scil/load_test_data/main.nf' -include { +include { TRACKING_PFTTRACKING as WM_TRACKING; TRACKING_PFTTRACKING as FA_TRACKING; TRACKING_PFTTRACKING as INTERFACE_TRACKING; } from '../../../../../modules/nf-scil/tracking/pfttracking/main.nf' @@ -50,7 +50,7 @@ workflow test_tracking_pfttracking_fa { workflow test_tracking_pfttracking_interface { - + input_fetch = Channel.from( [ "tracking.zip" ] ) LOAD_TEST_DATA ( input_fetch, "test.load-test-data" ) diff --git a/tests/subworkflows/nf-scil/load_test_data/main.nf b/tests/subworkflows/nf-scil/load_test_data/main.nf index cb58bcc0..b022b518 100644 --- a/tests/subworkflows/nf-scil/load_test_data/main.nf +++ b/tests/subworkflows/nf-scil/load_test_data/main.nf @@ -5,7 +5,7 @@ nextflow.enable.dsl = 2 include { LOAD_TEST_DATA } from '../../../../subworkflows/nf-scil/load_test_data/main.nf' workflow test_load_test_data { - + input = Channel.from( [ "bids_json.zip", "plot.zip", "stats.zip" ] ) LOAD_TEST_DATA ( input, "test.load-test-data" )