From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:40195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gyi2S-0008Ph-N4 for gwl-devel@gnu.org; Tue, 26 Feb 2019 14:05:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gyi2Q-0002Gb-Nd for gwl-devel@gnu.org; Tue, 26 Feb 2019 14:05:12 -0500 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21009) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gyi2Q-0002B7-8Y for gwl-devel@gnu.org; Tue, 26 Feb 2019 14:05:10 -0500 References: <87lg2atsxx.fsf@elephly.net> <87mumj0xzq.fsf@elephly.net> From: Ricardo Wurmus In-reply-to: Date: Tue, 26 Feb 2019 20:04:51 +0100 Message-ID: <87pnrez7zg.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: variable interpolation in code snippets List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gwl-devel-bounces+kyle=kyleam.com@gnu.org Sender: "gwl-devel" To: zimoun Cc: gwl-devel@gnu.org zimoun writes: > On Tue, 26 Feb 2019 at 09:12, Ricardo Wurmus wrote: >> >> I thought about adding support for selectors, but I don=E2=80=99t know i= f 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 =3D genome.fa > seqA =3D R1.fq > seqB =3D R2.fq > shell: > my-tool -i {input.genome} -1 {input.seqA} -2 {input.seqB} Yes, I think this is pretty nice. I=E2=80=99ll aim for something like this: --8<---------------cut here---------------start------------->8--- process: foo data-inputs named-list foo =3D 1 bar =3D hello baz =3D world procedure # bash { cat {{data-inputs.foo}} {{data-inputs.bar}} } --8<---------------cut here---------------end--------------->8--- Haven=E2=80=99t thought much about it, but =E2=80=9Cnamed-list=E2=80=9D (or= whatever the final name) would introduce a let binding or something. (BTW: I don=E2=80=99t like that it=E2=80=99s called =E2=80=9Cdata-inputs=E2= =80=9D. =E2=80=9Cinputs=E2=80=9D is nicer and fits well to =E2=80=9Coutputs=E2=80=9D.) --=20 Ricardo