In this demonstration, we will examine a workflow which sorts and assembles COVID sequencing data.
latch init
from the command line.
covid-wf
.
assemble.py
file inside the covid-wf/wf
directory, there is a task which ingests two sequencing reads and outputs an assembled SAM file.
LatchFile
s and LatchDir
sLatchFile
and LatchDir
are types built into the Latch SDK which allow users to use files and directories stored remotely on Latch as inputs and outputs to workflows. They point to remote file locations in our user interface on the Latch Console and implement the necessary operations to ensure data is available in the task environment and outputs are uploaded to your Latch account.
The first time you read or resolve the path of a file or directory in a task, the data will be downloaded and will be accessible within the task. For example the line local_file = Path(read1)
in the snippet below will download the file from Latch and return a path to the local copy.
local_path
attribute of the LatchFile or LatchDir. This will download the data into the task environment and return back a path to the local file or directory.
covid_assembly.sam
will be available in the root directory of Latch Data.
LatchFile(...)
takes as input two values: the first is the local filepath and the second is the target remote file location on Latch. Remote paths on Latch start with the prefix latch:///
.
Dockerfile
s for dependency management, which are automatically generated from environment files or handwritten.
Install samtools
and autoconf
by adding them to the dependency list in system-requirements.txt
:
latch dockerfile .
to examine the auto generated Dockerfile:
LatchMetadata
and LatchParameter
:
metadata
variable then needs to be passed into the @workflow
decorator to apply the interface to the workflow.
latch preview
will open up a browser displaying your interface.
latch test-data
command.
The example files are hosted on AWS S3 and are publicly available for download. Thus, they should only contain information that can be made publicly available.
LaunchPlan
to add test data to your workflow.
latch get-wf
, you can view the names of all workflows available in your workspace:
latch get-params
and passing in the name of your workflow like so:
wf.__init__.assemble_and_sort.params.py
, whose contents are as below: