From 7253a130f16cd814331e6d8710e4a7b9244dca0b Mon Sep 17 00:00:00 2001 From: AlexVCaron Date: Thu, 8 Feb 2024 06:02:53 +0000 Subject: [PATCH 1/6] 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 2/6] 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 3/6] 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 4/6] 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 5/6] 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 6/6] 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]