For the record.
In NextFlow 0.16.2 the profile option is available in the workflow.profile property (thanks Paolo). This allows a process to pick a profile specific template as follows:
In nextflow.config:
process {
command = {
"${workflow.profile}/${task.process}"
}
}
In the templates folder save scripts in subfolder that matches the profile name. So, you should at least keep your templates in templates/standard. The template name should have the same name as your process, eg. templates/standard/process1
Define the template in your pipeline as such:
process process1 {
input:
...
output:
...
shell:
template(task.command)
}
So, for a profile my_custom_profile, simply create the templates/my_custom_profile folder and save the profile specific templates in there. Create links to the standard ones in case they are not different.
Cheers,
Marc