Subworkflow initialization
This tutorial series focusing on the contribution of a subworkflow to nf-neuro. In it, you will create a subworkflow from anatomical MRI preprocessing, using components already implemented in nf-neuro for denoising, brain extraction, intensity normalization and segmentation.
First steps
Section titled “First steps”[Skip if working in the devcontainer] If not done already, clone the nf-neuro repository locally and navigate to it :
git clone https://github.com/nf-neuro/modules.gitcd nf-neuroCreate a new branch for your subworkflow. To help you and maintainers track changes, use the convention subworkflow/<category>_<tool>
for the branch name (we’ll use : subworkflow/preproc_anat) :
git checkout -b subworkflow/preproc_anatGenerate the template
Section titled “Generate the template”Open a terminal (with access to the nf-core command). Use cd to move to the location of the nf-neuro repository
and generate the subworkflow’s skeleton :
nf-core subworkflows createAnswer the prompts using the information below :
- Name of subworkflow :
preproc_anat. - Github author : your Github handle (prefixed with
@), or@scilusif you prefer no accreditation.
Alternatively, you can use the following command to supply all information :
nf-core subworkflows create --author @scilus preproc_anatThe command will generate your new subworkflow template in the subworkflows/nf-neuro/preproc_anat/ directory. Navigate to it and familiarize yourself with the various files generated. After that, switch to the next section of the tutorial and proceed to edit the main.nf file.