workflow {
if (params.exomiser) {
output_exomiser.mkdirs()
output_exomiser_settings.mkdirs()
appsetting_exomiser = file(params.exomiser_appsettings)
hpo_file_exomiser = file(params.HPO)
input_file_exomiser = file(params.exomiser_input)
exomiser_template = file(params.exomiser_template)
configure_exomiser(exomiser_template, input_file_exomiser, hpo_file_exomiser)
exomiser(configure_exomiser.out, appsetting_exomiser)
}
}
process configure_exomiser {
publishDir "$output_exomiser_settings", mode: 'copy'
input:
file(template)
file(input_file)
file(hpo_file)
output:
path '*.yml'
script:
// This python script creates multiple .yml files in the folder and I can see them
"""
python $projectDir/bin/Configure_exomiser.py \
-t $template \
-i $input_file \
-p $hpo_file
"""
}
// This process is supposed to be invoked one time for each .yml from the process above,
// Instead all .yml files are passed together and this process is running a single time taking all of them as input
process exomiser {
publishDir "$output_exomiser", mode: 'move'
input:
file(analysis_setting)
file(application_setting)
output:
file '*.tsv'
file '*.json'
script:
"""
java -jar ${params.exomiser_cli} \
-analysis $analysis_setting
"""
}
```