Metadata
In order to generate the interface for your workflow on Latch, you need to specify which parameters you want to expose - and how you want to expose them - in a latch_metadata
package.
In your workflow directory, create a folder called latch_metadata
, and in it, add a file called __init__.py
. The content of the file should look like this:
The only hard requirements for this file is that it create a SnakemakeV2Metadata
object and define an appropriate set of parameters using SnakemakeParameter
objects. SnakemakeParameter
s are identical to LatchParameter
s, with an additional required type
field.
Values passed through the interface will be marshalled into JSON and then provided to your workflow as an external config file. For example, in the above workflow, if we pass a single Sample called test
with r1
at latch://123.account/test_r1.fastq
and r2
at latch://123.account/test_r2.fastq
, the resulting config file would look like
These can then be accessed from within the Snakemake workflow via the config
object, e.g. config["samples"][0]
would get the first sample.
Was this page helpful?