Skip to content

v0.5.1

Compare
Choose a tag to compare
@kennyworkman kennyworkman released this 17 Mar 17:54
· 2607 commits to main since this release

This version introduces latch get-params <wf-name> to generate a dictionary of python-native parameters from any workflow. The resulting python file can be passed to the latch execute *.py subcommand to execute workflows from the command line.

Example Usage

First get the name of a workflow you want to generate parameters for.

$ latch get-wf | grep alphafold
59636	latch.alphafold_wf             	v2.1.0+0

Then construct your parameter file:

$ latch get-params latch.alphafold_wf
Successfully generated python param map named latch.alphafold_wf.params.py with version latest
 Run `latch execute latch.alphafold_wf.params.py` to execute it.

$ latch execute latch.alphafold_wf.params.py
Successfully launched workflow named latch.alphafold_wf with version latest.

Example Param File

latch.alphafold_wf.params.py

"""Run `latch execute latch.alphafold_wf.params.py` to execute this workflow"""

from latch.types import LatchFile
from latch.types import LatchDir

params = {
    "_name": "latch.alphafold_wf", # Don't edit this value.
    "db": "full", # DEFAULT. <class 'str'>
    "fasta_file": LatchFile("latch:///foobar"), # <class 'latch.types.file.LatchFile'>
    "is_prokaryote": False, # DEFAULT. <class 'bool'>
    "max_template_date": "2022-01-01", # DEFAULT. <class 'str'>
    "mode": "monomer_single", # DEFAULT. <class 'str'>
    "output_dir": LatchDir("latch:///foobar"), # <class 'latch.types.directory.LatchDir'>
    "output_name": "run1", # DEFAULT. <class 'str'>
    "weights_download_url": "https://storage.googleapis.com/alphafold/alphafold_params_2021-10-27.tar", # DEFAULT. <class 'str'>
}