Comments (4)
Copied from Slack:
As ugly as it sounds I think the easiest and possibly the most flexible option is to only define inputs and outputs in the actual module file and no other parameter definitions (other than --threads $task.cpus
maybe). This follows the NF philosophy quite well.
Additional parameters would then be provided by a string of some sort with the hope that the downstream tool validates these parameters! Would be nice if we can make the variable name for optional parameters standardised e.g. --<MODULE_NAME>_options
.
from modules.
Agreed - my way of saying basically the same thing (I think) is this:
I think that the default module command should be as simple as possible, with dedicated parameters for the required options (will often not be any if the essential options are covered by input and output channels). Then any additional optional flags could go in a generic string param as @drpatelh suggests above.
So using the cutadapt example above, if it was impossible to run cutadapt with the -a
flag then we would have params.cutadapt_adapter_sequence
and then --cutadapt_options
for everything else.
As mentioned on slack, the addParams
thing is cool, but I can see it struggling with edge cases such as hyphens in command-line parameters (hyphens are not allowed in groovy variable names) and other random stuff. I agree that although the generic string approach is ugly, it's also the simplest to maintain and least likely to go wrong.
Remember that pipeline authors can make these generic strings however they like, so can define their own convenience params
for users where applicable.
Phil
from modules.
Note that @FelixKrueger is using the "simple string" approach in his DSL2 modules. See #30 for example.
Also note that starting with the "simple string" approach is not incompatible with manually adding other params - these can be added on to that string as done in #28 - though maybe we should avoid this and keep things simple (at risk of being a complete hypocrite here, sorry).
from modules.
We have agreed on passing all optional parameters via an options.args
string and this seems to be working really well. Especially as it allows for optional parameters to be overwritten at both the user and developer level via custom configuration files.
from modules.
Related Issues (20)
- new module: spacemarkers HOT 1
- nf-test Github actions decompress automatically tar.gz outputs when they should not HOT 2
- new module: TIRLEARNER
- [FEATURE] allow skipping freyja boot subworkflow
- new module: helitronscanner/scanhead
- [FEATURE] Report primary alignment stats in nf-core/fastq_align_bamcmp_bwa subworkflow
- new subworkflow: FASTA_GXF_BUSCO_PLOT
- new module: CATPACK_DOWNLOAD HOT 1
- new module: CATPACK_PREPARE HOT 1
- new module: CATPACK_BINS HOT 1
- new module: VAMB_BIN
- new module: DREP_COMPARE HOT 1
- new module: DREP_DEREPLICATE HOT 1
- new list of proteomics modules HOT 1
- deprecate pbbam/pbmerge (maybe new module: pbtk/pbmerge) HOT 2
- Add `deprecated` flag for deprecated modules
- iqtree: optional output files missing from module
- new File breaks cloud execution in bcl_demultiplex HOT 9
- new module: MuSE
- Add stub run to CSVTK_CONCAT
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from modules.