Pull a dictionary from the command line¶
Fetch a monomer dictionary once, cache it on disk, and then run the engine offline against that exact version. This is the path to use in pipelines and CI, where you do not want a network call per molecule.
Install the cli extra:
Log in¶
This uses the device-authorization flow: it prints a URL and a code for you to
approve in a browser. It works headless and over SSH. Add --loopback if you
prefer the browser-redirect flow.
In CI, skip login and set the token in the environment instead:
Find the dictionary you want¶
This prints each dictionary's name, current version and primary key. Either the
name or the pk works as --dictionary.
Pull and cache it¶
helmshaker library pull --tmr https://api.core.minerva.roche.com/gateway/tmr-tst \
--dictionary peptides --version 1.2.0
Omit --version for the latest. Add --refresh to refetch when a fresh cache
already exists.
Confirm what you now hold:
Use it offline¶
Every engine command resolves monomers against the cache:
helmshaker parse 'PEPTIDE1{C.A.A.A.C}$$$$V2.0' --dictionary peptides
helmshaker validate 'PEPTIDE1{C.A.A.A.C}$$$$V2.0' --dictionary peptides
helmshaker mw 'PEPTIDE1{C.A.A.A.C}$$$$V2.0' --dictionary peptides
helmshaker convert 'RNA1{[moe](A)[sp].[moe](U)}$$$$V2.0' --to fasta --dictionary oligos
validate exits non-zero when validation fails, so it gates a pipeline step
directly.
From Python¶
The same cache backs MonomerLibrary.from_cache, so a dictionary pulled by the
CLI is immediately available to your code with no network access:
Related¶
- Command line for every option
- Load a monomer library for the four sources