So I'm trapped :upside_down_face: Is this a bug? O...
# tools
j
So I'm trapped šŸ™ƒ Is this a bug? Or do I need more any escapes? Any advice?
j
Is there not also a quotation error in the
nextflow_schema.json
? Is the closing
'
missing? šŸ¤”
Also (being a bit lazy here) would this not be fixed by moving the "--param-string" part to whereever this variable is used? šŸ˜„ I am happy to have a closer look at how we do escaping in linting otherwise, if you create an issue.
j
That's to getting back to me @Julian Flesch! I will double check everything this weekend at some point (lots of kids activities), the missing
'
that might be in the PR atm is because I tried just letting tools
schema build
reformat it (and it removes it automatically). I probably forgot to putit back What do you mean by moving the
--param-string
bit? to wheverever it is used?
j
I mean the pipeline param would just hold the value part:
Copy code
# ADAPTED nextflow_schema.json
...
"sourmash_build_dna_options": {
                    "type": "string",
                    "default": "scaled=1000,k=31,noabund",  <<< THIS CHANGED
                    "fa_icon": "fas fa-users-cog",
                    "description": "Specify parameters given to sourmash sketch dna.",
...
And whereever the value is used you explicitly add back the "--param-string" use this you do:
Copy code
# e.g. ADAPTED conf/modules.config:
ext.args = "dna --param-string ${params.sourmash_build_dna_options}"
Just a quick idea šŸ˜„ But you have to tell me if this is feasible or maybe missing something. Also on second glance I see this pattern is used a lot in the pipeline ...
j
Uuuhh well @Julian Flesch you were completely right - indeed the original JSON schema WAS missing the escapes... and for a long time (as i see it in
main
) šŸ™ˆ , and I guess tools got better at checking for mismatches 😬 . So indeed, no change needed from tools end, and we can ignore this! Thank you for looking with a clear mind on my behalf šŸ˜†
šŸ™Œ 1
(but yeah, for context: the problem is with that particular tool, where they have a parameter flag for additional parameters within that subcommand... there could be addition parameters to sit alongside sourmash's
--param-string
a user would want to specify... or they could theoretically remove it entirely away from default... awkward as hell)
j
yeah seems fragile and maybe worth refactoring at some point
j
That would involve changing the upstream tool 🤣 We could I guess replace the per tool options parameters with 1:1, but the. With sourmash it would be n² things we have to add....