Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to use tractoflow subworkflow #2

Open
wants to merge 29 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
fa3b433
Template update for nf-core/tools version 3.2.0
AlexVCaron Feb 5, 2025
e833a10
recreate schema
AlexVCaron Feb 5, 2025
0039b42
first upgrade round
AlexVCaron Feb 6, 2025
33a152a
second round
AlexVCaron Feb 6, 2025
6781752
update naming to conventions
AlexVCaron Feb 7, 2025
667f69c
fix lint
AlexVCaron Feb 7, 2025
81565ca
fix not supposed to change
AlexVCaron Feb 7, 2025
ebabbe1
fix errors
AlexVCaron Feb 7, 2025
1d62ea9
remove local bounds on resources (i guess they are handled somewhere …
AlexVCaron Feb 7, 2025
f25ac8b
working basic test. reconst_frf cache still fails after reconst_fodf
AlexVCaron Feb 17, 2025
7b4bf18
implement tests and fix config and scheme
AlexVCaron Feb 26, 2025
a93757e
pft tracking fix to restore cache
AlexVCaron Feb 26, 2025
614f8fc
fix template
AlexVCaron Mar 14, 2025
9b45ba1
trailing whitespace
AlexVCaron Mar 14, 2025
47df54b
install and run prettier
AlexVCaron Mar 17, 2025
e1547ec
first lint fix
AlexVCaron Mar 17, 2025
987d61d
fix warnings
AlexVCaron Mar 17, 2025
eff4e9d
fix missing validation fields in config
AlexVCaron Mar 17, 2025
1423e75
upate usage and methods description
AlexVCaron Mar 17, 2025
390001d
fix editorconfig config
AlexVCaron Mar 17, 2025
19042e9
run prettier
AlexVCaron Mar 17, 2025
3e50c95
add registration template to repo
AlexVCaron Mar 17, 2025
8351bcd
editorconfig fix
AlexVCaron Mar 17, 2025
3dd57cc
update modules and subworkflows
AlexVCaron Mar 18, 2025
dbfea66
update pipeline with new IO_BID subworkflow
AlexVCaron Mar 18, 2025
b32370c
remove bids samplesheet documentation. Update usage
AlexVCaron Mar 18, 2025
6eaedb6
fix input schema
AlexVCaron Mar 18, 2025
069602d
faster test plus ignore experimental runs fails on github
AlexVCaron Mar 18, 2025
5dc4d3c
fix publish dir
AlexVCaron Mar 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 9 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
"image": "nfcore/gitpod:latest",
"remoteUser": "gitpod",
"runArgs": ["--privileged"],

"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
},
"containerEnv": {
"NFCORE_MODULES_GIT_REMOTE": "https://github.com/scilus/nf-neuro.git",
"NFCORE_MODULES_BRANCH": "main",
"NFCORE_SUBWORKFLOWS_GIT_REMOTE": "https://github.com/scilus/nf-neuro.git",
"NFCORE_SUBWORKFLOWS_BRANCH": "main"
},
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
Expand Down
18 changes: 16 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,27 @@ indent_style = space
indent_size = 2

# These files are edited and tested upstream in nf-core/modules
[/modules/nf-core/**]
[modules/nf-core/**]
charset = unset
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
[/subworkflows/nf-core/**]
[subworkflows/nf-core/**]
charset = unset
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset

# Same for nf-neuro
[modules/nf-neuro/**]
charset = unset
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
[subworkflows/nf-neuro/**]
charset = unset
end_of_line = unset
insert_final_newline = unset
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ jobs:
# Only run on push if this is the nf-core dev branch (merged PRs)
if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'scilus/nf-tractoflow') }}"
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: true
matrix:
NXF_VER:
- "24.04.2"
Expand All @@ -37,6 +39,10 @@ jobs:
- "test"
isMaster:
- ${{ github.base_ref == 'master' }}
include:
- experimental: false
- experimental: true
NXF_VER: "latest-everything"
# Exclude conda and singularity on dev
exclude:
- isMaster: false
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ testing/
testing*
*.pyc
null/
node_modules/
venv/
4 changes: 4 additions & 0 deletions .nf-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ lint:
- .github/workflows/awstest.yml
- .github/workflows/awsfulltest.yml
- conf/igenomes.config
- conf/igenomes_ignored.config
files_unchanged:
- CODE_OF_CONDUCT.md
- assets/nf-core-tractoflow_logo_light.png
Expand All @@ -19,6 +20,9 @@ lint:
nextflow_config:
- manifest.name
- manifest.homePage
schema_lint: false
schema_params: false
schema_description: false
nf_core_version: 3.2.0
repository_type: pipeline
template:
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
email_template.html
adaptivecard.json
slackreport.json
.nextflow*
work/
data/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Now, you can run the pipeline using:
```bash
nextflow run scilus/nf-tractoflow \
-profile <docker/singularity/.../institute> \
--input samplesheet.csv \
<--input|--bids> samplesheet.csv \
--outdir <OUTDIR>
```

Expand Down
7 changes: 3 additions & 4 deletions assets/adaptivecard.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"contentType": "application/vnd.microsoft.card.adaptive",
"contentUrl": null,
"content": {
"\$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"msteams": {
"width": "Full"
},
Expand Down Expand Up @@ -50,12 +50,11 @@
"title": "Pipeline Configuration",
"card": {
"type": "AdaptiveCard",
"\$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"body": [
{
"type": "FactSet",
"facts": [<% out << summary.collect{ k,v -> "{\"title\": \"$k\", \"value\" : \"$v\"}"}.join(",\n") %>
]
"facts": []
}
]
}
Expand Down
7 changes: 2 additions & 5 deletions assets/methods_description_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,17 @@ description: "Suggested text and references to use when describing pipeline usag
section_name: "scilus/nf-tractoflow Methods Description"
section_href: "https://github.com/scilus/nf-tractoflow"
plot_type: "html"
## TODO nf-core: Update the HTML below to your preferred methods description, e.g. add publication citation for this pipeline
## You inject any metadata in the Nextflow '${workflow}' object
data: |
<h4>Methods</h4>
<p>Data was processed using scilus/nf-tractoflow v${workflow.manifest.version} ${doi_text} of the nf-core collection of workflows (<a href="https://doi.org/10.1038/s41587-020-0439-x">Ewels <em>et al.</em>, 2020</a>), utilising reproducible software environments from the Bioconda (<a href="https://doi.org/10.1038/s41592-018-0046-7">Grüning <em>et al.</em>, 2018</a>) and Biocontainers (<a href="https://doi.org/10.1093/bioinformatics/btx192">da Veiga Leprevost <em>et al.</em>, 2017</a>) projects.</p>
<p>Data was processed using scilus/nf-tractoflow v${workflow.manifest.version} ${doi_text} of the nf-neuro collection of workflows, part of nf-core (<a href="https://doi.org/10.1038/s41587-020-0439-x">Ewels <em>et al.</em>, 2020</a>).</p>
<p>The pipeline was executed with Nextflow v${workflow.nextflow.version} (<a href="https://doi.org/10.1038/nbt.3820">Di Tommaso <em>et al.</em>, 2017</a>) with the following command:</p>
<pre><code>${workflow.commandLine}</code></pre>
<p>${tool_citations}</p>
<h4>References</h4>
<ul>
<li>Di Tommaso, P., Chatzou, M., Floden, E. W., Barja, P. P., Palumbo, E., & Notredame, C. (2017). Nextflow enables reproducible computational workflows. Nature Biotechnology, 35(4), 316-319. doi: <a href="https://doi.org/10.1038/nbt.3820">10.1038/nbt.3820</a></li>
<li>Ewels, P. A., Peltzer, A., Fillinger, S., Patel, H., Alneberg, J., Wilm, A., Garcia, M. U., Di Tommaso, P., & Nahnsen, S. (2020). The nf-core framework for community-curated bioinformatics pipelines. Nature Biotechnology, 38(3), 276-278. doi: <a href="https://doi.org/10.1038/s41587-020-0439-x">10.1038/s41587-020-0439-x</a></li>
<li>Grüning, B., Dale, R., Sjödin, A., Chapman, B. A., Rowe, J., Tomkins-Tinch, C. H., Valieris, R., Köster, J., & Bioconda Team. (2018). Bioconda: sustainable and comprehensive software distribution for the life sciences. Nature Methods, 15(7), 475–476. doi: <a href="https://doi.org/10.1038/s41592-018-0046-7">10.1038/s41592-018-0046-7</a></li>
<li>da Veiga Leprevost, F., Grüning, B. A., Alves Aflitos, S., Röst, H. L., Uszkoreit, J., Barsnes, H., Vaudel, M., Moreno, P., Gatto, L., Weber, J., Bai, M., Jimenez, R. C., Sachsenberg, T., Pfeuffer, J., Vera Alvarez, R., Griss, J., Nesvizhskii, A. I., & Perez-Riverol, Y. (2017). BioContainers: an open-source and community-driven framework for software standardization. Bioinformatics (Oxford, England), 33(16), 2580–2582. doi: <a href="https://doi.org/10.1093/bioinformatics/btx192">10.1093/bioinformatics/btx192</a></li>
<li>Valcourt Caron, A., Boré, A., Edde, M., Gagnon, A., Thoumyre, S., Royer, A., Rheault, F., & Descoteaux, M. (2025). nf-neuro: developing maintainable pipelines for seamless processing of diffusion MRI. ISMRM 2025 Diffusion Workshop proceedings.</li>
${tool_bibliography}
</ul>
<div class="alert alert-info">
Expand Down
Binary file added assets/nf-core-nf-tractoflow_logo_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions assets/samplesheet_raw.csv → assets/samplesheet.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
subject,dwi,bval,bvec,sbref,rev_dwi,rev_bval,rev_bvec,rev_sbref,t1,wmparc,aparc_aseg
sub-01,/path/to/sub-01/dwi.nii.gz,/path/to/sub-01/dwi.bval,/path/to/sub-01/dwi.bvec,/path/to/sub-01/sbref.nii.gz,/path/to/sub-01/rev_dwi.nii.gz,/path/to/sub-01/rev_dwi.bval,/path/to/sub-01/rev_dwi.bvec,/path/to/sub-01/rev_sbref.nii.gz,/path/to/sub-01/t1.nii.gz,/path/to/sub-01/wmparc.nii.gz,/path/to/sub-01/aparc_aseg.nii.gz
sub-02,/path/to/sub-02/dwi.nii.gz,/path/to/sub-02/dwi.bval,/path/to/sub-02/dwi.bvec,,,,,/path/to/sub-02/rev_sbref.nii.gz,/path/to/sub-02/t1.nii.gz,,
sub-03,/path/to/sub-03/dwi.nii.gz,/path/to/sub-03/dwi.bval,/path/to/sub-03/dwi.bvec,,/path/to/sub-03/rev_dwi.nii.gz,/path/to/sub-03/rev_dwi.bval,/path/to/sub-03/rev_dwi.bvec,,/path/to/sub-03/t1.nii.gz,,
subject,dwi,bval,bvec,sbref,rev_dwi,rev_bval,rev_bvec,rev_sbref,t1,wmparc,aparc_aseg,lesion
sub-01,/path/to/sub-01/dwi.nii.gz,/path/to/sub-01/dwi.bval,/path/to/sub-01/dwi.bvec,/path/to/sub-01/sbref.nii.gz,/path/to/sub-01/rev_dwi.nii.gz,/path/to/sub-01/rev_dwi.bval,/path/to/sub-01/rev_dwi.bvec,/path/to/sub-01/rev_sbref.nii.gz,/path/to/sub-01/t1.nii.gz,/path/to/sub-01/wmparc.nii.gz,/path/to/sub-01/aparc_aseg.nii.gz,lesion.nii.gz
sub-02,/path/to/sub-02/dwi.nii.gz,/path/to/sub-02/dwi.bval,/path/to/sub-02/dwi.bvec,,,,,/path/to/sub-02/rev_sbref.nii.gz,/path/to/sub-02/t1.nii.gz,,,
sub-03,/path/to/sub-03/dwi.nii.gz,/path/to/sub-03/dwi.bval,/path/to/sub-03/dwi.bvec,,/path/to/sub-03/rev_dwi.nii.gz,/path/to/sub-03/rev_dwi.bval,/path/to/sub-03/rev_dwi.bvec,,/path/to/sub-03/t1.nii.gz,,,
4 changes: 0 additions & 4 deletions assets/samplesheet_bids.csv

This file was deleted.

42 changes: 0 additions & 42 deletions assets/schema_bids_input.json

This file was deleted.

21 changes: 18 additions & 3 deletions assets/schema_raw_input.json → assets/schema_input.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://raw.githubusercontent.com/AlexVCaron/nf-tractoflow/master/assets/schema_raw_input.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/scilus/nf-tractoflow/master/assets/schema_input.json",
"title": "nf-tractoflow pipeline - params.input schema",
"description": "Schema for the file provided with params.input",
"type": "array",
"items": {
"type": "object",
"minProperties": 5,
"maxProperties": 12,
"maxProperties": 13,
"properties": {
"subject": {
"type": "string",
Expand Down Expand Up @@ -179,6 +179,21 @@
}
],
"errorMessage": "Segmentation of the cortical parcellation in Nifti format, cannot contain spaces and must have extension '.nii' or '.nii.gz'"
},
"lesion": {
"type": "string",
"anyOf": [
{
"format": "file-path",
"exists": true,
"pattern": "^\\S+(\\.nii)?\\.gz$"
},
{
"format": "url",
"mimetype": "application/gzip"
}
],
"errorMessage": "Lesion mask or map in Nifti format, cannot contain spaces and must have extension '.nii' or '.nii.gz'"
}
},
"required": ["subject", "dwi", "bval", "bvec", "t1"]
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion assets/tests/raw_input_test.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
subject,dwi,bval,bvec,sbref,rev_dwi,rev_bval,rev_bvec,rev_sbref,t1,wmparc,aparc_aseg
sub-test-1,https://scil.usherbrooke.ca/scil_test_data/dvc-store/files/md5/2b/6f81ecdee186013956491fbda12e69,https://scil.usherbrooke.ca/scil_test_data/dvc-store/files/md5/25/f1142227475e362e0381b42ec44433,https://scil.usherbrooke.ca/scil_test_data/dvc-store/files/md5/ff/b5454f2212783f65e69b0fd7d242b1,https://scil.usherbrooke.ca/scil_test_data/dvc-store/files/md5/09/442b32c4c459af4ba1b1628c6e2975,,,,,https://scil.usherbrooke.ca/scil_test_data/dvc-store/files/md5/75/a767f8265ca41e497da70c97395057,,
sub-test-1,https://scil.usherbrooke.ca/scil_test_data/dvc-store/files/md5/2b/6f81ecdee186013956491fbda12e69,https://scil.usherbrooke.ca/scil_test_data/dvc-store/files/md5/25/f1142227475e362e0381b42ec44433,https://scil.usherbrooke.ca/scil_test_data/dvc-store/files/md5/ff/b5454f2212783f65e69b0fd7d242b1,https://scil.usherbrooke.ca/scil_test_data/dvc-store/files/md5/09/442b32c4c459af4ba1b1628c6e2975,,,,,https://scil.usherbrooke.ca/scil_test_data/dvc-store/files/md5/75/a767f8265ca41e497da70c97395057,,,
10 changes: 5 additions & 5 deletions conf/base.config
Original file line number Diff line number Diff line change
Expand Up @@ -28,29 +28,29 @@ process {
// See https://www.nextflow.io/docs/latest/config.html#config-process-selectors
withLabel:process_single {
cpus = { 1 }
memory = { 6.GB * task.attempt }
memory = { 4.GB * task.attempt }
time = { 4.h * task.attempt }
}
withLabel:process_low {
cpus = { 2 * task.attempt }
memory = { 12.GB * task.attempt }
memory = { 4.GB * task.attempt }
time = { 4.h * task.attempt }
}
withLabel:process_medium {
cpus = { 6 * task.attempt }
memory = { 36.GB * task.attempt }
memory = { 8.GB * task.attempt }
time = { 8.h * task.attempt }
}
withLabel:process_high {
cpus = { 12 * task.attempt }
memory = { 72.GB * task.attempt }
memory = { 12.GB * task.attempt }
time = { 16.h * task.attempt }
}
withLabel:process_long {
time = { 20.h * task.attempt }
}
withLabel:process_high_memory {
memory = { 200.GB * task.attempt }
memory = { 16.GB * task.attempt }
}
withLabel:error_ignore {
errorStrategy = 'ignore'
Expand Down
Loading
Loading