very naive questions. Trying to understand better ...
# modules
l
very naive questions. Trying to understand better ext.args. If a pipeline have this in the module.config:
Copy code
ext.args   = [
            '--keep-dup all',
            '--nomodel',
            params.narrow_peak      ? '' : "--broad --broad-cutoff ${params.broad_cutoff}",
            params.save_macs_pileup ? '--bdg --SPMR' : '',
            params.macs_pvalue      ? "--pvalue ${params.macs_pvalue}" : '',
            params.macs_fdr         ? "--qvalue ${params.macs_fdr}" : ''
        ].join(' ').trim()
And I prepare a custom config file with:
Copy code
ext.args   = [
            '--keep-dup auto',
            '--nomodel',
            '--shift -75',
            '--extsize 150'
        ].join(' ').trim()
That will replace everything the fill ext.args, right? For instance, I will need to add
--broad
...and any other parameter that depended on
params
?
m
Yes. Sadly it overwrites. There's no inheritance in configs.
There are things one could implement, but it just makes things more difficult for the user I think, especially if pipelines start going about it in different ways.
l
thanks, I understand. We can not use
params
inside the custom file right?
m
You can if you enclose it in
{}
so it evaluates at task run time.
Copy code
ext.args   = {
            [
                '--keep-dup auto',
                '--nomodel',
                params.narrow_peak      ? '' : "--broad --broad-cutoff ${params.broad_cutoff}",
                params.save_macs_pileup ? '--bdg --SPMR' : '',
                params.macs_pvalue      ? "--pvalue ${params.macs_pvalue}" : '',
                params.macs_fdr         ? "--qvalue ${params.macs_fdr}" : ''
            ].join(' ').trim()
        }
🙌 1