CLI Reference¶
Reference for every cherimoya subcommand, every command-line flag,
and every key of every JSON parameter file. Pulled from
cherimoya_cli.defaults and the per-subcommand argparse setup;
update these tables when the source defaults change.
For a walkthrough of how the pieces fit together see CLI Pipeline Walkthrough.
Common conventions¶
Every subcommand except
pipeline-jsonandnegativesis driven by a JSON file passed with-p. Keys missing from the JSON fall back to the corresponding default incherimoya_cli.defaults.Most JSON schemas accept
"skip": trueto no-op the step. ThepipelineJSON accepts"dry_run": trueto print/emit the per-step JSONs without running any subprocess.List-valued keys (
signals,controls,loci,negatives,training_chroms,validation_chroms,chroms) accept multiple values. Single-string scalars are coerced to a one-element list internally in some places.Path-valued keys can be remote URLs (
http://,https://,s3://,gs://). Remote paths are streamed bybam2bwandtangermeme.ioand skipped by the pre-flight existence check insidecherimoya pipeline.
cherimoya pipeline-json¶
Emit a fully-populated pipeline JSON from a small number of CLI pointers.
Flag |
Type |
Description |
|---|---|---|
|
path |
Reference genome FASTA. |
|
path (repeatable) |
Signal file (BAM/SAM/fragment file/bigWig). Repeat for multiple replicates. |
|
path (repeatable) |
Optional control file. Repeat for multiple replicates. |
|
path (repeatable) |
Optional BED of peak coordinates. If omitted, MACS3 calls peaks. |
|
path (repeatable) |
Optional BED of GC-matched negatives. If omitted, the pipeline samples them. |
|
str |
Suffix used in intermediate filenames. |
|
flag |
Treat signal as unstranded (single output track). |
|
flag |
Treat input as fragment files, not aligned reads. |
|
int |
Shift applied to + strand reads (bp). Default 0. |
|
int |
Shift applied to - strand reads (bp). Default 0. |
|
path |
MEME-format motif database. When set, TF-MoDISco report, tomtom-lite annotation, and marginalization are run. |
|
path |
Output JSON path. |
|
flag |
Treat input as paired-end. Affects MACS3 file format
( |
|
float |
Multiplier on the raw read counts. Default 1 (no scaling). |
cherimoya pipeline¶
Run an end-to-end pipeline from a JSON file.
CLI flags:
-p, --parameters(required) — path to the pipeline JSON.
JSON schema (top-level keys, with defaults from
default_pipeline_parameters):
Key |
Default |
Description |
|---|---|---|
|
2114 |
Input window size (bp). |
|
1000 |
Output window size (bp). |
|
|
Suffix for intermediate filenames; required. |
|
|
Optional path to an existing |
|
|
Tensor dtype for inference; can be |
|
|
Torch device for inference and training. |
|
512 |
Batch size for inference stages (attribution, evaluation). |
|
|
Print per-step progress. |
|
|
Base RNG seed for the data sampler. |
|
|
BED file(s) of regions to exclude. |
|
|
Reference genome FASTA. Required. |
|
|
BED of peaks. If null, MACS3 calls peaks. |
|
|
BED of negatives. If null, GC-matched negatives are sampled. |
|
|
Signal-track specification (BAM or bigWig files). Required.
Accepts either a flat list — in which case each entry is its
own one-channel (unstranded) group — or a structured list whose
entries are each a |
|
|
Optional list of control files. Same grouping rule as |
|
|
If |
|
|
If |
|
(sub-dict, below) |
Settings for MACS3 peak calling and |
|
(sub-dict, below) |
Training parameters. |
|
(sub-dict, below) |
Attribution parameters. |
|
(sub-dict, below) |
Seqlet calling parameters. |
|
(sub-dict, below) |
tomtom-lite annotation parameters. |
|
(sub-dict, below) |
TF-MoDISco motif discovery parameters. |
|
(sub-dict, below) |
TF-MoDISco report parameters. |
|
(sub-dict, below) |
Marginalization parameters. |
preprocessing_parameters¶
Key |
Default |
Description |
|---|---|---|
|
|
Produce a single unstranded bigWig instead of a |
|
|
Treat input as fragment files. |
|
|
Treat input as paired-end; affects MACS3 format. |
|
0 |
|
|
0 |
|
|
1 |
Multiplier on raw counts. |
|
|
Pass |
|
|
MACS3 |
|
|
MACS3 |
|
0.05 |
MACS3 q-value cutoff. |
|
|
Print per-step progress. |
fit_parameters¶
These keys are merged with default_fit_parameters before training.
Unspecified keys fall back to the fit-level defaults.
Key |
Default |
Description |
|---|---|---|
|
128 |
Backbone channel width. |
|
9 |
Number of Cheri Blocks. |
|
2 |
MLP expansion factor inside each Cheri Block. |
|
0.15 |
Fixed residual scalar. |
|
64 |
Training batch size. |
|
0.025 |
Muon learning rate. |
|
0.03 |
Muon weight decay. |
|
0.001 |
AdamW learning rate. |
|
0.0 |
AdamW weight decay. |
|
0.001 |
SGD learning rate for the Kendall uncertainty weights
( |
|
0.0 |
SGD weight decay for the Kendall uncertainty weights. |
|
0.9 |
SGD momentum for the Kendall uncertainty weights. |
|
2 |
Number of epochs over which the LR is linearly warmed up from 1% of its target before cosine decay begins. |
|
0.25 |
Negatives per peak per epoch. |
|
1 |
Async prefetch workers for the data loader. |
|
5 |
Stop after N consecutive epochs with no validation count Pearson improvement. |
|
500 |
Maximum jitter (bp) for peak centers at training time. |
|
|
Augment training with reverse complements. |
|
|
Evaluation-time RC averaging. |
|
20 |
Maximum training epochs. |
|
hg38 default (chr2, chr4, chr5, chr7, chr9-22, chrX, chrY) |
Chromosomes used for training. |
|
|
Held-out chromosomes for validation. |
|
2114 / 1000 |
Input / output window sizes (bp). |
|
|
Center loci on narrowPeak summit column. |
|
|
Training dtype ( |
|
|
Training device. |
|
|
Base RNG seed. |
attribute_parameters¶
Key |
Default |
Description |
|---|---|---|
|
512 |
Inference batch size. |
|
training + validation chroms |
Chromosomes to attribute. |
|
|
Attribute to counts or profile ( |
|
|
Output: one-hot encoded inputs. |
|
|
Output: per-base hypothetical importance. |
|
|
Output: boolean mask back to the original loci list. |
|
|
Inference dtype and device. |
seqlet_parameters¶
Key |
Default |
Description |
|---|---|---|
|
0.01 |
Recursive seqlet p-value threshold. |
|
4 / 25 |
Minimum and maximum seqlet length (bp). |
|
3 |
Flanking bases retained on each side. |
|
2114 |
Input window used during attribution; matches
|
|
inherit from |
Inputs from the attribute step. |
|
|
Output BED. |
annotation_parameters¶
tomtom-lite (ttl) annotation runs only when motifs is set on
the top-level JSON.
Key |
Default |
Description |
|---|---|---|
|
inherit |
MEME-format motif database. |
|
inherit |
Reference genome FASTA. |
|
inherit |
Seqlet BED from the seqlets step. |
|
100 |
|
|
1000 |
|
|
100 |
|
|
250 |
|
|
|
Scan motifs in both orientations. |
|
-1 |
Parallel workers; -1 uses all cores. |
|
|
Output BED. |
modisco_motifs_parameters / modisco_report_parameters¶
Key |
Default |
Description |
|---|---|---|
|
100000 |
Number of seqlets passed to |
|
|
HDF5 output of |
|
|
Directory output of |
|
inherit |
Motif database passed to |
marginalize_parameters¶
Skipped entirely when the top-level motifs is null.
Key |
Default |
Description |
|---|---|---|
|
inherit |
Background loci to insert motifs into. |
|
100 |
Number of background loci per motif. |
|
|
Compute attributions on the inserted motif. |
|
512 |
Inference batch size. |
|
|
Shuffle the background loci before sampling. |
|
0 |
RNG seed for shuffling. |
|
|
Use the minimal marginalization output format. |
|
|
Output directory. |
cherimoya fit¶
CLI flags:
-p, --parameters(required) — path to a fit JSON.
JSON schema: the fit_parameters table above, plus the input
keys sequences, loci, negatives, signals,
controls, exclusion_lists, and performance_filename
(default "performance.tsv"). On completion, fit also writes
the resulting evaluate JSON and invokes the evaluate step.
cherimoya evaluate¶
CLI flags:
-p, --parameters(required) — path to an evaluate JSON.
JSON schema:
Key |
Default |
Description |
|---|---|---|
|
|
Path to a saved |
|
|
Reference genome FASTA. |
|
|
BED of evaluation loci. |
|
|
Optional list of control bigWigs (must match training). Same
grouping rule as |
|
|
Signal bigWigs to score against (must match training). Accepts
the same flat-or-grouped form as |
|
|
Held-out chromosomes. |
|
2114 / 1000 |
Window sizes (must match training). |
|
512 |
Inference batch size. |
|
|
Run predictions on RC inputs and average the results. |
|
|
Inference device and dtype. |
|
|
Optional regions to exclude. |
|
|
TSV with one row per signal group. |
The TSV columns are
profile_mnll, profile_jsd, profile_pearson,
profile_spearman, count_pearson, count_spearman,
count_mse. The file has one data row per signal group, in
signal_groups order — for a single-group model (the default) this
is a single row holding the same per-group mean that
calculate_performance_measures returns; for a multi-group model
row i corresponds to signal_groups[i]. Profile metrics are
the mean of the metric over (validation loci × the group’s
channels); count metrics are read directly from the per-group
(n_groups,) tensors. See Multi-task training for an in-depth
description.
cherimoya attribute¶
CLI flags:
-p, --parameters(required) — path to an attribute JSON.
JSON schema: the attribute_parameters table above, plus
model, sequences, loci, exclusion_lists, and
in_window / out_window.
cherimoya seqlets¶
CLI flags:
-p, --parameters(required) — path to a seqlets JSON.
JSON schema: the seqlet_parameters table above, plus chroms
and loci (needed to convert example-relative seqlet coordinates
back to genome coordinates) and exclusion_lists.
cherimoya marginalize¶
CLI flags:
-p, --parameters(required) — path to a marginalize JSON.
JSON schema: the marginalize_parameters table above, plus
sequences, model, and motifs.
cherimoya negatives¶
Sample GC-matched negative regions for a peak file. All flags are direct CLI arguments (no JSON):
Flag |
Type |
Description |
|---|---|---|
|
path (required) |
Peak BED. |
|
path |
Reference genome FASTA. |
|
path |
Optional signal bigWig (used to set a minimum-counts threshold
on negatives via |
|
path (required) |
Output BED. |
|
float |
GC bin width to match. Default 0.02. |
|
float |
Maximum fraction of |
|
float |
Multiplier on the minimum peak counts when filtering negatives by signal. Default 0.5. |
|
int |
Window over which GC content is calculated. Default 2114. |
|
int |
Non-overlapping stride. Default 1000. |
|
flag |
Print per-step progress. |
cherimoya batch¶
Run multiple pipelines in parallel using joblib.
CLI flags:
-p, --parameters(required) — path to a batch JSON.
The batch JSON is the same shape as a pipeline JSON with two additions:
"device": "*"is expanded to all available CUDA devices."signals"may be a glob string ("data/*.bam"). When set, it’s expanded to a list of paths, and"name"is auto-derived from filenames if it isnull.
Other list-valued fields (loci, negatives, controls) must
be either null or a same-length list as the expanded
signals. Each job is written to {name}.pipeline.json and run
via subprocess.run(["cherimoya", "pipeline", "-p", jname]).
Note
signals in a batch JSON is a list of per-model signal
specs: one entry per pipeline to run in parallel. With the new
grouped form each per-model entry is itself a flat-or-grouped
signals list. So a batch of two stranded BPNet models is:
"signals": [
[["expt1.+.bw", "expt1.-.bw"]],
[["expt2.+.bw", "expt2.-.bw"]]
]
The outer list selects the model; each inner list is the
signals field of one pipeline JSON. Previously the
double-nesting was implicit (a flat two-element pair was a
stranded pair); under the grouped API a flat two-element list is
two unstranded tracks, so stranded batch jobs must use the
nested form above.
cherimoya install-skill¶
Install the bundled Cherimoya agent skill for Claude Code into your skills directory, creating
cherimoya/ inside it. The skill teaches the assistant to drive this CLI
and the Python API — working out which inputs you have, choosing
assay-appropriate settings, calling the right subcommands, and interpreting
outputs — and to ask clarifying questions when an input is ambiguous.
CLI flags:
-d, --directory— skills directory to install into. Default~/.claude/skills.--symlink— symlink the packaged skill instead of copying it, so in-place edits are reflected without reinstalling. Breaks if the install location moves.-f, --force— overwrite an existing installation at the destination.
Restart Claude Code (or reload skills) to pick it up.