-
Notifications
You must be signed in to change notification settings - Fork 1
Invivo #41
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
Merged
Merged
Invivo #41
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
c1ed83f
[WIP] creation module BET for invivo
EliseCos 3e12138
[WIP] add .config + docker
EliseCos 75ab998
[WIP] add new container
EliseCos 9fe23f3
[ENH] update container
EliseCos a0c8cb0
[WIP] add subworkflow BET for in vivo
EliseCos fffc8fd
[ENH] adapt to masks from different sources
EliseCos 71408e5
[ENH] correct main.nf + .config
EliseCos f45747a
fix module b0
EliseCos d41513f
Merge branch 'main' into invivo
EliseCos 58e76b2
remove docker files
EliseCos c63eb8f
restore dockerfile
EliseCos ba4bce2
remove mask nnunet
EliseCos 4b9d7ac
Delete subworkflows/.DS_Store
EliseCos d341d41
add .gitignore file
EliseCos c0f546e
fix output registration
EliseCos 1d2a6af
Answer Arnaud's comments
EliseCos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| .DS_Store |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| channels: [] | ||
| dependencies: [] | ||
| name: "mouse_bet" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| process MOUSE_BRAINEXTRACTION { | ||
| tag "$meta.id" | ||
| label 'process_high' | ||
|
|
||
| container "scilus/antspynet:dev" | ||
|
|
||
| input: | ||
| tuple val(meta), path(anat) | ||
| output: | ||
| tuple val(meta), path("*__mask.nii.gz") , emit: mask | ||
| path "versions.yml" , emit: versions | ||
|
|
||
| when: | ||
| task.ext.when == null || task.ext.when | ||
|
|
||
| script: | ||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||
|
|
||
| """ | ||
| antsMouseBrainExtraction $anat ${prefix}__mask.nii.gz | ||
|
|
||
| cat <<-END_VERSIONS > versions.yml | ||
| "${task.process}": | ||
| ants: \$(antsMouseBrainExtraction --version 2>&1 | sed -n 's/ANTs Version: v\\([0-9.]\\+\\)/\\1/p') | ||
| END_VERSIONS | ||
| """ | ||
|
|
||
| stub: | ||
| """ | ||
| antsMouseBrainExtraction -h | ||
|
|
||
| cat <<-END_VERSIONS > versions.yml | ||
| "${task.process}": | ||
| ants: \$(antsMouseBrainExtraction --version 2>&1 | sed -n 's/ANTs Version: v\\([0-9.]\\+\\)/\\1/p') | ||
| END_VERSIONS | ||
| """ | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| --- | ||
| # yaml-language-server: $schema=https://raw.githubusercontent.com/scilus/nf-neuro/main/modules/meta-schema.json | ||
| name: "brainextraction" | ||
| description: Extraction of the brain from anatomical images using BET | ||
| keywords: | ||
| - BET | ||
| - T1 | ||
| tools: | ||
| - "scilpy": | ||
| description: "The Sherbrooke Connectivity Imaging Lab (SCIL) Python dMRI processing toolbox." | ||
| homepage: "https://github.com/scilus/scilpy.git" | ||
| - "FSL": | ||
| description: "FSL Toolbox and Scilpy Toolbox" | ||
| homepage: "https://fsl.fmrib.ox.ac.uk/fsl/fslwiki" | ||
| input: | ||
| # Only when we have meta | ||
| - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. `[ id:'test', single_end:false ]` | ||
|
|
||
| - anat: | ||
| type: file | ||
| description: Anat Nifti image | ||
| pattern: "*.{nii,nii.gz}" | ||
|
|
||
|
|
||
| output: | ||
| #Only when we have meta | ||
| - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. `[ id:'test', single_end:false ]` | ||
|
|
||
| - mask: | ||
| type: file | ||
| description: mask brain-extracted | ||
| pattern: "*__mask.{nii,nii.gz}" | ||
|
|
||
|
|
||
| authors: | ||
| - "@EliseCos" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| channels: [] | ||
| dependencies: [] | ||
| name: "mouse_convertbet" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| process MOUSE_CONVERTBET { | ||
| tag "$meta.id" | ||
| label 'process_low' | ||
|
|
||
| container "scilus/scilus:2.2.0" | ||
|
|
||
| input: | ||
| tuple val(meta), path(image) | ||
| output: | ||
| tuple val(meta), path("*_mask.nii.gz") , emit: mask | ||
| path "versions.yml" , emit: versions | ||
|
|
||
| when: | ||
| task.ext.when == null || task.ext.when | ||
|
|
||
| script: | ||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||
| def nb_vox = task.ext.nb_vox ?: "" | ||
| """ | ||
| fslmaths ${image} -bin ${prefix}_mask.nii.gz | ||
|
|
||
| scil_volume_math erosion ${prefix}_mask.nii.gz $nb_vox ${prefix}_mask.nii.gz --data_type uint8 -f | ||
| ImageMath 3 ${prefix}_mask.nii.gz GetLargestComponent ${prefix}_mask.nii.gz | ||
| scil_volume_math dilation ${prefix}_mask.nii.gz $nb_vox ${prefix}_mask.nii.gz --data_type uint8 -f | ||
| ImageMath 3 ${prefix}_mask.nii.gz FillHoles ${prefix}_mask.nii.gz | ||
|
|
||
| cat <<-END_VERSIONS > versions.yml | ||
| "${task.process}": | ||
| scilpy: \$(uv -q -n pip list | grep scilpy | tr -s ' ' | cut -d' ' -f2) | ||
| fsl: \$(flirt -version 2>&1 | sed -n 's/FLIRT version \\([0-9.]\\+\\)/\\1/p') | ||
| ants: \$(ImageMath --version 2>&1 | sed -n 's/ANTs Version: v\\([0-9.]\\+\\)/\\1/p') | ||
| END_VERSIONS | ||
| """ | ||
|
|
||
| stub: | ||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||
| """ | ||
| fslmaths | ||
| scil_volume_math -h | ||
| ImageMath | ||
|
|
||
| touch ${prefix}_mask.nii.gz | ||
|
|
||
| cat <<-END_VERSIONS > versions.yml | ||
| "${task.process}": | ||
| scilpy: \$(uv pip -q -n list | grep scilpy | tr -s ' ' | cut -d' ' -f2) | ||
| fsl: \$(flirt -version 2>&1 | sed -n 's/FLIRT version \\([0-9.]\\+\\)/\\1/p') | ||
| ants: \$(ImageMath --version 2>&1 | sed -n 's/ANTs Version: v\\([0-9.]\\+\\)/\\1/p') | ||
| END_VERSIONS | ||
| """ | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| --- | ||
| # yaml-language-server: $schema=https://raw.githubusercontent.com/scilus/nf-neuro/main/modules/meta-schema.json | ||
| name: "mouse_convertjson" | ||
| description: Convert stats to JSON | ||
| keywords: | ||
| - stats | ||
| - convert | ||
| tools: | ||
| - "scilpy": | ||
| description: "The Sherbrooke Connectivity Imaging Lab (SCIL) Python dMRI processing toolbox." | ||
| homepage: "https://github.com/scilus/scilpy.git" | ||
| input: | ||
| # Only when we have meta | ||
| - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. `[ id:'test', single_end:false ]` | ||
|
|
||
| - stats: | ||
| type: list | ||
| description: DWI Nifti image | ||
| pattern: "*.{nii,nii.gz}" | ||
|
|
||
| output: | ||
| #Only when we have meta | ||
| - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. `[ id:'test', single_end:false ]` | ||
|
|
||
| - stats_json: | ||
| type: file | ||
| description: File with stats | ||
| pattern: "stats_reorganized.json" | ||
|
|
||
| - versions: | ||
| type: file | ||
| description: File containing software versions | ||
| pattern: "versions.yml" | ||
|
|
||
| authors: | ||
| - "@EliseCos" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| channels: [] | ||
| dependencies: [] | ||
| name: "mouse_preparebet" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing ants