Hi All, does anybody maintain a pipeline where Gro...
# pipeline-maintainers
f
Hi All, does anybody maintain a pipeline where Groovy code is used to create some kind of parameter file for a module? I'm looking for inspiration for #C068T3R7LAE where the main tool requires a parameter file for most operations and our current solution, a separate process to generate parameter files, creates unnecessary overhead.
m
Files are fairly easy to do with native processes:
Copy code
process FILTER_INPUT {
    publishDir "${params.outdir}/resume/${workflow.runName}"

    input:
    val to_resume

    exec:
    file("${task.workDir}/inputs_to_resume.csv").text = (["file"] + to_resume).join("\n")

    output:
    path "inputs_to_resume.csv"
}
(from https://community.seqera.io/t/how-to-skip-specific-failed-samples-on-next-resume/2078) Native processes (
exec:
) always run locally and can be good for quick processes. The nextflow documentation has been updated recently to give a good overview of functions to work on iterables too: https://www.nextflow.io/docs/latest/reference/stdlib.html#iterable-e
r
Added a bash block for controlfreec: https://github.com/nf-core/modules/blob/master/modules/nf-core/controlfreec/freec/main.nf because I wanted to keep it on module level.
this 1
m
All those `echo`'s could be a single
cat
this 1
f
Thanks for the replies. @Rike Hanssen I was looking for something like this but feared that this would conflict with some guideline.
r
aha didn't realise at the time @Mahesh Binzer-Panchal Don't think i'll tinker with it anytime soon tbh
m
No need to fix what's working ( well unless it makes it easier/more readable/maintainable )
this 1