latch
installed:
profiles/default
and in it touch a file called config.yaml
:
config.yaml
:
latch register
and have each rule run in that container instead.
latch_metadata
and in it touch a file called __init__.py
:
latch_metadata/__init__.py
, create a SnakemakeV2Metadata
object as below:
config.yaml
(not the file in profiles/default
), we see that the pipeline expects 3 config parameters: samples_dir
, genome_dir
, and results_dir
. The former two are inputs to the pipeline and the latter is the location where outputs will be stored.
We want all three of these to be exposed in the UI, so we will add them to the parameters
dict in latch_metadata/__init__.py
:
LatchDir
s (we made results_dir
a LatchOutputDir
because it is an output directory).
For now, this is all we need and we can move on, but if you like feel free to customize the metadata object further using the interface described here.
wf
containing a file called entrypoint.py
. The file should have the following contents:
wf/entrypoint.py
Dockerfile
that will define the environment the runtime executes in. In particular, we want that environment to contain the conda environment defined by environment.yaml
.
Again, we can accomplish this with a simple command:
Dockerfile
with the following contents:
Dockerfile
latch cp
:
snakemake-tutorial-data
in your account on Latch.
Finally, navigate to Workflows and click on “Snakemake Tutorial Workflow”, select the parameters from the data you just uploaded, and run the workflow!
wf/entrypoint.py
file:
snakemake_runtime(...)
so that it is the following:
samples_dir
before calling snakemake
- this way we will know the contents of the directory without needing to be in a rule.
Lastly, we will need to edit the Snakefile and remove the hardcoded samples: