[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gwl-devel] variable interpolation in code snippets
From: |
Ricardo Wurmus |
Subject: |
Re: [gwl-devel] variable interpolation in code snippets |
Date: |
Tue, 26 Feb 2019 20:04:51 +0100 |
User-agent: |
mu4e 1.0; emacs 26.1 |
zimoun <address@hidden> writes:
> On Tue, 26 Feb 2019 at 09:12, Ricardo Wurmus <address@hidden> wrote:
>>
>> I thought about adding support for selectors, but I don’t know if I
>> should. Maybe it would be better to allow for named inputs instead,
>> which would result in process-local bindings.
>
> `data-inputs` is often a list, say the genome (genome.fa) and the
> sequences (R1.fq and R2.fq); then the procedure uses each as e.g.
> my-tool -i genome.fa -1 R1.fq -2 R2.fq
>
> Personnally, I find the Snakemake notation clear:
> input:
> genome = genome.fa
> seqA = R1.fq
> seqB = R2.fq
> shell:
> my-tool -i {input.genome} -1 {input.seqA} -2 {input.seqB}
Yes, I think this is pretty nice. I’ll aim for something like this:
--8<---------------cut here---------------start------------->8---
process: foo
data-inputs
named-list
foo = 1
bar = hello
baz = world
procedure # bash { cat {{data-inputs.foo}} {{data-inputs.bar}} }
--8<---------------cut here---------------end--------------->8---
Haven’t thought much about it, but “named-list” (or whatever the final
name) would introduce a let binding or something.
(BTW: I don’t like that it’s called “data-inputs”. “inputs” is nicer and
fits well to “outputs”.)
--
Ricardo