@@ -18,7 +18,7 @@ primary focus of the library is to provide pre-built processes and processing se
18
18
technologies and made easily available to pipeline's developers through the ` nf-core `
19
19
framework.
20
20
21
- # WHY ? ` nf-neuro `
21
+ # WHY ? ` nf-neuro ` <!-- omit in toc -->
22
22
23
23
** Let's say you develop a pipeline for neuroimaging** . You want to make it the more _ efficient,_
24
24
_ reliable, reproducible_ and also be able to _ evaluate it_ and _ control the quality_ of its outputs.
@@ -30,7 +30,7 @@ closely aligned with [nf-core](), but we'll make you adapt to them slowly as you
30
30
haven't finished complying to all of them ourselves). Using ` nf-neuro ` helps accelerate
31
31
development in ** neuroimaging** and produces better research outcomes for all !
32
32
33
- # Where do I start ?
33
+ # Where do I start ?<!-- omit in toc -->
34
34
35
35
Well, it depends on what you want to do. If you want to :
36
36
@@ -46,7 +46,6 @@ Well, it depends on what you want to do. If you want to :
46
46
47
47
- [ Discovering ` nf-neuro ` ] ( #discovering-nf-neuro )
48
48
- [ Getting info on components from ` nf-neuro ` ] ( #getting-info-on-components-from-nf-neuro )
49
- - [ Using the information from the ` info ` command] ( #using-the-information-from-the-info-command )
50
49
- [ Pipeline creation with ` nf-neuro ` ] ( #pipeline-creation-with-nf-neuro )
51
50
- [ Prototyping using components from ` nf-neuro ` ] ( #prototyping-using-components-from-nf-neuro )
52
51
- [ Porting prototypes to ` nf- ` ready pipelines] ( #porting-prototypes-to-nf--ready-pipelines )
@@ -62,20 +61,46 @@ extensive guidelines to do it in [this guide](./docs/environment/NFCORE.md).
62
61
63
62
## Getting info on components from ` nf-neuro `
64
63
65
- With your environment ready, you can list ` nf-neuro ` modules and subworkflows with :
64
+ With your environment ready, you can list ` nf-neuro ` modules available with a simple command :
66
65
67
66
``` bash
68
67
nf-core modules list remote
68
+ ```
69
+
70
+ <p align =" center " >
71
+ <img src =" docs/images/cli/nfcore_modules_list.png " alt =" nf-core modules list remote " />
72
+ </p > <!-- omit in toc -->
73
+
74
+ The same goes for ` subworkflows ` :
75
+
76
+ ``` bash
69
77
nf-core subworkflows list remote
70
78
```
71
79
72
- To get more information on a module (say ` denoising/nlmeans ` ) or a subworkflow (say ` preproc_t1 ` ), use :
80
+ <p align =" center " >
81
+ <img src =" docs/images/cli/nfcore_subworkflows_list.png " alt =" nf-core subworkflows list remote " />
82
+ </p > <!-- omit in toc -->
83
+
84
+ To get more information on a module (say ` denoising/nlmeans ` ) use :
73
85
74
86
``` bash
75
87
nf-core modules info denoising/nlmeans
88
+ ```
89
+
90
+ <p align =" center " >
91
+ <img src =" docs/images/cli/nfcore_modules_info.png " alt =" nf-core modules info " />
92
+ </p > <!-- omit in toc -->
93
+
94
+ or for a subworkflow (say ` preproc_t1 ` ) :
95
+
96
+ ``` bash
76
97
nf-core subworkflows info preproc_t1
77
98
```
78
99
100
+ <p align =" center " >
101
+ <img src =" docs/images/cli/nfcore_subworkflows_info.png " alt =" nf-core subworkflows info " />
102
+ </p > <!-- omit in toc -->
103
+
79
104
> [ !NOTE]
80
105
> Additionally, ` VS Code ` users can install the [ nextflow extension] ( https://marketplace.visualstudio.com/items?itemName=nextflow.nextflow ) ,
81
106
> which contains a language server that helps you in real time when coding. It gives you useful tooltips on modules inputs and outputs, commands
@@ -86,101 +111,7 @@ nf-core subworkflows info preproc_t1
86
111
> description of modules and workflows prescribed by ` nf-core ` and shown below. Thus, we highly recommend its use.
87
112
88
113
You'll get a good description of the modules's or subworkflow's ` behavior ` and ` dependencies ` , as well as a
89
- thorough description of its ` inputs ` and ` outputs ` . To use them in your own pipeline, you need first to
90
- install them locally :
91
-
92
- ``` bash
93
- nf-core modules install denoising/nlmeans
94
- nf-core subworkflows install preproc_t1
95
- ```
96
-
97
- > [ !WARNING]
98
- > You need to be at the root of your ` pipeline directory ` when calling this command ! ` nf-core ` installs
99
- > locally to your pipeline's ` modules ` and ` subworkflows ` , not in a special hidden place !
100
-
101
- > [ !NOTE]
102
- > On the first run of the ` install ` command, select ` pipeline ` as an install setup. The interactive prompt
103
- > will also ask you to create multiple files and directories. Say yes to everything !
104
-
105
- > [ !IMPORTANT]
106
- > The installation procedure will provide you an ` include ` line to add to your pipeline's ` main.nf `
107
- > file, which will import the module or subworkflow at runtime.
108
-
109
- ### Using the information from the ` info ` command
110
-
111
- For a ` module ` , the list of ` inputs ` tell you the content to provide in ` a single channel ` , usually
112
- as a list of lists, each starting with a ` meta ` , a map ` [:] ` of metadata containing a mandatory ` id ` :
113
-
114
- ``` nextflow
115
- // Example for denoising/nlmeans
116
- input = Channel.of( [
117
- [ [id: "sub-1"], file("image1.nii.gz"), file("mask1.nii.gz") ],
118
- [ [id: "sub-2"], file("image2.nii.gz"), file("mask2.nii.gz") ]
119
- ] )
120
-
121
- DENOSING_NLMEANS( input )
122
- ```
123
-
124
- > [ !WARNING]
125
- > There are some exceptions here, due to limitations in current ` nf-core ` tools and standards.
126
- >
127
- > 1 . some inputs could be associated to different channels. It's almost never the case, but it happens.
128
- > We are working hard at changing the behavior of those modules, and at improving the metadata to
129
- > help you better. For now, please refer to their implementation in the ` modules/nf-neuro/ `
130
- > directory as well, through the ` main.nf ` file, or given by the ` nextflow language server tooltips ` .
131
-
132
- For the ` module's ` list of ` outputs ` , each corresponds to its own ` named channel ` :
133
-
134
- ``` nextflow
135
- // Example for denoising/nlmeans
136
- DENOISING_NLMEANS.out.image.view() // [ [ [id: "sub-1"], "sub-1_denoised.nii.gz" ],
137
- // [ [id: "sub-2"], "sub-2_denoised.nii.gz" ] ]
138
- DENOISING_NLMEANS.out.versions.first().view() // [ "versions.yml" ]
139
- ```
140
-
141
- > [ !WARNING]
142
- > There are some exceptions here, due to limitations in current ` nf-core ` tools and standards.
143
- >
144
- > 1 . ` meta ` output ** is not a channel** but accompanies all files, produced by other channels.
145
- > 2 . ` versions ` is a channel, but its output is not accompanied by ` meta `
146
- > 3 . Some other outputs are not accompanied by ` meta ` also. We are currently improving the metadata
147
- > files to make it apparent. For now, please refer to their implementation in the ` modules/nf-neuro/ `
148
- > directory, through the ` main.nf ` file.
149
-
150
- For ` subworkflows ` there are no exceptions, nor differences between ` inputs ` and ` outputs ` ; they are all
151
- ` named channels ` . Each comes with a ` Structure ` description, telling you the content to put in the ` list of lists ` .
152
- For ` preproc_t1 ` , a simple example would be :
153
-
154
- ``` nextflow
155
- ch_image = Channel.of( [
156
- [ [id: "sub-1"], file("image1.nii.gz") ],
157
- [ [id: "sub-2"], file("image2.nii.gz") ]
158
- ] )
159
-
160
- ch_template = Channel
161
- .of( [ [id: "sub-1"], [id: "sub-2"] ] )
162
- .combine( [ file("template.nii.gz") ] )
163
- .view() // [ [ [id: "sub-1"], "template.nii.gz" ],
164
- // [ [id: "sub-2"], "template.nii.gz" ] ]
165
-
166
- ch_probability_map = Channel
167
- .of( [ [id: "sub-1"], [id: "sub-2"] ] )
168
- .combine( [ file("probmap.nii.gz") ] )
169
- .view() // [ [ [id: "sub-1"], "probmap.nii.gz" ],
170
- // [ [id: "sub-2"], "probmap.nii.gz" ] ]
171
-
172
- PREPROC_T1(
173
- ch_image
174
- ch_template,
175
- ch_probability_map
176
- )
177
-
178
- PREPROC_T1.out.t1_final.view() // [ [ [id: "sub-1"], "sub-1_t1_cropped.nii.gz" ],
179
- // [ [id: "sub-2"], "sub-2_t1_cropped.nii.gz" ] ]
180
- PREPROC_T1.out.mask_final.view() // [ [ [id: "sub-1"], "sub-1_t1_mask_cropped.nii.gz" ],
181
- // [ [id: "sub-2"], "sub-2_t1_mask_cropped.nii.gz" ] ]
182
- PREPROC_T1.out.versions.first().view() // [ "versions.yml" ]
183
- ```
114
+ thorough description of its ` inputs ` and ` outputs ` .
184
115
185
116
# Pipeline creation with ` nf-neuro `
186
117
0 commit comments