Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions modules/nf-neuro/vascular/eicab/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
channels: []
dependencies: []
name: vascular_eicab

47 changes: 47 additions & 0 deletions modules/nf-neuro/vascular/eicab/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@

process VASCULAR_EICAB {
tag "$meta.id"
label 'process_medium'

container "${ 'felixdumais1/eicab:v1.0.1' }"
containerOptions {
(workflow.containerEngine == 'docker') ? '--entrypoint ""' : ''
}

input:
tuple val(meta), path(in_tof)

output:
tuple val(meta), path("*_eicab") , emit: eicabdirectory
tuple val(meta), path("*_eicab/*_eICAB_CW.nii.gz"), emit: eicabcw
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when

script:
def prefix = task.ext.prefix ?: "${meta.id}"
def out_folder = task.ext.out_folder ?: "${prefix}_eicab"
def resolution = task.ext.resolution ?: "0.625"
"""
/vessel_segmentation_snaillab/eICAB.sh -t $in_tof \
-o $out_folder \
-r $resolution

cat <<-END_VERSIONS > versions.yml
"${task.process}":
vessel-segmentation: \$(pip list | grep vessel-segmentation | tr -s ' ' | cut -d' ' -f2)
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
mkdir -p ${prefix}_eicab/

cat <<-END_VERSIONS > versions.yml
"${task.process}":
vessel-segmentation: \$(pip list | grep vessel-segmentation | tr -s ' ' | cut -d' ' -f2)
END_VERSIONS
"""
}
61 changes: 61 additions & 0 deletions modules/nf-neuro/vascular/eicab/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json
name: "vascular_eicab"
description: |
eICAB automatically segments and labels the Internal Carotid Arteries (ICA), Basilar Artery (BA), Anterior Communicating
Artery (AComm), Anterior Cerebral Arteries (ACA), Middle Cerebral Arteries (MCA), Posterior Communicating Arteries (
PComm), Posterior Cerebral Arteries (PCA), Superior Cerebellar Arteries (SCA) and Anterior Choroidal Arteries (AChA).
keywords:
- angiography
- segmentation
- labelling
- vascular
tools:
- "vascular":
homepage: "https://gitlab.com/FelixDumais/vessel_segmentation_snaillab/"
description: "Automated segmentation and labeling of the main intracranial arteries on MR angiography images"
tool_dev_url: "https://gitlab.com/FelixDumais/vessel_segmentation_snaillab/"
doi: "10.1016/j.neuroimage.2022.119425"

input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'test', single_end:false ]`
mandatory: true

- in_tof:
type: file
description: ToF MRA image
pattern: "*.{nii/nii.gz}"
mandatory: true

output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1', single_end:false ]`

- versions:
type: file
description: File containing software versions
pattern: "versions.yml"

- eicabdirectory:
type: directory
description: Sorted BAM/CRAM/SAM file
pattern: "*_eicab"

- eicabcw:
type: file
description: Segmented Circle of Willis (CW) annotated
pattern: "*_eicab_cw.nii.gz"

authors:
- "@arnaudbore"
maintainers:
- "@arnaudbore"
references:
- "eICAB: A novel deep learning pipeline for Circle of Willis multiclass segmentation and analysis"
33 changes: 33 additions & 0 deletions modules/nf-neuro/vascular/eicab/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
nextflow_process {

name "Test Process VASCULAR_EICAB"
script "../main.nf"
process "VASCULAR_EICAB"

tag "modules"
tag "modules_nfcore"
tag "vascular"
tag "vascular/eicab"

test("segmentation - eicab") {
when {
process {
"""
input[0] = [
[ id:'test' ],
[ file("/workspaces/nf-neuro/data/sub-OAS30001_ses-d2430_acq-TOF_angio_resampled.nii.gz") ]
]
"""
}
}
then {
assertAll(
{ assert process.success },
{ assert snapshot(
file(process.out.eicabdirectory.get(0).get(1)).name,
file(process.out.eicabcw.get(0).get(1)).name,
process.out.versions).match()}
)
}
}
}
16 changes: 16 additions & 0 deletions modules/nf-neuro/vascular/eicab/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"segmentation - eicab": {
"content": [
"test_eicab",
"sub-OAS30001_ses-d2430_acq-TOF_angio_resampled_eICAB_CW.nii.gz",
[
"versions.yml:md5,6b433c9a3e91fd2a59ac92510ccee4dd"
]
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "25.04.3"
},
"timestamp": "2025-06-12T02:51:01.189807007"
}
}
2 changes: 2 additions & 0 deletions modules/nf-neuro/vascular/eicab/tests/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
vascular/eicab:
- "modules/nf-neuro/vascular/eicab/**"
Loading
Loading