#compdef aie

autoload -U is-at-least

_aie() {
    typeset -A opt_args
    typeset -a _arguments_options
    local ret=1

    if is-at-least 5.2; then
        _arguments_options=(-s -S -C)
    else
        _arguments_options=(-s -C)
    fi

    local context curcontext="$curcontext" state line
    _arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
":: :_aie_commands" \
"*::: :->aie" \
&& ret=0
    case $state in
    (aie)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:aie-command-$line[1]:"
        case $line[1] in
            (project)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_aie__subcmd__project_commands" \
"*::: :->project" \
&& ret=0

    case $state in
    (project)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:aie-project-command-$line[1]:"
        case $line[1] in
            (init)
_arguments "${_arguments_options[@]}" : \
'--name=[Human-readable project name (defaults to the directory name)]:NAME:_default' \
'-h[Print help]' \
'--help[Print help]' \
'::directory -- Directory to initialize:_files' \
&& ret=0
;;
(add)
_arguments "${_arguments_options[@]}" : \
'--kind=[Resource type. \`auto\` infers it from the file name]:KIND:(auto archive collection annotation genome bam barcodes whitelist groups cells design metadata file)' \
'--project=[Project directory or manifest; otherwise search upward from the current directory]:PROJECT:_files' \
'--assembly=[Reference assembly (for example \`GRCh38.p14\`). Annotation resources also require \`--annotation-label\`; archives, collections, and genomes may carry the assembly alone]:ASSEMBLY:_default' \
'--annotation-label=[Immutable annotation release/label (for example \`GENCODE 49\`). Must be supplied together with \`--assembly\` and may only be used for annotations]:ANNOTATION_LABEL:_default' \
'--external[Register a canonical absolute path outside the project as a read-only input. Internal resources remain relative and keep the project movable]' \
'--replace[Replace an existing resource with this name]' \
'-h[Print help]' \
'--help[Print help]' \
':name -- Stable name used by plans, for example `brain-v1`:_default' \
':path -- Existing input file. Outside files require `--external`:_files' \
&& ret=0
;;
(show)
_arguments "${_arguments_options[@]}" : \
'--project=[Project directory or manifest; otherwise search upward from the current directory]:PROJECT:_files' \
'--json[Emit a versioned JSON document]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_aie__subcmd__project__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:aie-project-help-command-$line[1]:"
        case $line[1] in
            (init)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(add)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(show)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(plan)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_aie__subcmd__plan_commands" \
"*::: :->plan" \
&& ret=0

    case $state in
    (plan)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:aie-plan-command-$line[1]:"
        case $line[1] in
            (check)
_arguments "${_arguments_options[@]}" : \
'--project=[Project directory or manifest; otherwise search upward from the plan]:PROJECT:_files' \
'--explain[Explain every resource, output, and command resolution]' \
'--json[Emit the fully resolved plan as JSON]' \
'-h[Print help]' \
'--help[Print help]' \
':plan -- Versioned YAML or JSON plan:_files' \
&& ret=0
;;
(run)
_arguments "${_arguments_options[@]}" : \
'--project=[Project directory or manifest; otherwise search upward from the plan]:PROJECT:_files' \
'--explain[Explain every resource, output, and command resolution before execution]' \
'--dry-run[Resolve and display the plan without writing or executing anything]' \
'--resume[Skip a completed step only when its exact plan digest and every output identity match the persisted completion record. Existing unverified outputs are an error]' \
'-h[Print help]' \
'--help[Print help]' \
':plan -- Versioned YAML or JSON plan:_files' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_aie__subcmd__plan__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:aie-plan-help-command-$line[1]:"
        case $line[1] in
            (check)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(run)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(doctor)
_arguments "${_arguments_options[@]}" : \
'--project=[Project directory or \`aie-project.yaml\`; defaults to discovery from the current directory]:PATH:_files' \
'--verify-content[Read and authenticate every compressed archive payload, not only selected metadata]' \
'--strict[Treat warnings (such as missing optional alignment tools) as an unsuccessful diagnosis]' \
'--json[Emit one stable JSON report]' \
'-h[Print help]' \
'--help[Print help]' \
'*::paths -- Files to validate (`.aie` archives and `.aic` compiled annotations are inspected):_files' \
&& ret=0
;;
(explore)
_arguments "${_arguments_options[@]}" : \
'--project=[Project directory or \`aie-project.yaml\`; defaults to discovery from the current directory]:PATH:_files' \
'--port=[Loopback TCP port. Use 0 to ask the operating system for an available port]:PORT:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(completions)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':shell -- Shell whose completion script should be written to standard output:(bash zsh fish)' \
&& ret=0
;;
(resolve)
_arguments "${_arguments_options[@]}" : \
'--assembly=[Exact reference assembly identity (for example \`GRCh38.p14\`)]:ASSEMBLY:_default' \
'--annotation=[Exact annotation release identity (for example \`GENCODE 49\`)]:RELEASE:_default' \
'--annotation-digest=[Optional expected annotation content identity, as \`blake3\:<64 lowercase hex>\`]:BLAKE3:_default' \
'--format=[Result representation. JSON is a \`gravlax.result-envelope.v1\` typed-table result]:FORMAT:(text tsv json)' \
'-o+[Write to a new file instead of standard output. Existing files are never overwritten]:FILE:_files' \
'--output=[Write to a new file instead of standard output. Existing files are never overwritten]:FILE:_files' \
'-h[Print help]' \
'--help[Print help]' \
':annotation_file -- GTF or compiled `.aic` annotation used to resolve the identifiers:_files' \
'*::identifiers -- Gene symbol or stable identifier. Prefix with `gene\:`, `transcript\:`, or `exon\:` to constrain its kind. Every identifier must resolve unambiguously or no result is written:_default' \
&& ret=0
;;
(ingest)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_aie__subcmd__ingest_commands" \
"*::: :->ingest" \
&& ret=0

    case $state in
    (ingest)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:aie-ingest-command-$line[1]:"
        case $line[1] in
            (check)
_arguments "${_arguments_options[@]}" : \
'--whitelist=[Barcode whitelist intended for ingest (one 16 bp A/C/G/T barcode per line)]:FILE:_files' \
'--chemistry=[Validate the observed UMI length against a supported library chemistry]:CHEMISTRY:((10x-3p-v2\:"10x Chromium Single Cell 3'\'' v2\: 16 bp cell barcode and 10 bp UMI"
10x-3p-v3\:"10x Chromium Single Cell 3'\'' v3/v3.1\: 16 bp cell barcode and 12 bp UMI"))' \
'--format=[Report representation]:FORMAT:(text json)' \
'--strict[Treat warnings, including an unexercised secondary-alignment check, as failure]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':bam -- Annotation-free, coordinate-sorted STAR BAM intended for `aie ingest-archive`:_files' \
&& ret=0
;;
(recipe)
_arguments "${_arguments_options[@]}" : \
'--chemistry=[Supported library chemistry and read structure]:CHEMISTRY:((10x-3p-v2\:"10x Chromium Single Cell 3'\'' v2\: 16 bp cell barcode and 10 bp UMI"
10x-3p-v3\:"10x Chromium Single Cell 3'\'' v3/v3.1\: 16 bp cell barcode and 12 bp UMI"))' \
'--genome-dir=[STAR genome directory built without a GTF or annotation-derived splice junctions]:DIR:_files' \
'--read1=[Barcode/UMI read (R1 for supported 10x 3'\'' chemistries)]:FASTQ:_files' \
'--read2=[cDNA read (R2 for supported 10x 3'\'' chemistries)]:FASTQ:_files' \
'--whitelist=[Chemistry-matched barcode whitelist; defaults to the conventional 10x filename]:FILE:_files' \
'--out-prefix=[STAR output prefix]:PREFIX:_files' \
'--threads=[STAR worker threads]:THREADS:_default' \
'--plain-fastq[Inputs are plain FASTQ; omit STAR'\''s \`--readFilesCommand zcat\`]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_aie__subcmd__ingest__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:aie-ingest-help-command-$line[1]:"
        case $line[1] in
            (check)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(recipe)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(dev)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_aie__subcmd__dev_commands" \
"*::: :->dev" \
&& ret=0

    case $state in
    (dev)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:aie-dev-command-$line[1]:"
        case $line[1] in
            (gate-c)
_arguments "${_arguments_options[@]}" : \
'--gene-assigned-from=[Restrict the comparison to reads assigned to a gene in this STARsolo BAM, using its \`GX\` tag. Reads that no annotation claims cannot affect a gene count]:GENE_ASSIGNED_FROM:_files' \
'--json-out=[Write the per-category counts here as JSON]:JSON_OUT:_files' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':a -- Baseline BAM (config i\: annotation-free ingest):_files' \
':b -- Comparison BAM (config ii or iii\: annotation-aware):_files' \
&& ret=0
;;
(gate-d)
_arguments "${_arguments_options[@]}" : \
'--locus-gap=[Maximum gap, in bp, between consecutive read starts of one molecule. Reads of a single 10x molecule pile at a shared 3'\'' end, so this only has to absorb fragment-length jitter]:LOCUS_GAP:_default' \
'--cells=[STARsolo \`Solo.out/Gene/filtered/barcodes.tsv\`. Per-cell statistics are meaningless without it\: the unfiltered whitelist is ~65k empty droplets carrying a handful of counts each, on which G1 and G2 agree trivially, so the median over all barcodes reads 0% however bad the grouping is]:CELLS:_files' \
'--json-out=[]:JSON_OUT:_files' \
'--correct-umi[Merge UMIs within one substitution of a more abundant UMI at the same locus. STARsolo applies \`1MM_CR\` per (cell, gene); without an equivalent, G2 over-splits and the comparison measures missing error-correction rather than missing annotation. The correction runs inside a genomic locus and consults no annotation]' \
'-h[Print help]' \
'--help[Print help]' \
':bam -- Coordinate-sorted STARsolo reference BAM carrying CB/UB/UR/GX:_files' \
&& ret=0
;;
(build)
_arguments "${_arguments_options[@]}" : \
'--whitelist=[10x barcode whitelist (one 16 bp barcode per line)]:WHITELIST:_files' \
'--locus-gap=[Locus gap in bp for single-linkage molecule grouping]:LOCUS_GAP:_default' \
'--zstd-level=[zstd level for the size report]:ZSTD_LEVEL:_default' \
'--json-out=[]:JSON_OUT:_files' \
'--no-umi-collapse[Skip 1-mismatch UMI collapse at ingest, keeping one molecule per exact UMI value per locus. This is the graph-variant base\: every merge decision is deferred to replay (served by the UMI-adjacency graph), so none is baked in. Slightly more molecules, strictly more replayable]' \
'-h[Print help]' \
'--help[Print help]' \
':bam -- Annotation-free ingest BAM, coordinate-sorted, carrying raw `CR`/`UR`:_files' \
&& ret=0
;;
(umi-graph)
_arguments "${_arguments_options[@]}" : \
'--cells=[Filtered cell list for per-cell statistics]:CELLS:_files' \
'--locus-gap=[Locus gap for the base (ingest-time) molecule definition. Reads of one physical molecule pile within a fragment length, so this is deliberately small; everything beyond it is the graph'\''s job at replay time, not the ingest'\''s]:LOCUS_GAP:_default' \
'--store-window=[Window for edges retained in the STORED graph. Bounds the gene spans replay can serve; statistics are reported across a range of windows regardless]:STORE_WINDOW:_default' \
'--json-out=[]:JSON_OUT:_files' \
'-h[Print help]' \
'--help[Print help]' \
':bam -- BAM with CR/UR and, when collapse comparison is requested, reference CB/UB/GX tags:_files' \
&& ret=0
;;
(replay)
_arguments "${_arguments_options[@]}" : \
'--gtf=[GTF to replay — the annotation the archive has never seen]:GTF:_files' \
'--whitelist=[10x barcode whitelist]:WHITELIST:_files' \
'--barcodes=[Barcode list defining output column order. Pass the reference run'\''s raw \`barcodes.tsv\` to compare matrices entry-for-entry]:BARCODES:_files' \
'--out-dir=[Output directory; receives matrix.mtx, features.tsv, barcodes.tsv]:OUT_DIR:_files' \
'--locus-gap=[]:LOCUS_GAP:_default' \
'--use-cb-tag[Take cell identity from the BAM'\''s corrected \`CB\` tag instead of correcting \`CR\` ourselves. Diagnostic only\: reuse corrected \`CB\` tags from the reference BAM instead of exercising Gravlax barcode correction. This separates barcode differences from assignment differences]' \
'--no-collapse[Diagnostic\: skip 1MM UMI collapse (count distinct raw UMIs)]' \
'--no-multigene-filter[Diagnostic\: skip the MultiGeneUMI_CR filter]' \
'--read-level[Classify every READ against the annotation instead of one representative per molecule. This is STARsolo'\''s own semantics (a UMI counts for a gene if any of its reads is concordant there) and the upper bound a molecule-level archive must approximate]' \
'--simple-bc[Use the simple exact-or-unique-1MM barcode rule instead of the STARsolo-style pseudocount-posterior corrector. Diagnostic comparison only]' \
'--chain-representative[With --read-level\: keep only ONE unique read per (cell, UMI, locus, junction-chain) — the most-contained (max start, tie min end). Emulates replay from an archive whose molecule payload is one representative per chain plus multimapper patterns, pricing the fidelity cost of not storing every read'\''s exact span]' \
'--two-reps[With --chain-representative\: also keep the most-EXTENDED read of each chain when distinct from the most-contained one. The two span extremes bracket the containment behaviour of every read in between, at the cost of one extra placement for span-diverse chains]' \
'--no-multimappers[Skip multi-locus (NH>1) reads entirely. Default is to count a multimapper whose alignments all resolve to ONE gene, which is what STARsolo'\''s \`Gene\` feature actually does ("unique gene", not "unique alignment") — verified on EEF1A1, where a single cell shows 106 distinct UMIs across 123 mostly-secondary alignments, a matrix count of 102, and primary-GX tags of just 4. On the evaluated PBMC sample this behavior accounts for about 2.2% of total matrix mass]' \
'-h[Print help]' \
'--help[Print help]' \
':bam -- Annotation-free ingest BAM (coordinate-sorted, CR/UR tags):_files' \
&& ret=0
;;
(assign-diff)
_arguments "${_arguments_options[@]}" : \
'--gtf=[The same GTF used for the STARsolo reference run]:GTF:_files' \
'--examples=[Print up to this many examples per disagreement class]:EXAMPLES:_default' \
'--json-out=[]:JSON_OUT:_files' \
'-h[Print help]' \
'--help[Print help]' \
':bam -- STARsolo reference BAM with GX tags and alignments identical to those being classified:_files' \
&& ret=0
;;
(sig-stats)
_arguments "${_arguments_options[@]}" : \
'--whitelist=[]:WHITELIST:_files' \
'--locus-gap=[]:LOCUS_GAP:_default' \
'--site-gap=[Gap between molecule starts that closes a 3'\'' site (positions within a site are offsets)]:SITE_GAP:_default' \
'--zstd-level=[]:ZSTD_LEVEL:_default' \
'--json-out=[]:JSON_OUT:_files' \
'-h[Print help]' \
'--help[Print help]' \
':bam -- Annotation-free ingest BAM with CR/UR, secondaries included:_files' \
&& ret=0
;;
(debug)
_arguments "${_arguments_options[@]}" : \
'--dump-dir=[Write each chunk stream (concatenated across chunks) and each dictionary/index section as a raw .bin into this directory, for external recompression experiments]:DUMP_DIR:_files' \
'-h[Print help]' \
'--help[Print help]' \
':archive:_files' \
&& ret=0
;;
(em)
_arguments "${_arguments_options[@]}" : \
'--gtf=[]:GTF:_files' \
'--mask=[Fraction of mixed classes to mask for the labeled evaluation]:MASK:_default' \
'--seed=[]:SEED:_default' \
'--alpha=[Global-prior weight for blend mode]:ALPHA:_default' \
'--groups=[Two-column BARCODE/GROUP map enabling group-only and hierarchical evaluation modes.  Cells absent from the map retain the global fallback and are excluded from all mode scores]:GROUPS:_files' \
'--group-alpha=[Hierarchical pseudo-count mass borrowed from the supplied group distribution]:GROUP_ALPHA:_default' \
'--global-alpha=[Hierarchical pseudo-count mass borrowed from the whole-sample distribution]:GLOBAL_ALPHA:_default' \
'--convex-cell-weight=[Candidate-normalized convex weight on the target cell distribution]:CONVEX_CELL_WEIGHT:_default' \
'--convex-group-weight=[Candidate-normalized convex weight on the leave-one-cell-out group distribution. The whole-sample weight is the simplex remainder after cell and group weights]:CONVEX_GROUP_WEIGHT:_default' \
'--convex-group-prior=[Candidate-level sample pseudo-count mass used to shrink the leave-one-cell-out group distribution. Unlike --group-alpha, this mass is applied after candidate normalization]:CONVEX_GROUP_PRIOR:_default' \
'--dirichlet-cell-prior=[Candidate-level group-posterior mass borrowed by each cell in the posterior-mean hierarchical Dirichlet screening approximation]:DIRICHLET_CELL_PRIOR:_default' \
'--dirichlet-group-prior=[Candidate-level sample-posterior mass borrowed by each leave-one-cell-out group in the posterior-mean hierarchical Dirichlet screening approximation]:DIRICHLET_GROUP_PRIOR:_default' \
'--hybrid-depth-scale=[Half-transition evidence depth for hybrid weighting. The weight is depth^power / (depth^power + scale^power), using fitted unique candidate mass]:HYBRID_DEPTH_SCALE:_default' \
'--hybrid-depth-power=[Positive Hill power controlling the sharpness of the monotone hybrid transition]:HYBRID_DEPTH_POWER:_default' \
'--metrics-json=[Write proper-score and calibration metrics as JSON]:METRICS_JSON:_files' \
'--candidate-genes-out=[Write the sorted union of genes occurring in masked evaluation candidate sets]:CANDIDATE_GENES_OUT:_files' \
'--emit=[With --mask 0\: write the additive fractional recovered-counts layer (em.mtx, real-valued) into this directory. Requires --barcodes for column order]:EMIT:_files' \
'--barcodes=[Barcode list defining emitted column order (for example, STARsolo raw barcodes.tsv)]:BARCODES:_files' \
'--plot=[Write a reliability diagram (per-mode empirical accuracy by responsibility decile) from the masked run'\''s calibration counts]:PLOT:_files' \
'(--emit)--convex-only[Evaluate only the candidate-normalized convex mode. This avoids recomputing the eight reference modes during weight/prior grids and cannot be used for production emission]' \
'(--emit --convex-only)--dirichlet-only[Evaluate only the posterior-mean Dirichlet proxy. This screens evidence-adaptive pooling before any full variational model is implemented and cannot emit production counts]' \
'(--emit --convex-only --dirichlet-only)--hybrid-only[Evaluate only the preferred monotone evidence-depth hybrid. This masked-recovery mode cannot emit production counts]' \
'--collapse-groups[Assign every archive cell to one group, but retain the --groups barcodes as the evaluation population. This is the registered collapse-to-pooled control]' \
'--candidate-genes-only[Stop after writing --candidate-genes-out, without running EM iterations]' \
'--star[EM-0\: replicate STARsolo --soloMultiMappers EM exactly (per-cell, intersection candidate sets, STAR'\''s init/zeroing/convergence) and emit UniqueAndMult-EM.mtx into --emit]' \
'--eager[Use the v1 eager row/vector/hash-table implementation as a semantic and performance reference.  The default recovery EM streams archive batches into packed cell shards]' \
'-h[Print help]' \
'--help[Print help]' \
':archive:_files' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_aie__subcmd__dev__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:aie-dev-help-command-$line[1]:"
        case $line[1] in
            (gate-c)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(gate-d)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(build)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(umi-graph)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(replay)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(assign-diff)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(sig-stats)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(debug)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(em)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(gate-c)
_arguments "${_arguments_options[@]}" : \
'--gene-assigned-from=[Restrict the comparison to reads assigned to a gene in this STARsolo BAM, using its \`GX\` tag. Reads that no annotation claims cannot affect a gene count]:GENE_ASSIGNED_FROM:_files' \
'--json-out=[Write the per-category counts here as JSON]:JSON_OUT:_files' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':a -- Baseline BAM (config i\: annotation-free ingest):_files' \
':b -- Comparison BAM (config ii or iii\: annotation-aware):_files' \
&& ret=0
;;
(gate-d)
_arguments "${_arguments_options[@]}" : \
'--locus-gap=[Maximum gap, in bp, between consecutive read starts of one molecule. Reads of a single 10x molecule pile at a shared 3'\'' end, so this only has to absorb fragment-length jitter]:LOCUS_GAP:_default' \
'--cells=[STARsolo \`Solo.out/Gene/filtered/barcodes.tsv\`. Per-cell statistics are meaningless without it\: the unfiltered whitelist is ~65k empty droplets carrying a handful of counts each, on which G1 and G2 agree trivially, so the median over all barcodes reads 0% however bad the grouping is]:CELLS:_files' \
'--json-out=[]:JSON_OUT:_files' \
'--correct-umi[Merge UMIs within one substitution of a more abundant UMI at the same locus. STARsolo applies \`1MM_CR\` per (cell, gene); without an equivalent, G2 over-splits and the comparison measures missing error-correction rather than missing annotation. The correction runs inside a genomic locus and consults no annotation]' \
'-h[Print help]' \
'--help[Print help]' \
':bam -- Coordinate-sorted STARsolo reference BAM carrying CB/UB/UR/GX:_files' \
&& ret=0
;;
(build)
_arguments "${_arguments_options[@]}" : \
'--whitelist=[10x barcode whitelist (one 16 bp barcode per line)]:WHITELIST:_files' \
'--locus-gap=[Locus gap in bp for single-linkage molecule grouping]:LOCUS_GAP:_default' \
'--zstd-level=[zstd level for the size report]:ZSTD_LEVEL:_default' \
'--json-out=[]:JSON_OUT:_files' \
'--no-umi-collapse[Skip 1-mismatch UMI collapse at ingest, keeping one molecule per exact UMI value per locus. This is the graph-variant base\: every merge decision is deferred to replay (served by the UMI-adjacency graph), so none is baked in. Slightly more molecules, strictly more replayable]' \
'-h[Print help]' \
'--help[Print help]' \
':bam -- Annotation-free ingest BAM, coordinate-sorted, carrying raw `CR`/`UR`:_files' \
&& ret=0
;;
(umi-graph)
_arguments "${_arguments_options[@]}" : \
'--cells=[Filtered cell list for per-cell statistics]:CELLS:_files' \
'--locus-gap=[Locus gap for the base (ingest-time) molecule definition. Reads of one physical molecule pile within a fragment length, so this is deliberately small; everything beyond it is the graph'\''s job at replay time, not the ingest'\''s]:LOCUS_GAP:_default' \
'--store-window=[Window for edges retained in the STORED graph. Bounds the gene spans replay can serve; statistics are reported across a range of windows regardless]:STORE_WINDOW:_default' \
'--json-out=[]:JSON_OUT:_files' \
'-h[Print help]' \
'--help[Print help]' \
':bam -- BAM with CR/UR and, when collapse comparison is requested, reference CB/UB/GX tags:_files' \
&& ret=0
;;
(replay)
_arguments "${_arguments_options[@]}" : \
'--gtf=[GTF to replay — the annotation the archive has never seen]:GTF:_files' \
'--whitelist=[10x barcode whitelist]:WHITELIST:_files' \
'--barcodes=[Barcode list defining output column order. Pass the reference run'\''s raw \`barcodes.tsv\` to compare matrices entry-for-entry]:BARCODES:_files' \
'--out-dir=[Output directory; receives matrix.mtx, features.tsv, barcodes.tsv]:OUT_DIR:_files' \
'--locus-gap=[]:LOCUS_GAP:_default' \
'--use-cb-tag[Take cell identity from the BAM'\''s corrected \`CB\` tag instead of correcting \`CR\` ourselves. Diagnostic only\: reuse corrected \`CB\` tags from the reference BAM instead of exercising Gravlax barcode correction. This separates barcode differences from assignment differences]' \
'--no-collapse[Diagnostic\: skip 1MM UMI collapse (count distinct raw UMIs)]' \
'--no-multigene-filter[Diagnostic\: skip the MultiGeneUMI_CR filter]' \
'--read-level[Classify every READ against the annotation instead of one representative per molecule. This is STARsolo'\''s own semantics (a UMI counts for a gene if any of its reads is concordant there) and the upper bound a molecule-level archive must approximate]' \
'--simple-bc[Use the simple exact-or-unique-1MM barcode rule instead of the STARsolo-style pseudocount-posterior corrector. Diagnostic comparison only]' \
'--chain-representative[With --read-level\: keep only ONE unique read per (cell, UMI, locus, junction-chain) — the most-contained (max start, tie min end). Emulates replay from an archive whose molecule payload is one representative per chain plus multimapper patterns, pricing the fidelity cost of not storing every read'\''s exact span]' \
'--two-reps[With --chain-representative\: also keep the most-EXTENDED read of each chain when distinct from the most-contained one. The two span extremes bracket the containment behaviour of every read in between, at the cost of one extra placement for span-diverse chains]' \
'--no-multimappers[Skip multi-locus (NH>1) reads entirely. Default is to count a multimapper whose alignments all resolve to ONE gene, which is what STARsolo'\''s \`Gene\` feature actually does ("unique gene", not "unique alignment") — verified on EEF1A1, where a single cell shows 106 distinct UMIs across 123 mostly-secondary alignments, a matrix count of 102, and primary-GX tags of just 4. On the evaluated PBMC sample this behavior accounts for about 2.2% of total matrix mass]' \
'-h[Print help]' \
'--help[Print help]' \
':bam -- Annotation-free ingest BAM (coordinate-sorted, CR/UR tags):_files' \
&& ret=0
;;
(assign-diff)
_arguments "${_arguments_options[@]}" : \
'--gtf=[The same GTF used for the STARsolo reference run]:GTF:_files' \
'--examples=[Print up to this many examples per disagreement class]:EXAMPLES:_default' \
'--json-out=[]:JSON_OUT:_files' \
'-h[Print help]' \
'--help[Print help]' \
':bam -- STARsolo reference BAM with GX tags and alignments identical to those being classified:_files' \
&& ret=0
;;
(sig-stats)
_arguments "${_arguments_options[@]}" : \
'--whitelist=[]:WHITELIST:_files' \
'--locus-gap=[]:LOCUS_GAP:_default' \
'--site-gap=[Gap between molecule starts that closes a 3'\'' site (positions within a site are offsets)]:SITE_GAP:_default' \
'--zstd-level=[]:ZSTD_LEVEL:_default' \
'--json-out=[]:JSON_OUT:_files' \
'-h[Print help]' \
'--help[Print help]' \
':bam -- Annotation-free ingest BAM with CR/UR, secondaries included:_files' \
&& ret=0
;;
(ingest-archive)
_arguments "${_arguments_options[@]}" : \
'--whitelist=[]:WHITELIST:_files' \
'--out=[]:OUT:_files' \
'--locus-gap=[]:LOCUS_GAP:_default' \
'--zstd-level=[]:ZSTD_LEVEL:_default' \
'--chunk-mb=[Genomic chunk size in megabases. Smaller chunks trade archive overhead for more selective regional reads; the ingest report prints the resulting archive size]:CHUNK_MB:_default' \
'--genome=[Reference FASTA (plain or gzipped) to bind for sequence-consulting queries. Gravlax hashes its exact bytes and normalized contigs; its relationship to the alignment is explicitly caller-declared rather than inferred. Hashing runs concurrently with extraction]:GENOME:_files' \
'--junction-discovery=[Declare how splice junctions were supplied or learned for this alignment. Gravlax records this declaration verbatim and does not infer it from an aligner command line]:JUNCTION_DISCOVERY:(unspecified one-pass per-library-two-pass frozen-catalogue)' \
'--junction-catalogue=[Exact STAR-style junction table supplied to pass 2. For per-library two-pass, this is the pass-1 output (for STAR Basic, \`_STARpass1/SJ.out.tab\`), not pass 2'\''s final \`SJ.out.tab\`. Required for per-library-two-pass and frozen-catalogue declarations; the file'\''s role is caller-declared, while its exact bytes and parsed data-row count are archived]:JUNCTION_CATALOGUE:_files' \
'--alignment-annotation=[Annotation supplied while building the alignment index or injecting splice junctions. Its exact-byte identity and locator are recorded; omission means no such file was declared]:ALIGNMENT_ANNOTATION:_files' \
'--alignment-index-identity=[Caller-declared content identity or reproducible locator for the aligner index]:ALIGNMENT_INDEX_IDENTITY:_default' \
'*--alignment-input=[Ordered source-read or other files supplied to the aligner. Repeat in original argument order. Gravlax verifies each file'\''s current bytes; their aligner role is caller-declared]:ALIGNMENT_INPUTS:_files' \
'--alignment-log=[Aligner log containing resolved defaults, if available]:ALIGNMENT_LOG:_files' \
'--alignment-chemistry=[Caller-declared library chemistry used for alignment and strand interpretation]:ALIGNMENT_CHEMISTRY:_default' \
'--report-format=[Emit a versioned uniform operation report instead of the legacy stdout summary]:REPORT_FORMAT:(text tsv json)' \
'--report-output=[Atomically publish the operation report here without replacing an existing file]:REPORT_OUTPUT:_files' \
'--terminal-tails[Retain the frozen, sequence-free terminal-tail observable from records with an explicit integer \`NH=1\` tag in forward-stranded 10x 3′ cDNA\: trailing A on forward alignments and leading T on reverse alignments. This is not a chemistry-generic tail detector. Inspected clipped sequence is never stored]' \
'-h[Print help]' \
'--help[Print help]' \
':bam -- Tagged, coordinate-sorted ingest BAM (CR/UR/CY, secondaries included):_files' \
&& ret=0
;;
(compile-annotation)
_arguments "${_arguments_options[@]}" : \
'--out=[Destination compiled annotation (\`.aic\`). Refuses to overwrite an existing file]:OUT:_files' \
'--report-format=[Emit a versioned report while preserving the compiled artifact at --out]:REPORT_FORMAT:(text tsv json)' \
'--report-output=[Publish the uniform report atomically without replacing an existing file]:REPORT_OUTPUT:_files' \
'-h[Print help]' \
'--help[Print help]' \
':gtf -- Source annotation in uncompressed GTF format:_files' \
&& ret=0
;;
(export-molecule-bam)
_arguments "${_arguments_options[@]}" : \
'--fai=[FASTA index supplying standards-compliant @SQ lengths]:FAI:_files' \
'--out=[Sequence-free BAM carrying the exact post-correction molecule abstraction]:OUT:_files' \
'--report-format=[Emit a versioned export report while preserving the BAM artifact at --out]:REPORT_FORMAT:(text tsv json)' \
'--report-output=[Publish the uniform report atomically without replacing an existing file]:REPORT_OUTPUT:_files' \
'-h[Print help]' \
'--help[Print help]' \
':archive -- Input `.aie` archive:_files' \
&& ret=0
;;
(replay-rows)
_arguments "${_arguments_options[@]}" : \
'--gtf=[]:GTF:_files' \
'--whitelist=[Whitelist; required with --from-bam]:WHITELIST:_files' \
'--barcodes=[Barcode list defining output column order (for example, STARsolo raw barcodes.tsv)]:BARCODES:_files' \
'--out-dir=[]:OUT_DIR:_files' \
'--locus-gap=[]:LOCUS_GAP:_default' \
'--solo-strand=[STARsolo cDNA-alignment/transcript strand relationship. 10x 3'\'' uses forward; R2-only 10x 5'\'' uses reverse]:SOLO_STRAND:(forward reverse unstranded)' \
'--report-format=[Emit a versioned uniform operation report instead of the legacy stdout summary]:REPORT_FORMAT:(text tsv json)' \
'--report-output=[Atomically publish the operation report here without replacing an existing file]:REPORT_OUTPUT:_files' \
'(--from-molecule-bam)--from-bam[Interpret \`input\` as a BAM and extract rows on the fly (the regression reference path)]' \
'(--from-bam)--from-molecule-bam[Interpret input as \`export-molecule-bam\` output. This path consumes opaque UMI-class ids and explicit 1MM edges; no whitelist or unavailable nucleotide UMI value is invented]' \
'--velocity[Emit STARsolo Velocyto semantics (spliced/unspliced/ambiguous matrices) instead of Gene]' \
'--audit-multigene[Print the multi-gene ambiguity audit (the EM upside bound) instead of emitting a matrix]' \
'--eager[Diagnostic reference path\: decode the entire archive before Gene replay. Normal archive replay streams bounded chunk batches and produces byte-identical output at lower peak RSS]' \
'-h[Print help]' \
'--help[Print help]' \
':input -- `.aie` archive, raw ingest BAM with --from-bam, or post-correction BAM with --from-molecule-bam:_files' \
&& ret=0
;;
(compare-annotations)
_arguments "${_arguments_options[@]}" : \
'--annotation-a=[Annotation used as the before side of the comparison (GTF or compiled AIC)]:A:_files' \
'--annotation-b=[Annotation used as the after side of the comparison (GTF or compiled AIC)]:B:_files' \
'--assembly=[Reference assembly shared by both annotations]:ASSEMBLY:_default' \
'--annotation-a-label=[Human-readable provenance label for annotation A]:LABEL:_default' \
'--annotation-b-label=[Human-readable provenance label for annotation B]:LABEL:_default' \
'--annotation-a-digest=[Expected BLAKE3 content digest for annotation A (\`blake3\:<hex>\`)]:DIGEST:_default' \
'--annotation-b-digest=[Expected BLAKE3 content digest for annotation B (\`blake3\:<hex>\`)]:DIGEST:_default' \
'--gene-key=[Cross-annotation gene identifier matching policy]:GENE_KEY:(unversioned exact)' \
'--solo-strand=[Strand convention used for both annotation assignments]:SOLO_STRAND:(forward reverse unstranded)' \
'--max-molecule-witnesses=[Maximum molecule witnesses retained in the whole report]:MAX_MOLECULE_WITNESSES:_default' \
'--max-row-transitions-per-molecule=[Maximum changed evidence rows retained in one molecule witness]:MAX_ROW_TRANSITIONS_PER_MOLECULE:_default' \
'--format=[Output representation. TSV requires one table selected with \`--table\`]:FORMAT:(text json tsv)' \
'--table=[Table emitted by TSV output; invalid with text or JSON output]:TABLE:(count-deltas class-transitions contributing-causes witnesses)' \
'-o+[Write atomically to a new file instead of standard output]:FILE:_files' \
'--output=[Write atomically to a new file instead of standard output]:FILE:_files' \
'--allow-identical[Permit annotations whose observed content digests are identical]' \
'-h[Print help]' \
'--help[Print help]' \
':archive -- Evidence archive replayed once against both annotations:_files' \
&& ret=0
;;
(query)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':archive:_files' \
":: :_aie__subcmd__query_commands" \
"*::: :->query" \
&& ret=0

    case $state in
    (query)
        words=($line[2] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:aie-query-command-$line[2]:"
        case $line[2] in
            (transcript-ecs)
_arguments "${_arguments_options[@]}" : \
'--annotation-file=[GTF or compiled AIC whose transcripts define compatibility]:ANNOTATION_FILE:_files' \
'--assembly=[Exact reference assembly label attached to annotation resolution]:ASSEMBLY:_default' \
'--annotation-label=[Exact annotation release or immutable label]:ANNOTATION_LABEL:_default' \
'--annotation-digest=[Optional expected annotation identity as blake3\:<64 lowercase hex characters>]:ANNOTATION_DIGEST:_default' \
'(--locus)--feature=[Gene identifier or symbol resolved against the bound annotation]:FEATURE:_default' \
'(--feature)--locus=[0-based half-open window; selects transcripts whose spans overlap it]:LOCUS:_default' \
'--solo-strand=[STARsolo alignment/transcript strand relationship]:SOLO_STRAND:(forward reverse unstranded)' \
'(--groups)--cells=[Headerless file with one archive barcode per line; only these cells contribute]:CELLS:_files' \
'(--cells)--groups=[Headerless barcode<TAB>group file; listed archive cells define the scope]:GROUPS:_files' \
'--agg=[Output aggregation. \`auto\` selects groups when --groups is present, cells otherwise]:AGG:((auto\:"Per-cell without --groups; per-group with --groups"
cell\:""
group\:""
bulk\:""))' \
'--max-ecs=[Hard output limit for distinct compatible transcript sets; never truncates]:MAX_ECS:_default' \
'--max-memberships=[Hard output limit for membership rows; never truncates]:MAX_MEMBERSHIPS:_default' \
'--format=[]:FORMAT:(text json tsv)' \
'--table=[Required for TSV; unavailable for JSON and text]:TABLE:(catalog counts membership)' \
'-o+[Write atomically without replacing an existing path]:OUTPUT:_files' \
'--output=[Write atomically without replacing an existing path]:OUTPUT:_files' \
'--emit-membership[Include one row per scoped archived UMI class]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(batch)
_arguments "${_arguments_options[@]}" : \
'--plan=[Strict TSV with header\: id, kind, locus (kind is region or junction)]:PLAN:_files' \
'--top=[Number of per-cell rows per result (0 = all)]:TOP:_default' \
'--format=[Use the versioned uniform result contract instead of the legacy presentation]:FORMAT:(text tsv json)' \
'-o+[Publish atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'--output=[Publish atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'(--groups)--cells=[Headerless file with one archive barcode per line; only these cells contribute]:CELLS:_files' \
'(--cells)--groups=[Headerless barcode<TAB>group file; listed archive cells define the scope]:GROUPS:_files' \
'--agg=[Output aggregation. \`auto\` selects groups when --groups is present, cells otherwise]:AGG:((auto\:"Per-cell without --groups; per-group with --groups"
cell\:""
group\:""
bulk\:""))' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(cooccur)
_arguments "${_arguments_options[@]}" : \
'*--predicate=[Named predicate NAME=KIND\:chrom\:start-end\[\:+|-\]; KIND is region, junction, or terminal]:PREDICATES:_default' \
'--where=[Boolean expression over predicate names using !, &, |, and parentheses]:EXPRESSION:_default' \
'--universe=[Named positive predicate defining the population in which the expression is evaluated]:UNIVERSE:_default' \
'--unit=[Evidence identity on which predicates must co-occur]:UNIT:((molecule-record\:"Evaluate the expression against one serialized molecule record"
umi-class\:"Merge every record carrying one barcode-corrected cell and exact raw UMI value; requires a complete archive pass and does not collapse one-mismatch UMI edges"))' \
'--region-match=[How region predicates match retained evidence]:REGION_MATCH:((anchor\:"Match the archive anchor used by the range index"
aligned-block\:"Match any aligned block among the retained direct placement representatives"))' \
'--placements=[Use uniquely mapped chains, or explicitly inspect a multimapper'\''s stored direct placement or every retained alternative. Multimapper modes are not physical-molecule proof]:PLACEMENTS:((unique\:"Inspect only uniquely mapped chain evidence; this is the conservative default for same-molecule claims"
direct\:"Inspect unique chains plus the stored direct placement of a multimapper for junction and aligned-block predicates; archive-anchor regions remain record-anchor tests"
all\:"Inspect every retained multimapper alternative for junction and aligned-block predicates; archive-anchor regions remain record-anchor tests. An indexed junction universe then requires --allow-full-scan because archive v2 has no alternative-placement postings"))' \
'--max-chunks=[Hard bound on routed archive chunks; exceeding it is an error, never truncation]:MAX_CHUNKS:_default' \
'--max-evidence-records=[Hard bound on decoded evidence records retained for exact evaluation]:MAX_EVIDENCE_RECORDS:_default' \
'--max-terminal-events=[Hard bound checked against declared terminal-tail events before sparse tail decoding]:MAX_TERMINAL_EVENTS:_default' \
'--max-memberships=[Hard membership-row bound; exceeding it is an error, never truncation]:MAX_MEMBERSHIPS:_default' \
'--max-pattern-rows=[Hard bound on aggregate pattern rows; exceeding it is an error, never truncation]:MAX_PATTERN_ROWS:_default' \
'(--groups)--cells=[Headerless file with one archive barcode per line; only these cells contribute]:CELLS:_files' \
'(--cells)--groups=[Headerless barcode<TAB>group file; listed archive cells define the scope]:GROUPS:_files' \
'--agg=[Output aggregation. \`auto\` selects groups when --groups is present, cells otherwise]:AGG:((auto\:"Per-cell without --groups; per-group with --groups"
cell\:""
group\:""
bulk\:""))' \
'--format=[Use the versioned uniform result contract instead of the legacy presentation]:FORMAT:(text tsv json)' \
'-o+[Publish atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'--output=[Publish atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'--allow-full-scan[Permit the exact complete pass required by UMI-class, aligned-block-universe, or all-alternative junction-universe evaluation]' \
'--emit-membership[Include one row per evidence unit in the named \`memberships\` table]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(region)
_arguments "${_arguments_options[@]}" : \
'--top=[Number of cell rows. With --format, 0 = all; legacy unscoped output retains its historical 0-row behavior]:TOP:_default' \
'--plot=[Write a sashimi-style SVG portrait of the window\: per-strand molecule coverage with junction arcs weighted by support (window limited to 5 Mb)]:PLOT:_files' \
'--export-prefix=[Write IGV-ready tracks\: <prefix>.plus.bedgraph, <prefix>.minus.bedgraph (molecule coverage per strand) and <prefix>.junctions.bed (BED12, TopHat-style)]:EXPORT_PREFIX:_files' \
'--gtf=[GTF for a gene underlay in --plot]:GTF:_files' \
'--format=[Use the versioned uniform result contract instead of the legacy presentation]:FORMAT:(text tsv json)' \
'-o+[Publish atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'--output=[Publish atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'(--groups)--cells=[Headerless file with one archive barcode per line; only these cells contribute]:CELLS:_files' \
'(--cells)--groups=[Headerless barcode<TAB>group file; listed archive cells define the scope]:GROUPS:_files' \
'--agg=[Output aggregation. \`auto\` selects groups when --groups is present, cells otherwise]:AGG:((auto\:"Per-cell without --groups; per-group with --groups"
cell\:""
group\:""
bulk\:""))' \
'(--json)--tsv[Emit a header and scoped count rows; diagnostics go to stderr]' \
'(--tsv)--json[Emit one JSON object; diagnostics go to stderr]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':locus -- e.g. chr6\:73489308-73525587:_default' \
&& ret=0
;;
(junction)
_arguments "${_arguments_options[@]}" : \
'--top=[Number of per-cell rows (0 = all)]:TOP:_default' \
'--format=[Use the versioned uniform result contract instead of the legacy presentation]:FORMAT:(text tsv json)' \
'-o+[Publish atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'--output=[Publish atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'(--groups)--cells=[Headerless file with one archive barcode per line; only these cells contribute]:CELLS:_files' \
'(--cells)--groups=[Headerless barcode<TAB>group file; listed archive cells define the scope]:GROUPS:_files' \
'--agg=[Output aggregation. \`auto\` selects groups when --groups is present, cells otherwise]:AGG:((auto\:"Per-cell without --groups; per-group with --groups"
cell\:""
group\:""
bulk\:""))' \
'(--json)--tsv[Emit a header and per-cell rows only; diagnostics go to stderr]' \
'(--tsv)--json[Emit one JSON object only; diagnostics go to stderr]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':locus -- e.g. chr1\:155234452-155235327:_default' \
&& ret=0
;;
(junctions)
_arguments "${_arguments_options[@]}" : \
'--min-support=[Minimum index supporting-child count]:MIN_SUPPORT:_default' \
'--min-cells=[Minimum exact cell count; implies --with-cells when nonzero]:MIN_CELLS:_default' \
'--gtf=[Mark exact and endpoint membership in this annotation (either strand in format v1)]:GTF:_files' \
'--format=[Use the versioned uniform result contract instead of the legacy presentation]:FORMAT:(text tsv json)' \
'-o+[Publish atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'--output=[Publish atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'(--groups)--cells=[Headerless file with one archive barcode per line; only these cells contribute]:CELLS:_files' \
'(--cells)--groups=[Headerless barcode<TAB>group file; listed archive cells define the scope]:GROUPS:_files' \
'--agg=[Output aggregation. \`auto\` selects groups when --groups is present, cells otherwise]:AGG:((auto\:"Per-cell without --groups; per-group with --groups"
cell\:""
group\:""
bulk\:""))' \
'--either[Include a junction when either endpoint is in the window; default requires both]' \
'--with-cells[Decode selected postings and report exact class-deduplicated UMI and cell counts]' \
'(--json)--tsv[Emit a header and rows only; diagnostics go to stderr]' \
'(--tsv)--json[Emit one JSON object only; diagnostics go to stderr]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':locus -- e.g. chr11\:35138870-35232402 (0-based, half-open):_default' \
&& ret=0
;;
(jset)
_arguments "${_arguments_options[@]}" : \
'*--include=[Inclusion junction, chrom\:donor-acceptor; repeat for a junction set]:INCLUDE:_default' \
'*--exclude=[Exclusion junction, chrom\:donor-acceptor; repeat for a junction set]:EXCLUDE:_default' \
'--top=[Number of cell rows (0 = all); ignored for group/bulk aggregation]:TOP:_default' \
'--format=[Use the versioned uniform result contract instead of the legacy presentation]:FORMAT:(text tsv json)' \
'-o+[Publish atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'--output=[Publish atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'(--groups)--cells=[Headerless file with one archive barcode per line; only these cells contribute]:CELLS:_files' \
'(--cells)--groups=[Headerless barcode<TAB>group file; listed archive cells define the scope]:GROUPS:_files' \
'--agg=[Output aggregation. \`auto\` selects groups when --groups is present, cells otherwise]:AGG:((auto\:"Per-cell without --groups; per-group with --groups"
cell\:""
group\:""
bulk\:""))' \
'(--json)--tsv[Emit a header and count rows; diagnostics go to stderr]' \
'(--tsv)--json[Emit one JSON object; diagnostics go to stderr]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(events)
_arguments "${_arguments_options[@]}" : \
'*--event-type=[Event type; repeat to select several. The default is all supported types]:EVENT_TYPES:(alt-acceptor alt-donor cassette)' \
'--min-support=[Minimum catalogue supporting-child count for every event component]:MIN_SUPPORT:_default' \
'--min-informative=[Omit events with fewer scoped informative molecules after exact reduction]:MIN_INFORMATIVE:_default' \
'--max-events=[Hard candidate limit. Exceeding it is an error; results are never truncated]:MAX_EVENTS:_default' \
'--top=[Number of cell rows per event (0 = all); ignored for group/bulk aggregation]:TOP:_default' \
'--gtf=[Optional GTF or compiled AIC used only to label coordinate-defined events]:GTF:_files' \
'--format=[Use the versioned uniform result contract instead of the legacy presentation]:FORMAT:(text tsv json)' \
'-o+[Publish atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'--output=[Publish atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'(--groups)--cells=[Headerless file with one archive barcode per line; only these cells contribute]:CELLS:_files' \
'(--cells)--groups=[Headerless barcode<TAB>group file; listed archive cells define the scope]:GROUPS:_files' \
'--agg=[Output aggregation. \`auto\` selects groups when --groups is present, cells otherwise]:AGG:((auto\:"Per-cell without --groups; per-group with --groups"
cell\:""
group\:""
bulk\:""))' \
'(--json)--tsv[Emit a long TSV table; diagnostics go to stderr]' \
'(--tsv)--json[Emit one versioned JSON object; diagnostics go to stderr]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':locus -- Genomic window containing all component junctions, e.g. chr1\:45550000-45571000:_default' \
&& ret=0
;;
(splice-graph)
_arguments "${_arguments_options[@]}" : \
'--min-support=[Minimum catalogue supporting-child count for a junction to enter the graph]:MIN_SUPPORT:_default' \
'--min-path-umis=[Retain exact path fragments with at least this many scoped UMI classes]:MIN_PATH_UMIS:_default' \
'--max-paths=[Hard candidate-path limit. Exceeding it is an error; paths are never truncated]:MAX_PATHS:_default' \
'--format=[Use the versioned uniform result contract instead of the legacy presentation]:FORMAT:(text tsv json)' \
'-o+[Publish atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'--output=[Publish atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'(--groups)--cells=[Headerless file with one archive barcode per line; only these cells contribute]:CELLS:_files' \
'(--cells)--groups=[Headerless barcode<TAB>group file; listed archive cells define the scope]:GROUPS:_files' \
'--agg=[Output aggregation. \`auto\` selects groups when --groups is present, cells otherwise]:AGG:((auto\:"Per-cell without --groups; per-group with --groups"
cell\:""
group\:""
bulk\:""))' \
'--json[Emit one versioned JSON object; diagnostics go to stderr]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':locus -- Genomic window containing the graph, e.g. chr1\:45550000-45571000:_default' \
&& ret=0
;;
(apa)
_arguments "${_arguments_options[@]}" : \
'--site-gap=[Maximum distance in bp for clustering neighboring cleavage coordinates (minimum 1)]:SITE_GAP:_default' \
'--strand=[Restrict to one strand\: + or -]:STRAND:_default' \
'--groups=[Two-column TSV (barcode, group)\: emit per-site per-group UMI counts — differential 3'\'' usage between cell populations, straight from the archive — plus a site×group G-test over the window]:GROUPS:_files' \
'--genome=[Reference genome FASTA (plain or gzipped)\: enables the internal-priming filter (A-rich sequence downstream of the putative cleavage site). The contig is verified against the archive'\''s stamped genome signature before any sequence is consulted]:GENOME:_files' \
'--permute=[Positive number of cell-label permutations for the G-test; omitted uses chi-square only]:PERMUTE:_default' \
'--seed=[]:SEED:_default' \
'--plot=[Write an SVG lollipop portrait of the window'\''s 3'\''-sites (per-group usage band with --groups; internal-priming sites hollow with --genome)]:PLOT:_files' \
'--format=[Use the versioned uniform result contract instead of the legacy presentation]:FORMAT:(text tsv json)' \
'-o+[Publish atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'--output=[Publish atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'--tsv[Emit TSV rows instead of a summary]' \
'--drop-ip[With --genome\: drop flagged sites from output and tests instead of only flagging them]' \
'-h[Print help]' \
'--help[Print help]' \
':locus:_default' \
&& ret=0
;;
(apa-test)
_arguments "${_arguments_options[@]}" : \
'--gtf=[]:GTF:_files' \
'--groups=[Two-column TSV (barcode, group)]:GROUPS:_files' \
'--genome=[Reference genome FASTA for the internal-priming filter (verified against the stamp)]:GENOME:_files' \
'--site-gap=[]:SITE_GAP:_default' \
'--min-site-umis=[Minimum grouped UMIs for a site to enter the table]:MIN_SITE_UMIS:_default' \
'--min-gene-umis=[Minimum grouped UMIs across a gene'\''s sites for the gene to be tested]:MIN_GENE_UMIS:_default' \
'--tail-extend=[Count molecules ending up to this far past the annotated gene 3'\'' end]:TAIL_EXTEND:_default' \
'--permute=[Cell-label permutations per gene (0 = chi-square approximation only)]:PERMUTE:_default' \
'--seed=[]:SEED:_default' \
'--format=[Use the versioned uniform result contract instead of the legacy presentation]:FORMAT:(text tsv json)' \
'-o+[Publish atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'--output=[Publish atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(discover)
_arguments "${_arguments_options[@]}" : \
'--gtf=[]:GTF:_files' \
'--merge-gap=[Maximum gap in bp when clustering molecules into candidate loci]:MERGE_GAP:_default' \
'--min-umis=[Minimum class-deduplicated UMIs required for a candidate locus]:MIN_UMIS:_default' \
'--residual-min-umis=[Minimum UMI classes for the residual channel in \`residual-sites\` mode. The unchanged span channel continues to use --min-umis]:RESIDUAL_MIN_UMIS:_default' \
'--claim-mode=[Rule used to suppress evidence already explained by the supplied annotation]:CLAIM_MODE:(span strand-span compatible residual-sites)' \
'--solo-strand=[STARsolo alignment/transcript strand relationship. 10x 3'\'' uses forward; R2-only 10x 5'\'' uses reverse. Ignored by the historical \`span\` claiming mode]:SOLO_STRAND:(forward reverse unstranded)' \
'--emit-gtf=[Also write candidates as a GTF (single-exon genes, AIENOVEL ids) — the discover→refine→replay loop\: this file feeds straight back into \`replay-rows\`]:EMIT_GTF:_files' \
'--format=[Use the versioned uniform result contract instead of the legacy presentation]:FORMAT:(text tsv json)' \
'-o+[Publish atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'--output=[Publish atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'--tsv[Emit TSV rows (chrom, start, end, strand, umis, cells) instead of a summary]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_aie__subcmd__query__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:aie-query-help-command-$line[1]:"
        case $line[1] in
            (transcript-ecs)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(batch)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(cooccur)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(region)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(junction)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(junctions)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(jset)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(events)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(splice-graph)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(apa)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(apa-test)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(discover)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(debug)
_arguments "${_arguments_options[@]}" : \
'--dump-dir=[Write each chunk stream (concatenated across chunks) and each dictionary/index section as a raw .bin into this directory, for external recompression experiments]:DUMP_DIR:_files' \
'-h[Print help]' \
'--help[Print help]' \
':archive:_files' \
&& ret=0
;;
(federate)
_arguments "${_arguments_options[@]}" : \
'--top=[]:TOP:_default' \
'--format=[Use the versioned uniform result contract instead of the legacy presentation]:FORMAT:(text tsv json)' \
'-o+[Publish atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'--output=[Publish atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'-h[Print help]' \
'--help[Print help]' \
'*::archives -- Two or more .aie archives:_files' \
':locus -- junction chrom\:donor-acceptor:_default' \
&& ret=0
;;
(cohort)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_aie__subcmd__cohort_commands" \
"*::: :->cohort" \
&& ret=0

    case $state in
    (cohort)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:aie-cohort-command-$line[1]:"
        case $line[1] in
            (events)
_arguments "${_arguments_options[@]}" : \
'*--sample=[Named archive as ID=PATH; repeat at least twice]:SAMPLES:_default' \
'*--groups=[Optional named barcode/group map as ID=PATH; repeat for grouped samples]:GROUPS:_default' \
'*--event-type=[Event type; repeat to select several. The default is all supported types]:EVENT_TYPES:(alt-acceptor alt-donor cassette)' \
'--min-support=[Minimum catalogue supporting-child count for every component in a sample]:MIN_SUPPORT:_default' \
'--min-samples=[Minimum number of sample catalogues containing every event component]:MIN_SAMPLES:_default' \
'--min-informative=[Omit events with fewer informative molecules summed across samples]:MIN_INFORMATIVE:_default' \
'--min-row-informative=[Require every emitted group row (or bulk row) in every sample to have at least this many conservative informative molecules. Zero disables this row-level filter]:MIN_ROW_INFORMATIVE:_default' \
'--max-events=[Hard union-catalogue limit; exceeding it fails without truncation]:MAX_EVENTS:_default' \
'--gtf=[Optional GTF or compiled AIC used only for event labels]:GTF:_files' \
'(--tsv --json)--sparse-dir=[Stream a versioned sparse, zero-reconstructible table bundle into a new directory]:DIR:_files' \
'--format=[Use the versioned uniform result contract instead of the legacy presentation]:FORMAT:(text tsv json)' \
'-o+[Publish atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'--output=[Publish atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'(--json)--tsv[Emit a long sample/group TSV table]' \
'(--tsv)--json[Emit one versioned JSON object]' \
'-h[Print help]' \
'--help[Print help]' \
':locus -- Genomic window containing all event component junctions:_default' \
&& ret=0
;;
(splice-graph)
_arguments "${_arguments_options[@]}" : \
'--design=[Strict sample<TAB>condition<TAB>archive<TAB>cells design TSV]:DESIGN:_files' \
'--contrast=[Ordered CONDITION_A\:CONDITION_B contrast; the reported effect is B minus A]:CONTRAST:_default' \
'--min-support=[Minimum local catalogue support for an edge to count toward recurrence]:MIN_SUPPORT:_default' \
'--min-edge-samples=[Minimum sample catalogues meeting --min-support for a common edge]:MIN_EDGE_SAMPLES:_default' \
'--min-sample-umis=[Minimum same-strand path-fragment UMIs for a sample to enter inference]:MIN_SAMPLE_UMIS:_default' \
'--min-replicates=[Minimum eligible biological samples in each contrasted condition]:MIN_REPLICATES:_default' \
'--min-path-umis=[Minimum path UMIs across eligible samples before testing]:MIN_PATH_UMIS:_default' \
'--min-path-samples=[Minimum eligible samples with nonzero support for a path before testing]:MIN_PATH_SAMPLES:_default' \
'--max-paths=[Hard union-path limit. Exceeding it fails; paths are never truncated]:MAX_PATHS:_default' \
'--format=[Use the versioned uniform result contract instead of the legacy presentation]:FORMAT:(text tsv json)' \
'-o+[Publish atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'--output=[Publish atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'(--contrast)--counts-only[Emit exact sample rows without fitting a contrast]' \
'--json[Emit one versioned JSON object]' \
'-h[Print help]' \
'--help[Print help]' \
':locus -- Genomic window containing the common graph:_default' \
&& ret=0
;;
(transcript-ends)
_arguments "${_arguments_options[@]}" : \
'--design=[Strict sample<TAB>condition<TAB>archive<TAB>groups design TSV]:DESIGN:_files' \
'--gtf=[GTF or compiled AIC. It supplies gene windows and labels, never observed site positions]:GTF:_files' \
'--genome=[Stamped reference FASTA used for internal-priming and PAS-motif evidence]:GENOME:_files' \
'--polyasite=[Same-assembly PolyASite BED or BED.gz]:POLYASITE:_files' \
'--group-contrast=[Ordered GROUP_A\:GROUP_B paired contrast; effects are B minus A]:GROUP_CONTRAST:_default' \
'--out-dir=[Destination directory. It must not already exist]:OUT_DIR:_files' \
'--site-gap=[Adjacent endpoint coordinates at most this far apart form one site]:SITE_GAP:_default' \
'--tail-extend=[Extend gene windows this far in transcript 3'\'' direction]:TAIL_EXTEND:_default' \
'--min-site-umis=[A donor supports site recurrence with at least this many primary-group UMIs]:MIN_SITE_UMIS:_default' \
'--min-site-samples=[Minimum recurrent donors for a site to enter the output catalogue]:MIN_SITE_SAMPLES:_default' \
'--motif-min-samples=[Motif-only high-confidence sites require at least this many recurrent donors]:MOTIF_MIN_SAMPLES:_default' \
'--min-group-gene-umis=[Per donor, each contrasted group needs this many gene-site UMIs]:MIN_GROUP_GENE_UMIS:_default' \
'--min-samples=[Minimum eligible paired biological samples for a gene test]:MIN_SAMPLES:_default' \
'--min-distal-umis=[Minimum most-distal-site UMIs across eligible sample/group rows]:MIN_DISTAL_UMIS:_default' \
'--max-sites=[Hard site-catalogue bound. Exceeding it is an error; output is never truncated]:MAX_SITES:_default' \
'--shuffle-seed=[Deterministically shuffle the two group labels within each donor (negative control)]:SHUFFLE_SEED:_default' \
'--report-format=[Emit a versioned uniform report while preserving the scientific output directory]:REPORT_FORMAT:(text tsv json)' \
'--report-output=[Atomically publish the uniform report here without replacing an existing file]:REPORT_OUTPUT:_files' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(polyasite-mixture)
_arguments "${_arguments_options[@]}" : \
'--design=[Strict sample<TAB>condition<TAB>archive<TAB>groups design TSV]:DESIGN:_files' \
'--gtf=[GTF or compiled AIC supplying terminal-exon regions and labels]:GTF:_files' \
'--genome=[Stamped reference FASTA used to reject internal-priming candidates]:GENOME:_files' \
'--polyasite=[Same-assembly PolyASite BED or BED.gz supplying candidate site identities]:POLYASITE:_files' \
'--group-contrast=[Ordered GROUP_A\:GROUP_B paired contrast; effects are B minus A]:GROUP_CONTRAST:_default' \
'--out-dir=[Destination directory. It must not already exist]:OUT_DIR:_files' \
'--site-gap=[Merge adjacent external catalogue coordinates within this distance]:SITE_GAP:_default' \
'--tail-extend=[Extend terminal-exon regions this far in transcript 3'\'' direction]:TAIL_EXTEND:_default' \
'--min-site-umis=[A donor supports a deconvolved site with at least this many expected UMIs]:MIN_SITE_UMIS:_default' \
'--min-site-samples=[Minimum recurrent donors for a site to enter the fitted catalogue]:MIN_SITE_SAMPLES:_default' \
'--min-group-gene-umis=[Per donor, each contrasted group needs this many fitted gene-site UMIs]:MIN_GROUP_GENE_UMIS:_default' \
'--min-samples=[Minimum eligible paired biological samples for a gene test]:MIN_SAMPLES:_default' \
'--min-distal-umis=[Minimum fitted most-distal-site UMIs across eligible sample/group rows]:MIN_DISTAL_UMIS:_default' \
'--max-sites=[Hard candidate/recurrent-site bound. Exceeding it is an error; output is never truncated]:MAX_SITES:_default' \
'--shuffle-seed=[Deterministically shuffle the two group labels within each donor (negative control)]:SHUFFLE_SEED:_default' \
'--report-format=[Emit a versioned uniform report while preserving the scientific output directory]:REPORT_FORMAT:(text tsv json)' \
'--report-output=[Atomically publish the uniform report here without replacing an existing file]:REPORT_OUTPUT:_files' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_aie__subcmd__cohort__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:aie-cohort-help-command-$line[1]:"
        case $line[1] in
            (events)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(splice-graph)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(transcript-ends)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(polyasite-mixture)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(collection)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_aie__subcmd__collection_commands" \
"*::: :->collection" \
&& ret=0

    case $state in
    (collection)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:aie-collection-command-$line[1]:"
        case $line[1] in
            (build)
_arguments "${_arguments_options[@]}" : \
'*--sample=[Named archive as ID=PATH. IDs are sorted, so input order does not affect the file]:SAMPLES:_default' \
'*--source-digest=[Expected native BLAKE3 as ID=HEX (full-file digest for v1, directory root for v2). The builder always derives and verifies the identity from the source itself]:ID=BLAKE3:_default' \
'--base=[Extend an existing sidecar without rescanning its source archive indexes]:BASE:_files' \
'--out=[Destination \`.aicollection\`; existing files are never overwritten]:OUT:_files' \
'--format=[Use the versioned uniform result contract instead of the legacy presentation]:FORMAT:(text tsv json)' \
'-o+[Publish the uniform result atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'--output=[Publish the uniform result atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'--allow-unstamped[Permit archives lacking a stamped genome digest. Chromosome dictionaries must still match exactly, but reference-sequence identity then cannot be proven]' \
'--shape-routes[Derive source-root-bound exact intron-span routes from each archive'\''s shape dictionary. Molecule chunks remain authoritative; collections built without this flag retain the exact full-shape fallback]' \
'(--format)--json[Emit one versioned JSON object with exact source-I/O accounting]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(inspect)
_arguments "${_arguments_options[@]}" : \
'--format=[Use the versioned uniform result contract instead of the legacy presentation]:FORMAT:(text tsv json)' \
'-o+[Publish the uniform result atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'--output=[Publish the uniform result atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'--verify-content[Re-hash every source archive in addition to the default exact filesystem guard. Routed collections also reconstruct every shape route from its bound source shapes]' \
'--verify-routes[Decode every route block and reconstruct it exactly from the root-bound source shapes]' \
'-h[Print help]' \
'--help[Print help]' \
':collection:_files' \
&& ret=0
;;
(junction)
_arguments "${_arguments_options[@]}" : \
'--min-support=[Skip all source archives when the global support upper bound is below this threshold]:MIN_SUPPORT:_default' \
'--top=[]:TOP:_default' \
'--format=[Use the versioned uniform result contract instead of the legacy presentation]:FORMAT:(text tsv json)' \
'-o+[Publish the uniform result atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'--output=[Publish the uniform result atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'--explain[Include per-sample routing decisions and planned compressed bytes]' \
'--verify-content[Re-hash every source archive before querying]' \
'(--format)--json[Emit one versioned JSON object]' \
'-h[Print help]' \
'--help[Print help]' \
':collection:_files' \
':locus -- Junction as chrom\:donor-acceptor (0-based boundaries):_default' \
&& ret=0
;;
(region)
_arguments "${_arguments_options[@]}" : \
'--top=[]:TOP:_default' \
'--format=[Use the versioned uniform result contract instead of the legacy presentation]:FORMAT:(text tsv json)' \
'-o+[Publish the uniform result atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'--output=[Publish the uniform result atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'--explain[]' \
'--verify-content[]' \
'(--format)--json[]' \
'-h[Print help]' \
'--help[Print help]' \
':collection:_files' \
':locus -- Window as chrom\:start-end (0-based, half-open):_default' \
&& ret=0
;;
(jset)
_arguments "${_arguments_options[@]}" : \
'*--include=[]:INCLUDE:_default' \
'*--exclude=[]:EXCLUDE:_default' \
'--min-support=[Require every requested component'\''s global support upper bound to reach this threshold]:MIN_SUPPORT:_default' \
'--top=[]:TOP:_default' \
'--format=[Use the versioned uniform result contract instead of the legacy presentation]:FORMAT:(text tsv json)' \
'-o+[Publish the uniform result atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'--output=[Publish the uniform result atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'--explain[]' \
'--verify-content[]' \
'(--format)--json[]' \
'-h[Print help]' \
'--help[Print help]' \
':collection:_files' \
&& ret=0
;;
(find-events)
_arguments "${_arguments_options[@]}" : \
'*--kind=[Entity kind to search; repeat to select several. The default selects every supported kind]:KINDS:(junction alt-acceptor alt-donor cassette terminal-tail)' \
'--design=[Strict sample-to-donor TSV with header \`sample<TAB>donor\`. Without it, each sample is its own biological donor; this explicit default is recorded in result provenance]:DESIGN:_files' \
'--groups=[Strict cell-group TSV with header \`sample<TAB>barcode<TAB>group\`. When supplied, only listed cells are in scope. Without it, every archive cell contributes to the \`bulk\` group]:GROUPS:_files' \
'*--require-group=[Require exact support in each named group; repeat for multiple groups]:REQUIRED_GROUPS:_default' \
'--min-group-umi-classes=[Minimum exact archive UMI-class count in each --require-group]:MIN_GROUP_UMIS:_default' \
'--min-group-umis=[Minimum exact archive UMI-class count in each --require-group]:MIN_GROUP_UMIS:_default' \
'--min-donors=[Minimum distinct donors with exact unique-chain UMI-class support]:MIN_DONORS:_default' \
'--min-samples=[Minimum distinct source archives with exact unique-chain UMI-class support]:MIN_SAMPLES:_default' \
'--min-umi-classes=[Minimum exact archive UMI classes pooled across the selected cells]:MIN_UMIS:_default' \
'--min-umis=[Minimum exact archive UMI classes pooled across the selected cells]:MIN_UMIS:_default' \
'--min-side-umi-classes=[For alternative-splicing entities, require at least this many exact include-only and exclude-only archive UMI classes. This prevents one-sided candidates from surviving]:MIN_SIDE_UMIS:_default' \
'--min-side-umis=[For alternative-splicing entities, require at least this many exact include-only and exclude-only archive UMI classes. This prevents one-sided candidates from surviving]:MIN_SIDE_UMIS:_default' \
'--min-support=[Minimum catalogue route/support upper bound for every splice component]:MIN_SUPPORT:_default' \
'--terminal-cluster-bp=[Maximum gap between consecutive exact terminal-tail anchors in one strand-aware cluster. Zero reports one entity per exact anchor; exact anchor rows are always retained in output]:TERMINAL_CLUSTER_BP:_default' \
'--max-terminal-events=[Fail before decoding tail-bearing molecule chunks when capable archives declare more terminal events than this bound. Results are never truncated]:MAX_TERMINAL_EVENTS:_default' \
'--annotation=[Uncompressed GTF or compiled AIC used to classify annotation gaps]:ANNOTATION:_files' \
'--assembly=[Caller-declared reference assembly for --annotation; recorded but not inferred as compatible with the collection'\''s stamped genome]:ASSEMBLY:_default' \
'--annotation-label=[Immutable release or descriptive label for --annotation]:ANNOTATION_LABEL:_default' \
'--annotation-digest=[Optional expected annotation snapshot digest in blake3\:<64 lowercase hex> form]:ANNOTATION_DIGEST:_default' \
'--solo-strand=[STARsolo alignment/transcript strand relationship used for annotation compatibility]:SOLO_STRAND:(forward reverse unstranded)' \
'--max-candidates=[Hard limit on retained routed splice candidates plus terminal clusters. Never truncates]:MAX_CANDIDATES:_default' \
'--max-candidates-considered=[Hard limit on attempted splice-candidate definitions before recurrence filtering]:MAX_CANDIDATES_CONSIDERED:_default' \
'--max-routed-entries=[Hard limit on materialized candidate-to-archive target associations plus routed chunk postings. This bounds exact-routing memory; results are never truncated]:MAX_ROUTED_ENTRIES:_default' \
'--max-exact-match-attempts=[Hard limit on exact candidate-target checks against molecule junctions. Checked before each target list is expanded; results are never truncated]:MAX_EXACT_MATCH_ATTEMPTS:_default' \
'--max-annotation-comparisons=[Hard limit on indexed annotation transcript-comparison work. Checked before each local candidate set is classified; results are never truncated]:MAX_ANNOTATION_COMPARISONS:_default' \
'--format=[Use the versioned uniform result contract instead of the legacy presentation]:FORMAT:(text tsv json)' \
'-o+[Publish the uniform result atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'--output=[Publish the uniform result atomically without replacing an existing file; requires --format]:OUTPUT:_files' \
'--novel-only[Keep only entities incompatible with every eligible transcript; requires --annotation]' \
'--verify-content[Re-hash every source archive before exact routing]' \
'-h[Print help]' \
'--help[Print help]' \
':collection -- Authenticated collection whose indexes supply reverse-search candidates and routes:_files' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_aie__subcmd__collection__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:aie-collection-help-command-$line[1]:"
        case $line[1] in
            (build)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(inspect)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(junction)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(region)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(jset)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(find-events)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(em)
_arguments "${_arguments_options[@]}" : \
'--gtf=[]:GTF:_files' \
'--mask=[Fraction of mixed classes to mask for the labeled evaluation]:MASK:_default' \
'--seed=[]:SEED:_default' \
'--alpha=[Global-prior weight for blend mode]:ALPHA:_default' \
'--groups=[Two-column BARCODE/GROUP map enabling group-only and hierarchical evaluation modes.  Cells absent from the map retain the global fallback and are excluded from all mode scores]:GROUPS:_files' \
'--group-alpha=[Hierarchical pseudo-count mass borrowed from the supplied group distribution]:GROUP_ALPHA:_default' \
'--global-alpha=[Hierarchical pseudo-count mass borrowed from the whole-sample distribution]:GLOBAL_ALPHA:_default' \
'--convex-cell-weight=[Candidate-normalized convex weight on the target cell distribution]:CONVEX_CELL_WEIGHT:_default' \
'--convex-group-weight=[Candidate-normalized convex weight on the leave-one-cell-out group distribution. The whole-sample weight is the simplex remainder after cell and group weights]:CONVEX_GROUP_WEIGHT:_default' \
'--convex-group-prior=[Candidate-level sample pseudo-count mass used to shrink the leave-one-cell-out group distribution. Unlike --group-alpha, this mass is applied after candidate normalization]:CONVEX_GROUP_PRIOR:_default' \
'--dirichlet-cell-prior=[Candidate-level group-posterior mass borrowed by each cell in the posterior-mean hierarchical Dirichlet screening approximation]:DIRICHLET_CELL_PRIOR:_default' \
'--dirichlet-group-prior=[Candidate-level sample-posterior mass borrowed by each leave-one-cell-out group in the posterior-mean hierarchical Dirichlet screening approximation]:DIRICHLET_GROUP_PRIOR:_default' \
'--hybrid-depth-scale=[Half-transition evidence depth for hybrid weighting. The weight is depth^power / (depth^power + scale^power), using fitted unique candidate mass]:HYBRID_DEPTH_SCALE:_default' \
'--hybrid-depth-power=[Positive Hill power controlling the sharpness of the monotone hybrid transition]:HYBRID_DEPTH_POWER:_default' \
'--metrics-json=[Write proper-score and calibration metrics as JSON]:METRICS_JSON:_files' \
'--candidate-genes-out=[Write the sorted union of genes occurring in masked evaluation candidate sets]:CANDIDATE_GENES_OUT:_files' \
'--emit=[With --mask 0\: write the additive fractional recovered-counts layer (em.mtx, real-valued) into this directory. Requires --barcodes for column order]:EMIT:_files' \
'--barcodes=[Barcode list defining emitted column order (for example, STARsolo raw barcodes.tsv)]:BARCODES:_files' \
'--plot=[Write a reliability diagram (per-mode empirical accuracy by responsibility decile) from the masked run'\''s calibration counts]:PLOT:_files' \
'(--emit)--convex-only[Evaluate only the candidate-normalized convex mode. This avoids recomputing the eight reference modes during weight/prior grids and cannot be used for production emission]' \
'(--emit --convex-only)--dirichlet-only[Evaluate only the posterior-mean Dirichlet proxy. This screens evidence-adaptive pooling before any full variational model is implemented and cannot emit production counts]' \
'(--emit --convex-only --dirichlet-only)--hybrid-only[Evaluate only the preferred monotone evidence-depth hybrid. This masked-recovery mode cannot emit production counts]' \
'--collapse-groups[Assign every archive cell to one group, but retain the --groups barcodes as the evaluation population. This is the registered collapse-to-pooled control]' \
'--candidate-genes-only[Stop after writing --candidate-genes-out, without running EM iterations]' \
'--star[EM-0\: replicate STARsolo --soloMultiMappers EM exactly (per-cell, intersection candidate sets, STAR'\''s init/zeroing/convergence) and emit UniqueAndMult-EM.mtx into --emit]' \
'--eager[Use the v1 eager row/vector/hash-table implementation as a semantic and performance reference.  The default recovery EM streams archive batches into packed cell shards]' \
'-h[Print help]' \
'--help[Print help]' \
':archive:_files' \
&& ret=0
;;
(extend)
_arguments "${_arguments_options[@]}" : \
'--gtf=[Annotation to extend]:GTF:_files' \
'--out-gtf=[Extended GTF out]:OUT_GTF:_files' \
'--report=[Per-gene extension report TSV (default\: summary to stdout only)]:REPORT:_files' \
'--report-format=[Emit a versioned uniform report while preserving --out-gtf and the legacy --report TSV]:REPORT_FORMAT:(text tsv json)' \
'--report-output=[Atomically publish the uniform report without replacing an existing file]:REPORT_OUTPUT:_files' \
'--genome=[Reference genome FASTA\: drop candidate sites that look like internal priming. Verified against the archive'\''s stamped genome signature]:GENOME:_files' \
'--max-extend=[Furthest a gene may extend past its annotated 3'\'' end (Pool et al. searched 10 kb)]:MAX_EXTEND:_default' \
'--evidence-gap=[Largest tolerated gap in molecule-span coverage between the annotated end and the new end]:EVIDENCE_GAP:_default' \
'--min-umis=[Minimum molecules at the accepting 3'\'' site]:MIN_UMIS:_default' \
'--min-cells=[Minimum distinct cells at the accepting 3'\'' site]:MIN_CELLS:_default' \
'--site-gap=[]:SITE_GAP:_default' \
'--min-extension=[Extensions shorter than this are not worth an annotation edit]:MIN_EXTENSION:_default' \
'--clip-any-strand[Clip at the next gene on either strand instead of the next same-strand gene (3'\'' scRNA-seq reads are stranded, so same-strand clipping is the default; this is the conservative mode)]' \
'-h[Print help]' \
'--help[Print help]' \
':archive -- `.aie` archive:_files' \
&& ret=0
;;
(stamp-genome)
_arguments "${_arguments_options[@]}" : \
'--genome=[Reference genome FASTA (plain or gzipped) the archive'\''s reads were aligned to]:GENOME:_files' \
'--out=[Write the stamped archive here instead of replacing the input in place]:OUT:_files' \
'--report-format=[Emit a versioned uniform operation report instead of the legacy stdout summary]:REPORT_FORMAT:(text tsv json)' \
'--report-output=[Atomically publish the operation report here without replacing an existing file]:REPORT_OUTPUT:_files' \
'-h[Print help]' \
'--help[Print help]' \
':archive -- Archive to stamp:_files' \
&& ret=0
;;
(seal-archive)
_arguments "${_arguments_options[@]}" : \
'--out=[New root-committed v2 archive. Existing files are never overwritten]:OUT:_files' \
'--report-format=[Emit a versioned uniform operation report instead of the legacy stdout summary]:REPORT_FORMAT:(text tsv json)' \
'--report-output=[Atomically publish the operation report here without replacing an existing file]:REPORT_OUTPUT:_files' \
'(--report-format)--json[Emit one versioned JSON record instead of a human-readable summary]' \
'-h[Print help]' \
'--help[Print help]' \
':archive -- Legacy seekable v1 archive whose compressed sections will be copied exactly:_files' \
&& ret=0
;;
(inspect-archive)
_arguments "${_arguments_options[@]}" : \
'--format=[Use the versioned uniform result contract instead of the legacy presentation]:FORMAT:(text tsv json)' \
'--output=[Atomically publish uniform output here without replacing an existing file]:OUTPUT:_files' \
'--verify-content[Read and verify every compressed payload. Normal inspection authenticates only the v2 directory/root; ordinary archive operations verify each selected payload lazily]' \
'(--format)--json[]' \
'-h[Print help]' \
'--help[Print help]' \
':archive:_files' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_aie__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:aie-help-command-$line[1]:"
        case $line[1] in
            (project)
_arguments "${_arguments_options[@]}" : \
":: :_aie__subcmd__help__subcmd__project_commands" \
"*::: :->project" \
&& ret=0

    case $state in
    (project)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:aie-help-project-command-$line[1]:"
        case $line[1] in
            (init)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(add)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(show)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(plan)
_arguments "${_arguments_options[@]}" : \
":: :_aie__subcmd__help__subcmd__plan_commands" \
"*::: :->plan" \
&& ret=0

    case $state in
    (plan)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:aie-help-plan-command-$line[1]:"
        case $line[1] in
            (check)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(run)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(doctor)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(explore)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(completions)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(resolve)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(ingest)
_arguments "${_arguments_options[@]}" : \
":: :_aie__subcmd__help__subcmd__ingest_commands" \
"*::: :->ingest" \
&& ret=0

    case $state in
    (ingest)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:aie-help-ingest-command-$line[1]:"
        case $line[1] in
            (check)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(recipe)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(dev)
_arguments "${_arguments_options[@]}" : \
":: :_aie__subcmd__help__subcmd__dev_commands" \
"*::: :->dev" \
&& ret=0

    case $state in
    (dev)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:aie-help-dev-command-$line[1]:"
        case $line[1] in
            (gate-c)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(gate-d)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(build)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(umi-graph)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(replay)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(assign-diff)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(sig-stats)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(debug)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(em)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(gate-c)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(gate-d)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(build)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(umi-graph)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(replay)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(assign-diff)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(sig-stats)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(ingest-archive)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(compile-annotation)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(export-molecule-bam)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(replay-rows)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(compare-annotations)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(query)
_arguments "${_arguments_options[@]}" : \
":: :_aie__subcmd__help__subcmd__query_commands" \
"*::: :->query" \
&& ret=0

    case $state in
    (query)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:aie-help-query-command-$line[1]:"
        case $line[1] in
            (transcript-ecs)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(batch)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(cooccur)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(region)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(junction)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(junctions)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(jset)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(events)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(splice-graph)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(apa)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(apa-test)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(discover)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(debug)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(federate)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(cohort)
_arguments "${_arguments_options[@]}" : \
":: :_aie__subcmd__help__subcmd__cohort_commands" \
"*::: :->cohort" \
&& ret=0

    case $state in
    (cohort)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:aie-help-cohort-command-$line[1]:"
        case $line[1] in
            (events)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(splice-graph)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(transcript-ends)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(polyasite-mixture)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(collection)
_arguments "${_arguments_options[@]}" : \
":: :_aie__subcmd__help__subcmd__collection_commands" \
"*::: :->collection" \
&& ret=0

    case $state in
    (collection)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:aie-help-collection-command-$line[1]:"
        case $line[1] in
            (build)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(inspect)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(junction)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(region)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(jset)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(find-events)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(em)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(extend)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(stamp-genome)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(seal-archive)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(inspect-archive)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
}

(( $+functions[_aie_commands] )) ||
_aie_commands() {
    local commands; commands=(
'project:Create and manage a portable analysis project with named input resources' \
'plan:Validate or run a versioned YAML/JSON analysis plan' \
'doctor:Diagnose this installation, project, and selected Gravlax artifacts' \
'explore:Browse project plans and exact result artifacts in a local, read-only web UI' \
'completions:Generate a shell completion script from the current command interface' \
'resolve:Resolve gene symbols and stable feature identifiers against an explicit annotation' \
'ingest:Check ingest inputs or print a chemistry-specific annotation-free STAR recipe' \
'dev:Research, validation, and archive-format development instruments' \
'gate-c:Compare per-read alignment evidence between two mapping configurations' \
'gate-d:Compare annotation-independent UMI grouping with STARsolo'\''s per-(cell,gene) collapse on the same alignments' \
'build:Build the annotation-independent molecule archive from an annotation-free alignment and report where its bytes go, at evidence levels E0 and E1, with and without the UMI stream' \
'umi-graph:Measure UMI collision structure, compare collapse with STARsolo output, and report storage cost' \
'replay:Replay an annotation against annotation-free molecules extracted from fixed alignments and compare the result with a fresh STARsolo run' \
'assign-diff:Read-level confusion between STARsolo'\''s GX assignment and our alignToTranscript port, on identical alignments — pinpoints which assignment rule differs' \
'sig-stats:Measure signature multiplicity, paralog-placement patterns, and candidate position/cell stream encodings' \
'ingest-archive:Build an authenticated .aie v2 archive from a tagged, coordinate-sorted ingest BAM' \
'compile-annotation:Compile a GTF into a deterministic, guarded annotation artifact for fast reuse' \
'export-molecule-bam:Export the exact post-correction molecule abstraction as sequence-free BAM with explicit local tags, for interchange and a capability-matched BAM/CRAM storage baseline' \
'replay-rows:Quantify a compatible GTF from an .aie archive (or from a BAM via --from-bam, the regression reference\: both paths share one row abstraction and must produce identical matrices)' \
'compare-annotations:Compare two annotations on one evidence archive and explain their exact count consequences' \
'query:Indexed queries against an .aie archive\: regions, junction enumeration, APA, and discovery' \
'debug:Coding-stack measurements on an archive\: per-section/stream byte accounting, per-stream value-entropy bounds, and sharing ratios for candidate dictionary factorizations' \
'federate:One junction query across N archives — the miniature-atlas access pattern' \
'cohort:Event-centric queries across named archives with exact per-sample/group reductions' \
'collection:Build and query a guarded, derived index over a collection of independent .aie archives' \
'em:EM multimapper-recovery experiment\: masked-evidence recovery scoring for per-cell, pooled, and blended sharing against a uniform baseline' \
'extend:Extend per-gene 3'\'' annotation boundaries from archived evidence (the Pool et al. reference-optimization workflow)\: discover -> extend -> replay, without realignment' \
'stamp-genome:Stamp (or re-stamp) the reference genome'\''s blake3 signature into an archive so sequence-consulting analyses can verify they see the genome the reads were aligned to' \
'seal-archive:Atomically copy a legacy v1 archive into the authenticated v2 container without recompressing or changing any encoded section payload' \
'inspect-archive:Report an archive'\''s native and scheme-independent encoded identities, optionally verifying every compressed payload' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'aie commands' commands "$@"
}
(( $+functions[_aie__subcmd__assign-diff_commands] )) ||
_aie__subcmd__assign-diff_commands() {
    local commands; commands=()
    _describe -t commands 'aie assign-diff commands' commands "$@"
}
(( $+functions[_aie__subcmd__build_commands] )) ||
_aie__subcmd__build_commands() {
    local commands; commands=()
    _describe -t commands 'aie build commands' commands "$@"
}
(( $+functions[_aie__subcmd__cohort_commands] )) ||
_aie__subcmd__cohort_commands() {
    local commands; commands=(
'events:Discover and reduce the same coordinate-defined splice events across named archives' \
'splice-graph:Exact per-sample molecular splice graphs with an optional replicate-aware contrast' \
'transcript-ends:Donor-aware transcript-end atlas\: recurrent 3'\''-endpoint sites, exact group counts, reference-supported confidence tiers, and paired biological-sample inference' \
'polyasite-mixture:Protocol-aware 3'\''-tag analysis\: learn the fragment-distance kernel, deconvolve externally catalogued poly(A) sites, and test paired biological samples' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'aie cohort commands' commands "$@"
}
(( $+functions[_aie__subcmd__cohort__subcmd__events_commands] )) ||
_aie__subcmd__cohort__subcmd__events_commands() {
    local commands; commands=()
    _describe -t commands 'aie cohort events commands' commands "$@"
}
(( $+functions[_aie__subcmd__cohort__subcmd__help_commands] )) ||
_aie__subcmd__cohort__subcmd__help_commands() {
    local commands; commands=(
'events:Discover and reduce the same coordinate-defined splice events across named archives' \
'splice-graph:Exact per-sample molecular splice graphs with an optional replicate-aware contrast' \
'transcript-ends:Donor-aware transcript-end atlas\: recurrent 3'\''-endpoint sites, exact group counts, reference-supported confidence tiers, and paired biological-sample inference' \
'polyasite-mixture:Protocol-aware 3'\''-tag analysis\: learn the fragment-distance kernel, deconvolve externally catalogued poly(A) sites, and test paired biological samples' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'aie cohort help commands' commands "$@"
}
(( $+functions[_aie__subcmd__cohort__subcmd__help__subcmd__events_commands] )) ||
_aie__subcmd__cohort__subcmd__help__subcmd__events_commands() {
    local commands; commands=()
    _describe -t commands 'aie cohort help events commands' commands "$@"
}
(( $+functions[_aie__subcmd__cohort__subcmd__help__subcmd__help_commands] )) ||
_aie__subcmd__cohort__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'aie cohort help help commands' commands "$@"
}
(( $+functions[_aie__subcmd__cohort__subcmd__help__subcmd__polyasite-mixture_commands] )) ||
_aie__subcmd__cohort__subcmd__help__subcmd__polyasite-mixture_commands() {
    local commands; commands=()
    _describe -t commands 'aie cohort help polyasite-mixture commands' commands "$@"
}
(( $+functions[_aie__subcmd__cohort__subcmd__help__subcmd__splice-graph_commands] )) ||
_aie__subcmd__cohort__subcmd__help__subcmd__splice-graph_commands() {
    local commands; commands=()
    _describe -t commands 'aie cohort help splice-graph commands' commands "$@"
}
(( $+functions[_aie__subcmd__cohort__subcmd__help__subcmd__transcript-ends_commands] )) ||
_aie__subcmd__cohort__subcmd__help__subcmd__transcript-ends_commands() {
    local commands; commands=()
    _describe -t commands 'aie cohort help transcript-ends commands' commands "$@"
}
(( $+functions[_aie__subcmd__cohort__subcmd__polyasite-mixture_commands] )) ||
_aie__subcmd__cohort__subcmd__polyasite-mixture_commands() {
    local commands; commands=()
    _describe -t commands 'aie cohort polyasite-mixture commands' commands "$@"
}
(( $+functions[_aie__subcmd__cohort__subcmd__splice-graph_commands] )) ||
_aie__subcmd__cohort__subcmd__splice-graph_commands() {
    local commands; commands=()
    _describe -t commands 'aie cohort splice-graph commands' commands "$@"
}
(( $+functions[_aie__subcmd__cohort__subcmd__transcript-ends_commands] )) ||
_aie__subcmd__cohort__subcmd__transcript-ends_commands() {
    local commands; commands=()
    _describe -t commands 'aie cohort transcript-ends commands' commands "$@"
}
(( $+functions[_aie__subcmd__collection_commands] )) ||
_aie__subcmd__collection_commands() {
    local commands; commands=(
'build:Build a deterministic sidecar from decoded indexes and an exact source identity' \
'inspect:Print the versioned collection manifest and index cardinalities' \
'junction:Exact point-junction counts across routed archives' \
'region:Exact anchor-region counts across routed archives' \
'jset:Exact inclusion/exclusion junction-set usage across routed archives' \
'find-events:Search genome-wide for recurrent junctions, splice events, and terminal-tail evidence' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'aie collection commands' commands "$@"
}
(( $+functions[_aie__subcmd__collection__subcmd__build_commands] )) ||
_aie__subcmd__collection__subcmd__build_commands() {
    local commands; commands=()
    _describe -t commands 'aie collection build commands' commands "$@"
}
(( $+functions[_aie__subcmd__collection__subcmd__find-events_commands] )) ||
_aie__subcmd__collection__subcmd__find-events_commands() {
    local commands; commands=()
    _describe -t commands 'aie collection find-events commands' commands "$@"
}
(( $+functions[_aie__subcmd__collection__subcmd__help_commands] )) ||
_aie__subcmd__collection__subcmd__help_commands() {
    local commands; commands=(
'build:Build a deterministic sidecar from decoded indexes and an exact source identity' \
'inspect:Print the versioned collection manifest and index cardinalities' \
'junction:Exact point-junction counts across routed archives' \
'region:Exact anchor-region counts across routed archives' \
'jset:Exact inclusion/exclusion junction-set usage across routed archives' \
'find-events:Search genome-wide for recurrent junctions, splice events, and terminal-tail evidence' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'aie collection help commands' commands "$@"
}
(( $+functions[_aie__subcmd__collection__subcmd__help__subcmd__build_commands] )) ||
_aie__subcmd__collection__subcmd__help__subcmd__build_commands() {
    local commands; commands=()
    _describe -t commands 'aie collection help build commands' commands "$@"
}
(( $+functions[_aie__subcmd__collection__subcmd__help__subcmd__find-events_commands] )) ||
_aie__subcmd__collection__subcmd__help__subcmd__find-events_commands() {
    local commands; commands=()
    _describe -t commands 'aie collection help find-events commands' commands "$@"
}
(( $+functions[_aie__subcmd__collection__subcmd__help__subcmd__help_commands] )) ||
_aie__subcmd__collection__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'aie collection help help commands' commands "$@"
}
(( $+functions[_aie__subcmd__collection__subcmd__help__subcmd__inspect_commands] )) ||
_aie__subcmd__collection__subcmd__help__subcmd__inspect_commands() {
    local commands; commands=()
    _describe -t commands 'aie collection help inspect commands' commands "$@"
}
(( $+functions[_aie__subcmd__collection__subcmd__help__subcmd__jset_commands] )) ||
_aie__subcmd__collection__subcmd__help__subcmd__jset_commands() {
    local commands; commands=()
    _describe -t commands 'aie collection help jset commands' commands "$@"
}
(( $+functions[_aie__subcmd__collection__subcmd__help__subcmd__junction_commands] )) ||
_aie__subcmd__collection__subcmd__help__subcmd__junction_commands() {
    local commands; commands=()
    _describe -t commands 'aie collection help junction commands' commands "$@"
}
(( $+functions[_aie__subcmd__collection__subcmd__help__subcmd__region_commands] )) ||
_aie__subcmd__collection__subcmd__help__subcmd__region_commands() {
    local commands; commands=()
    _describe -t commands 'aie collection help region commands' commands "$@"
}
(( $+functions[_aie__subcmd__collection__subcmd__inspect_commands] )) ||
_aie__subcmd__collection__subcmd__inspect_commands() {
    local commands; commands=()
    _describe -t commands 'aie collection inspect commands' commands "$@"
}
(( $+functions[_aie__subcmd__collection__subcmd__jset_commands] )) ||
_aie__subcmd__collection__subcmd__jset_commands() {
    local commands; commands=()
    _describe -t commands 'aie collection jset commands' commands "$@"
}
(( $+functions[_aie__subcmd__collection__subcmd__junction_commands] )) ||
_aie__subcmd__collection__subcmd__junction_commands() {
    local commands; commands=()
    _describe -t commands 'aie collection junction commands' commands "$@"
}
(( $+functions[_aie__subcmd__collection__subcmd__region_commands] )) ||
_aie__subcmd__collection__subcmd__region_commands() {
    local commands; commands=()
    _describe -t commands 'aie collection region commands' commands "$@"
}
(( $+functions[_aie__subcmd__compare-annotations_commands] )) ||
_aie__subcmd__compare-annotations_commands() {
    local commands; commands=()
    _describe -t commands 'aie compare-annotations commands' commands "$@"
}
(( $+functions[_aie__subcmd__compile-annotation_commands] )) ||
_aie__subcmd__compile-annotation_commands() {
    local commands; commands=()
    _describe -t commands 'aie compile-annotation commands' commands "$@"
}
(( $+functions[_aie__subcmd__completions_commands] )) ||
_aie__subcmd__completions_commands() {
    local commands; commands=()
    _describe -t commands 'aie completions commands' commands "$@"
}
(( $+functions[_aie__subcmd__debug_commands] )) ||
_aie__subcmd__debug_commands() {
    local commands; commands=()
    _describe -t commands 'aie debug commands' commands "$@"
}
(( $+functions[_aie__subcmd__dev_commands] )) ||
_aie__subcmd__dev_commands() {
    local commands; commands=(
'gate-c:Compare per-read evidence between two mapping configurations' \
'gate-d:Bound annotation-independent UMI-grouping error against STARsolo' \
'build:Measure evidence-level archive size and stream composition' \
'umi-graph:Measure UMI adjacency structure and replay preservation' \
'replay:Run the original BAM-direct replay diagnostic' \
'assign-diff:Compare STARsolo GX assignment with the local assignment port' \
'sig-stats:Measure signature, paralog-placement, and stream coding statistics' \
'debug:Audit encoded archive sections and candidate coding factorizations' \
'em:Run multimapper-recovery modes and masked-evidence scoring' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'aie dev commands' commands "$@"
}
(( $+functions[_aie__subcmd__dev__subcmd__assign-diff_commands] )) ||
_aie__subcmd__dev__subcmd__assign-diff_commands() {
    local commands; commands=()
    _describe -t commands 'aie dev assign-diff commands' commands "$@"
}
(( $+functions[_aie__subcmd__dev__subcmd__build_commands] )) ||
_aie__subcmd__dev__subcmd__build_commands() {
    local commands; commands=()
    _describe -t commands 'aie dev build commands' commands "$@"
}
(( $+functions[_aie__subcmd__dev__subcmd__debug_commands] )) ||
_aie__subcmd__dev__subcmd__debug_commands() {
    local commands; commands=()
    _describe -t commands 'aie dev debug commands' commands "$@"
}
(( $+functions[_aie__subcmd__dev__subcmd__em_commands] )) ||
_aie__subcmd__dev__subcmd__em_commands() {
    local commands; commands=()
    _describe -t commands 'aie dev em commands' commands "$@"
}
(( $+functions[_aie__subcmd__dev__subcmd__gate-c_commands] )) ||
_aie__subcmd__dev__subcmd__gate-c_commands() {
    local commands; commands=()
    _describe -t commands 'aie dev gate-c commands' commands "$@"
}
(( $+functions[_aie__subcmd__dev__subcmd__gate-d_commands] )) ||
_aie__subcmd__dev__subcmd__gate-d_commands() {
    local commands; commands=()
    _describe -t commands 'aie dev gate-d commands' commands "$@"
}
(( $+functions[_aie__subcmd__dev__subcmd__help_commands] )) ||
_aie__subcmd__dev__subcmd__help_commands() {
    local commands; commands=(
'gate-c:Compare per-read evidence between two mapping configurations' \
'gate-d:Bound annotation-independent UMI-grouping error against STARsolo' \
'build:Measure evidence-level archive size and stream composition' \
'umi-graph:Measure UMI adjacency structure and replay preservation' \
'replay:Run the original BAM-direct replay diagnostic' \
'assign-diff:Compare STARsolo GX assignment with the local assignment port' \
'sig-stats:Measure signature, paralog-placement, and stream coding statistics' \
'debug:Audit encoded archive sections and candidate coding factorizations' \
'em:Run multimapper-recovery modes and masked-evidence scoring' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'aie dev help commands' commands "$@"
}
(( $+functions[_aie__subcmd__dev__subcmd__help__subcmd__assign-diff_commands] )) ||
_aie__subcmd__dev__subcmd__help__subcmd__assign-diff_commands() {
    local commands; commands=()
    _describe -t commands 'aie dev help assign-diff commands' commands "$@"
}
(( $+functions[_aie__subcmd__dev__subcmd__help__subcmd__build_commands] )) ||
_aie__subcmd__dev__subcmd__help__subcmd__build_commands() {
    local commands; commands=()
    _describe -t commands 'aie dev help build commands' commands "$@"
}
(( $+functions[_aie__subcmd__dev__subcmd__help__subcmd__debug_commands] )) ||
_aie__subcmd__dev__subcmd__help__subcmd__debug_commands() {
    local commands; commands=()
    _describe -t commands 'aie dev help debug commands' commands "$@"
}
(( $+functions[_aie__subcmd__dev__subcmd__help__subcmd__em_commands] )) ||
_aie__subcmd__dev__subcmd__help__subcmd__em_commands() {
    local commands; commands=()
    _describe -t commands 'aie dev help em commands' commands "$@"
}
(( $+functions[_aie__subcmd__dev__subcmd__help__subcmd__gate-c_commands] )) ||
_aie__subcmd__dev__subcmd__help__subcmd__gate-c_commands() {
    local commands; commands=()
    _describe -t commands 'aie dev help gate-c commands' commands "$@"
}
(( $+functions[_aie__subcmd__dev__subcmd__help__subcmd__gate-d_commands] )) ||
_aie__subcmd__dev__subcmd__help__subcmd__gate-d_commands() {
    local commands; commands=()
    _describe -t commands 'aie dev help gate-d commands' commands "$@"
}
(( $+functions[_aie__subcmd__dev__subcmd__help__subcmd__help_commands] )) ||
_aie__subcmd__dev__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'aie dev help help commands' commands "$@"
}
(( $+functions[_aie__subcmd__dev__subcmd__help__subcmd__replay_commands] )) ||
_aie__subcmd__dev__subcmd__help__subcmd__replay_commands() {
    local commands; commands=()
    _describe -t commands 'aie dev help replay commands' commands "$@"
}
(( $+functions[_aie__subcmd__dev__subcmd__help__subcmd__sig-stats_commands] )) ||
_aie__subcmd__dev__subcmd__help__subcmd__sig-stats_commands() {
    local commands; commands=()
    _describe -t commands 'aie dev help sig-stats commands' commands "$@"
}
(( $+functions[_aie__subcmd__dev__subcmd__help__subcmd__umi-graph_commands] )) ||
_aie__subcmd__dev__subcmd__help__subcmd__umi-graph_commands() {
    local commands; commands=()
    _describe -t commands 'aie dev help umi-graph commands' commands "$@"
}
(( $+functions[_aie__subcmd__dev__subcmd__replay_commands] )) ||
_aie__subcmd__dev__subcmd__replay_commands() {
    local commands; commands=()
    _describe -t commands 'aie dev replay commands' commands "$@"
}
(( $+functions[_aie__subcmd__dev__subcmd__sig-stats_commands] )) ||
_aie__subcmd__dev__subcmd__sig-stats_commands() {
    local commands; commands=()
    _describe -t commands 'aie dev sig-stats commands' commands "$@"
}
(( $+functions[_aie__subcmd__dev__subcmd__umi-graph_commands] )) ||
_aie__subcmd__dev__subcmd__umi-graph_commands() {
    local commands; commands=()
    _describe -t commands 'aie dev umi-graph commands' commands "$@"
}
(( $+functions[_aie__subcmd__doctor_commands] )) ||
_aie__subcmd__doctor_commands() {
    local commands; commands=()
    _describe -t commands 'aie doctor commands' commands "$@"
}
(( $+functions[_aie__subcmd__em_commands] )) ||
_aie__subcmd__em_commands() {
    local commands; commands=()
    _describe -t commands 'aie em commands' commands "$@"
}
(( $+functions[_aie__subcmd__explore_commands] )) ||
_aie__subcmd__explore_commands() {
    local commands; commands=()
    _describe -t commands 'aie explore commands' commands "$@"
}
(( $+functions[_aie__subcmd__export-molecule-bam_commands] )) ||
_aie__subcmd__export-molecule-bam_commands() {
    local commands; commands=()
    _describe -t commands 'aie export-molecule-bam commands' commands "$@"
}
(( $+functions[_aie__subcmd__extend_commands] )) ||
_aie__subcmd__extend_commands() {
    local commands; commands=()
    _describe -t commands 'aie extend commands' commands "$@"
}
(( $+functions[_aie__subcmd__federate_commands] )) ||
_aie__subcmd__federate_commands() {
    local commands; commands=()
    _describe -t commands 'aie federate commands' commands "$@"
}
(( $+functions[_aie__subcmd__gate-c_commands] )) ||
_aie__subcmd__gate-c_commands() {
    local commands; commands=()
    _describe -t commands 'aie gate-c commands' commands "$@"
}
(( $+functions[_aie__subcmd__gate-d_commands] )) ||
_aie__subcmd__gate-d_commands() {
    local commands; commands=()
    _describe -t commands 'aie gate-d commands' commands "$@"
}
(( $+functions[_aie__subcmd__help_commands] )) ||
_aie__subcmd__help_commands() {
    local commands; commands=(
'project:Create and manage a portable analysis project with named input resources' \
'plan:Validate or run a versioned YAML/JSON analysis plan' \
'doctor:Diagnose this installation, project, and selected Gravlax artifacts' \
'explore:Browse project plans and exact result artifacts in a local, read-only web UI' \
'completions:Generate a shell completion script from the current command interface' \
'resolve:Resolve gene symbols and stable feature identifiers against an explicit annotation' \
'ingest:Check ingest inputs or print a chemistry-specific annotation-free STAR recipe' \
'dev:Research, validation, and archive-format development instruments' \
'gate-c:Compare per-read alignment evidence between two mapping configurations' \
'gate-d:Compare annotation-independent UMI grouping with STARsolo'\''s per-(cell,gene) collapse on the same alignments' \
'build:Build the annotation-independent molecule archive from an annotation-free alignment and report where its bytes go, at evidence levels E0 and E1, with and without the UMI stream' \
'umi-graph:Measure UMI collision structure, compare collapse with STARsolo output, and report storage cost' \
'replay:Replay an annotation against annotation-free molecules extracted from fixed alignments and compare the result with a fresh STARsolo run' \
'assign-diff:Read-level confusion between STARsolo'\''s GX assignment and our alignToTranscript port, on identical alignments — pinpoints which assignment rule differs' \
'sig-stats:Measure signature multiplicity, paralog-placement patterns, and candidate position/cell stream encodings' \
'ingest-archive:Build an authenticated .aie v2 archive from a tagged, coordinate-sorted ingest BAM' \
'compile-annotation:Compile a GTF into a deterministic, guarded annotation artifact for fast reuse' \
'export-molecule-bam:Export the exact post-correction molecule abstraction as sequence-free BAM with explicit local tags, for interchange and a capability-matched BAM/CRAM storage baseline' \
'replay-rows:Quantify a compatible GTF from an .aie archive (or from a BAM via --from-bam, the regression reference\: both paths share one row abstraction and must produce identical matrices)' \
'compare-annotations:Compare two annotations on one evidence archive and explain their exact count consequences' \
'query:Indexed queries against an .aie archive\: regions, junction enumeration, APA, and discovery' \
'debug:Coding-stack measurements on an archive\: per-section/stream byte accounting, per-stream value-entropy bounds, and sharing ratios for candidate dictionary factorizations' \
'federate:One junction query across N archives — the miniature-atlas access pattern' \
'cohort:Event-centric queries across named archives with exact per-sample/group reductions' \
'collection:Build and query a guarded, derived index over a collection of independent .aie archives' \
'em:EM multimapper-recovery experiment\: masked-evidence recovery scoring for per-cell, pooled, and blended sharing against a uniform baseline' \
'extend:Extend per-gene 3'\'' annotation boundaries from archived evidence (the Pool et al. reference-optimization workflow)\: discover -> extend -> replay, without realignment' \
'stamp-genome:Stamp (or re-stamp) the reference genome'\''s blake3 signature into an archive so sequence-consulting analyses can verify they see the genome the reads were aligned to' \
'seal-archive:Atomically copy a legacy v1 archive into the authenticated v2 container without recompressing or changing any encoded section payload' \
'inspect-archive:Report an archive'\''s native and scheme-independent encoded identities, optionally verifying every compressed payload' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'aie help commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__assign-diff_commands] )) ||
_aie__subcmd__help__subcmd__assign-diff_commands() {
    local commands; commands=()
    _describe -t commands 'aie help assign-diff commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__build_commands] )) ||
_aie__subcmd__help__subcmd__build_commands() {
    local commands; commands=()
    _describe -t commands 'aie help build commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__cohort_commands] )) ||
_aie__subcmd__help__subcmd__cohort_commands() {
    local commands; commands=(
'events:Discover and reduce the same coordinate-defined splice events across named archives' \
'splice-graph:Exact per-sample molecular splice graphs with an optional replicate-aware contrast' \
'transcript-ends:Donor-aware transcript-end atlas\: recurrent 3'\''-endpoint sites, exact group counts, reference-supported confidence tiers, and paired biological-sample inference' \
'polyasite-mixture:Protocol-aware 3'\''-tag analysis\: learn the fragment-distance kernel, deconvolve externally catalogued poly(A) sites, and test paired biological samples' \
    )
    _describe -t commands 'aie help cohort commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__cohort__subcmd__events_commands] )) ||
_aie__subcmd__help__subcmd__cohort__subcmd__events_commands() {
    local commands; commands=()
    _describe -t commands 'aie help cohort events commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__cohort__subcmd__polyasite-mixture_commands] )) ||
_aie__subcmd__help__subcmd__cohort__subcmd__polyasite-mixture_commands() {
    local commands; commands=()
    _describe -t commands 'aie help cohort polyasite-mixture commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__cohort__subcmd__splice-graph_commands] )) ||
_aie__subcmd__help__subcmd__cohort__subcmd__splice-graph_commands() {
    local commands; commands=()
    _describe -t commands 'aie help cohort splice-graph commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__cohort__subcmd__transcript-ends_commands] )) ||
_aie__subcmd__help__subcmd__cohort__subcmd__transcript-ends_commands() {
    local commands; commands=()
    _describe -t commands 'aie help cohort transcript-ends commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__collection_commands] )) ||
_aie__subcmd__help__subcmd__collection_commands() {
    local commands; commands=(
'build:Build a deterministic sidecar from decoded indexes and an exact source identity' \
'inspect:Print the versioned collection manifest and index cardinalities' \
'junction:Exact point-junction counts across routed archives' \
'region:Exact anchor-region counts across routed archives' \
'jset:Exact inclusion/exclusion junction-set usage across routed archives' \
'find-events:Search genome-wide for recurrent junctions, splice events, and terminal-tail evidence' \
    )
    _describe -t commands 'aie help collection commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__collection__subcmd__build_commands] )) ||
_aie__subcmd__help__subcmd__collection__subcmd__build_commands() {
    local commands; commands=()
    _describe -t commands 'aie help collection build commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__collection__subcmd__find-events_commands] )) ||
_aie__subcmd__help__subcmd__collection__subcmd__find-events_commands() {
    local commands; commands=()
    _describe -t commands 'aie help collection find-events commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__collection__subcmd__inspect_commands] )) ||
_aie__subcmd__help__subcmd__collection__subcmd__inspect_commands() {
    local commands; commands=()
    _describe -t commands 'aie help collection inspect commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__collection__subcmd__jset_commands] )) ||
_aie__subcmd__help__subcmd__collection__subcmd__jset_commands() {
    local commands; commands=()
    _describe -t commands 'aie help collection jset commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__collection__subcmd__junction_commands] )) ||
_aie__subcmd__help__subcmd__collection__subcmd__junction_commands() {
    local commands; commands=()
    _describe -t commands 'aie help collection junction commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__collection__subcmd__region_commands] )) ||
_aie__subcmd__help__subcmd__collection__subcmd__region_commands() {
    local commands; commands=()
    _describe -t commands 'aie help collection region commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__compare-annotations_commands] )) ||
_aie__subcmd__help__subcmd__compare-annotations_commands() {
    local commands; commands=()
    _describe -t commands 'aie help compare-annotations commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__compile-annotation_commands] )) ||
_aie__subcmd__help__subcmd__compile-annotation_commands() {
    local commands; commands=()
    _describe -t commands 'aie help compile-annotation commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__completions_commands] )) ||
_aie__subcmd__help__subcmd__completions_commands() {
    local commands; commands=()
    _describe -t commands 'aie help completions commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__debug_commands] )) ||
_aie__subcmd__help__subcmd__debug_commands() {
    local commands; commands=()
    _describe -t commands 'aie help debug commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__dev_commands] )) ||
_aie__subcmd__help__subcmd__dev_commands() {
    local commands; commands=(
'gate-c:Compare per-read evidence between two mapping configurations' \
'gate-d:Bound annotation-independent UMI-grouping error against STARsolo' \
'build:Measure evidence-level archive size and stream composition' \
'umi-graph:Measure UMI adjacency structure and replay preservation' \
'replay:Run the original BAM-direct replay diagnostic' \
'assign-diff:Compare STARsolo GX assignment with the local assignment port' \
'sig-stats:Measure signature, paralog-placement, and stream coding statistics' \
'debug:Audit encoded archive sections and candidate coding factorizations' \
'em:Run multimapper-recovery modes and masked-evidence scoring' \
    )
    _describe -t commands 'aie help dev commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__dev__subcmd__assign-diff_commands] )) ||
_aie__subcmd__help__subcmd__dev__subcmd__assign-diff_commands() {
    local commands; commands=()
    _describe -t commands 'aie help dev assign-diff commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__dev__subcmd__build_commands] )) ||
_aie__subcmd__help__subcmd__dev__subcmd__build_commands() {
    local commands; commands=()
    _describe -t commands 'aie help dev build commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__dev__subcmd__debug_commands] )) ||
_aie__subcmd__help__subcmd__dev__subcmd__debug_commands() {
    local commands; commands=()
    _describe -t commands 'aie help dev debug commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__dev__subcmd__em_commands] )) ||
_aie__subcmd__help__subcmd__dev__subcmd__em_commands() {
    local commands; commands=()
    _describe -t commands 'aie help dev em commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__dev__subcmd__gate-c_commands] )) ||
_aie__subcmd__help__subcmd__dev__subcmd__gate-c_commands() {
    local commands; commands=()
    _describe -t commands 'aie help dev gate-c commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__dev__subcmd__gate-d_commands] )) ||
_aie__subcmd__help__subcmd__dev__subcmd__gate-d_commands() {
    local commands; commands=()
    _describe -t commands 'aie help dev gate-d commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__dev__subcmd__replay_commands] )) ||
_aie__subcmd__help__subcmd__dev__subcmd__replay_commands() {
    local commands; commands=()
    _describe -t commands 'aie help dev replay commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__dev__subcmd__sig-stats_commands] )) ||
_aie__subcmd__help__subcmd__dev__subcmd__sig-stats_commands() {
    local commands; commands=()
    _describe -t commands 'aie help dev sig-stats commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__dev__subcmd__umi-graph_commands] )) ||
_aie__subcmd__help__subcmd__dev__subcmd__umi-graph_commands() {
    local commands; commands=()
    _describe -t commands 'aie help dev umi-graph commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__doctor_commands] )) ||
_aie__subcmd__help__subcmd__doctor_commands() {
    local commands; commands=()
    _describe -t commands 'aie help doctor commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__em_commands] )) ||
_aie__subcmd__help__subcmd__em_commands() {
    local commands; commands=()
    _describe -t commands 'aie help em commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__explore_commands] )) ||
_aie__subcmd__help__subcmd__explore_commands() {
    local commands; commands=()
    _describe -t commands 'aie help explore commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__export-molecule-bam_commands] )) ||
_aie__subcmd__help__subcmd__export-molecule-bam_commands() {
    local commands; commands=()
    _describe -t commands 'aie help export-molecule-bam commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__extend_commands] )) ||
_aie__subcmd__help__subcmd__extend_commands() {
    local commands; commands=()
    _describe -t commands 'aie help extend commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__federate_commands] )) ||
_aie__subcmd__help__subcmd__federate_commands() {
    local commands; commands=()
    _describe -t commands 'aie help federate commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__gate-c_commands] )) ||
_aie__subcmd__help__subcmd__gate-c_commands() {
    local commands; commands=()
    _describe -t commands 'aie help gate-c commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__gate-d_commands] )) ||
_aie__subcmd__help__subcmd__gate-d_commands() {
    local commands; commands=()
    _describe -t commands 'aie help gate-d commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__help_commands] )) ||
_aie__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'aie help help commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__ingest_commands] )) ||
_aie__subcmd__help__subcmd__ingest_commands() {
    local commands; commands=(
'check:Scan a BAM and whitelist before spending time building an archive' \
'recipe:Print an explicit annotation-free STAR recipe for a supported chemistry' \
    )
    _describe -t commands 'aie help ingest commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__ingest__subcmd__check_commands] )) ||
_aie__subcmd__help__subcmd__ingest__subcmd__check_commands() {
    local commands; commands=()
    _describe -t commands 'aie help ingest check commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__ingest__subcmd__recipe_commands] )) ||
_aie__subcmd__help__subcmd__ingest__subcmd__recipe_commands() {
    local commands; commands=()
    _describe -t commands 'aie help ingest recipe commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__ingest-archive_commands] )) ||
_aie__subcmd__help__subcmd__ingest-archive_commands() {
    local commands; commands=()
    _describe -t commands 'aie help ingest-archive commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__inspect-archive_commands] )) ||
_aie__subcmd__help__subcmd__inspect-archive_commands() {
    local commands; commands=()
    _describe -t commands 'aie help inspect-archive commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__plan_commands] )) ||
_aie__subcmd__help__subcmd__plan_commands() {
    local commands; commands=(
'check:Validate and resolve a YAML or JSON plan without running it' \
'run:Resolve, persist, and execute a plan through existing \`aie\` commands' \
    )
    _describe -t commands 'aie help plan commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__plan__subcmd__check_commands] )) ||
_aie__subcmd__help__subcmd__plan__subcmd__check_commands() {
    local commands; commands=()
    _describe -t commands 'aie help plan check commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__plan__subcmd__run_commands] )) ||
_aie__subcmd__help__subcmd__plan__subcmd__run_commands() {
    local commands; commands=()
    _describe -t commands 'aie help plan run commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__project_commands] )) ||
_aie__subcmd__help__subcmd__project_commands() {
    local commands; commands=(
'init:Create a portable project workspace' \
'add:Register a named input file in the project manifest' \
'show:Show the project and the resolved status of its resources' \
    )
    _describe -t commands 'aie help project commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__project__subcmd__add_commands] )) ||
_aie__subcmd__help__subcmd__project__subcmd__add_commands() {
    local commands; commands=()
    _describe -t commands 'aie help project add commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__project__subcmd__init_commands] )) ||
_aie__subcmd__help__subcmd__project__subcmd__init_commands() {
    local commands; commands=()
    _describe -t commands 'aie help project init commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__project__subcmd__show_commands] )) ||
_aie__subcmd__help__subcmd__project__subcmd__show_commands() {
    local commands; commands=()
    _describe -t commands 'aie help project show commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__query_commands] )) ||
_aie__subcmd__help__subcmd__query_commands() {
    local commands; commands=(
'transcript-ecs:Annotation-conditional compatible-transcript sets for archived UMI classes' \
'batch:Execute many anchor-region and exact-junction predicates with shared archive/chunk work' \
'cooccur:Evaluate named region, junction, and terminal-tail predicates on the same evidence unit' \
'region:Molecules with archive anchors in chrom\:start-end; per-cell UMI counts to stdout' \
'junction:Per-cell molecule counts supporting the junction chrom\:donor-acceptor (0-based, exact)' \
'junctions:Enumerate splice junctions whose endpoints lie in a 0-based half-open window' \
'jset:Class-level inclusion/exclusion junction-set usage with an explicit both-side category' \
'events:Discover coordinate-defined splice events and reduce all of them in one union decode' \
'splice-graph:Strand-aware junction graph with molecule-class path-fragment hyperedges' \
'apa:Strand-aware 3'\''-end site usage in a window, with per-site UMI and cell counts' \
'apa-test:Differential 3'\''-site usage per gene, genome-wide\: an annotation-free site×group table per gene, a multinomial G-test, and BH-FDR across genes. The GTF supplies gene spans and ids only — sites come from the archive' \
'discover:Unannotated transcription\: cluster molecules unclaimed by --gtf into candidate loci' \
    )
    _describe -t commands 'aie help query commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__query__subcmd__apa_commands] )) ||
_aie__subcmd__help__subcmd__query__subcmd__apa_commands() {
    local commands; commands=()
    _describe -t commands 'aie help query apa commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__query__subcmd__apa-test_commands] )) ||
_aie__subcmd__help__subcmd__query__subcmd__apa-test_commands() {
    local commands; commands=()
    _describe -t commands 'aie help query apa-test commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__query__subcmd__batch_commands] )) ||
_aie__subcmd__help__subcmd__query__subcmd__batch_commands() {
    local commands; commands=()
    _describe -t commands 'aie help query batch commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__query__subcmd__cooccur_commands] )) ||
_aie__subcmd__help__subcmd__query__subcmd__cooccur_commands() {
    local commands; commands=()
    _describe -t commands 'aie help query cooccur commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__query__subcmd__discover_commands] )) ||
_aie__subcmd__help__subcmd__query__subcmd__discover_commands() {
    local commands; commands=()
    _describe -t commands 'aie help query discover commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__query__subcmd__events_commands] )) ||
_aie__subcmd__help__subcmd__query__subcmd__events_commands() {
    local commands; commands=()
    _describe -t commands 'aie help query events commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__query__subcmd__jset_commands] )) ||
_aie__subcmd__help__subcmd__query__subcmd__jset_commands() {
    local commands; commands=()
    _describe -t commands 'aie help query jset commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__query__subcmd__junction_commands] )) ||
_aie__subcmd__help__subcmd__query__subcmd__junction_commands() {
    local commands; commands=()
    _describe -t commands 'aie help query junction commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__query__subcmd__junctions_commands] )) ||
_aie__subcmd__help__subcmd__query__subcmd__junctions_commands() {
    local commands; commands=()
    _describe -t commands 'aie help query junctions commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__query__subcmd__region_commands] )) ||
_aie__subcmd__help__subcmd__query__subcmd__region_commands() {
    local commands; commands=()
    _describe -t commands 'aie help query region commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__query__subcmd__splice-graph_commands] )) ||
_aie__subcmd__help__subcmd__query__subcmd__splice-graph_commands() {
    local commands; commands=()
    _describe -t commands 'aie help query splice-graph commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__query__subcmd__transcript-ecs_commands] )) ||
_aie__subcmd__help__subcmd__query__subcmd__transcript-ecs_commands() {
    local commands; commands=()
    _describe -t commands 'aie help query transcript-ecs commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__replay_commands] )) ||
_aie__subcmd__help__subcmd__replay_commands() {
    local commands; commands=()
    _describe -t commands 'aie help replay commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__replay-rows_commands] )) ||
_aie__subcmd__help__subcmd__replay-rows_commands() {
    local commands; commands=()
    _describe -t commands 'aie help replay-rows commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__resolve_commands] )) ||
_aie__subcmd__help__subcmd__resolve_commands() {
    local commands; commands=()
    _describe -t commands 'aie help resolve commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__seal-archive_commands] )) ||
_aie__subcmd__help__subcmd__seal-archive_commands() {
    local commands; commands=()
    _describe -t commands 'aie help seal-archive commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__sig-stats_commands] )) ||
_aie__subcmd__help__subcmd__sig-stats_commands() {
    local commands; commands=()
    _describe -t commands 'aie help sig-stats commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__stamp-genome_commands] )) ||
_aie__subcmd__help__subcmd__stamp-genome_commands() {
    local commands; commands=()
    _describe -t commands 'aie help stamp-genome commands' commands "$@"
}
(( $+functions[_aie__subcmd__help__subcmd__umi-graph_commands] )) ||
_aie__subcmd__help__subcmd__umi-graph_commands() {
    local commands; commands=()
    _describe -t commands 'aie help umi-graph commands' commands "$@"
}
(( $+functions[_aie__subcmd__ingest_commands] )) ||
_aie__subcmd__ingest_commands() {
    local commands; commands=(
'check:Scan a BAM and whitelist before spending time building an archive' \
'recipe:Print an explicit annotation-free STAR recipe for a supported chemistry' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'aie ingest commands' commands "$@"
}
(( $+functions[_aie__subcmd__ingest__subcmd__check_commands] )) ||
_aie__subcmd__ingest__subcmd__check_commands() {
    local commands; commands=()
    _describe -t commands 'aie ingest check commands' commands "$@"
}
(( $+functions[_aie__subcmd__ingest__subcmd__help_commands] )) ||
_aie__subcmd__ingest__subcmd__help_commands() {
    local commands; commands=(
'check:Scan a BAM and whitelist before spending time building an archive' \
'recipe:Print an explicit annotation-free STAR recipe for a supported chemistry' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'aie ingest help commands' commands "$@"
}
(( $+functions[_aie__subcmd__ingest__subcmd__help__subcmd__check_commands] )) ||
_aie__subcmd__ingest__subcmd__help__subcmd__check_commands() {
    local commands; commands=()
    _describe -t commands 'aie ingest help check commands' commands "$@"
}
(( $+functions[_aie__subcmd__ingest__subcmd__help__subcmd__help_commands] )) ||
_aie__subcmd__ingest__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'aie ingest help help commands' commands "$@"
}
(( $+functions[_aie__subcmd__ingest__subcmd__help__subcmd__recipe_commands] )) ||
_aie__subcmd__ingest__subcmd__help__subcmd__recipe_commands() {
    local commands; commands=()
    _describe -t commands 'aie ingest help recipe commands' commands "$@"
}
(( $+functions[_aie__subcmd__ingest__subcmd__recipe_commands] )) ||
_aie__subcmd__ingest__subcmd__recipe_commands() {
    local commands; commands=()
    _describe -t commands 'aie ingest recipe commands' commands "$@"
}
(( $+functions[_aie__subcmd__ingest-archive_commands] )) ||
_aie__subcmd__ingest-archive_commands() {
    local commands; commands=()
    _describe -t commands 'aie ingest-archive commands' commands "$@"
}
(( $+functions[_aie__subcmd__inspect-archive_commands] )) ||
_aie__subcmd__inspect-archive_commands() {
    local commands; commands=()
    _describe -t commands 'aie inspect-archive commands' commands "$@"
}
(( $+functions[_aie__subcmd__plan_commands] )) ||
_aie__subcmd__plan_commands() {
    local commands; commands=(
'check:Validate and resolve a YAML or JSON plan without running it' \
'run:Resolve, persist, and execute a plan through existing \`aie\` commands' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'aie plan commands' commands "$@"
}
(( $+functions[_aie__subcmd__plan__subcmd__check_commands] )) ||
_aie__subcmd__plan__subcmd__check_commands() {
    local commands; commands=()
    _describe -t commands 'aie plan check commands' commands "$@"
}
(( $+functions[_aie__subcmd__plan__subcmd__help_commands] )) ||
_aie__subcmd__plan__subcmd__help_commands() {
    local commands; commands=(
'check:Validate and resolve a YAML or JSON plan without running it' \
'run:Resolve, persist, and execute a plan through existing \`aie\` commands' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'aie plan help commands' commands "$@"
}
(( $+functions[_aie__subcmd__plan__subcmd__help__subcmd__check_commands] )) ||
_aie__subcmd__plan__subcmd__help__subcmd__check_commands() {
    local commands; commands=()
    _describe -t commands 'aie plan help check commands' commands "$@"
}
(( $+functions[_aie__subcmd__plan__subcmd__help__subcmd__help_commands] )) ||
_aie__subcmd__plan__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'aie plan help help commands' commands "$@"
}
(( $+functions[_aie__subcmd__plan__subcmd__help__subcmd__run_commands] )) ||
_aie__subcmd__plan__subcmd__help__subcmd__run_commands() {
    local commands; commands=()
    _describe -t commands 'aie plan help run commands' commands "$@"
}
(( $+functions[_aie__subcmd__plan__subcmd__run_commands] )) ||
_aie__subcmd__plan__subcmd__run_commands() {
    local commands; commands=()
    _describe -t commands 'aie plan run commands' commands "$@"
}
(( $+functions[_aie__subcmd__project_commands] )) ||
_aie__subcmd__project_commands() {
    local commands; commands=(
'init:Create a portable project workspace' \
'add:Register a named input file in the project manifest' \
'show:Show the project and the resolved status of its resources' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'aie project commands' commands "$@"
}
(( $+functions[_aie__subcmd__project__subcmd__add_commands] )) ||
_aie__subcmd__project__subcmd__add_commands() {
    local commands; commands=()
    _describe -t commands 'aie project add commands' commands "$@"
}
(( $+functions[_aie__subcmd__project__subcmd__help_commands] )) ||
_aie__subcmd__project__subcmd__help_commands() {
    local commands; commands=(
'init:Create a portable project workspace' \
'add:Register a named input file in the project manifest' \
'show:Show the project and the resolved status of its resources' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'aie project help commands' commands "$@"
}
(( $+functions[_aie__subcmd__project__subcmd__help__subcmd__add_commands] )) ||
_aie__subcmd__project__subcmd__help__subcmd__add_commands() {
    local commands; commands=()
    _describe -t commands 'aie project help add commands' commands "$@"
}
(( $+functions[_aie__subcmd__project__subcmd__help__subcmd__help_commands] )) ||
_aie__subcmd__project__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'aie project help help commands' commands "$@"
}
(( $+functions[_aie__subcmd__project__subcmd__help__subcmd__init_commands] )) ||
_aie__subcmd__project__subcmd__help__subcmd__init_commands() {
    local commands; commands=()
    _describe -t commands 'aie project help init commands' commands "$@"
}
(( $+functions[_aie__subcmd__project__subcmd__help__subcmd__show_commands] )) ||
_aie__subcmd__project__subcmd__help__subcmd__show_commands() {
    local commands; commands=()
    _describe -t commands 'aie project help show commands' commands "$@"
}
(( $+functions[_aie__subcmd__project__subcmd__init_commands] )) ||
_aie__subcmd__project__subcmd__init_commands() {
    local commands; commands=()
    _describe -t commands 'aie project init commands' commands "$@"
}
(( $+functions[_aie__subcmd__project__subcmd__show_commands] )) ||
_aie__subcmd__project__subcmd__show_commands() {
    local commands; commands=()
    _describe -t commands 'aie project show commands' commands "$@"
}
(( $+functions[_aie__subcmd__query_commands] )) ||
_aie__subcmd__query_commands() {
    local commands; commands=(
'transcript-ecs:Annotation-conditional compatible-transcript sets for archived UMI classes' \
'batch:Execute many anchor-region and exact-junction predicates with shared archive/chunk work' \
'cooccur:Evaluate named region, junction, and terminal-tail predicates on the same evidence unit' \
'region:Molecules with archive anchors in chrom\:start-end; per-cell UMI counts to stdout' \
'junction:Per-cell molecule counts supporting the junction chrom\:donor-acceptor (0-based, exact)' \
'junctions:Enumerate splice junctions whose endpoints lie in a 0-based half-open window' \
'jset:Class-level inclusion/exclusion junction-set usage with an explicit both-side category' \
'events:Discover coordinate-defined splice events and reduce all of them in one union decode' \
'splice-graph:Strand-aware junction graph with molecule-class path-fragment hyperedges' \
'apa:Strand-aware 3'\''-end site usage in a window, with per-site UMI and cell counts' \
'apa-test:Differential 3'\''-site usage per gene, genome-wide\: an annotation-free site×group table per gene, a multinomial G-test, and BH-FDR across genes. The GTF supplies gene spans and ids only — sites come from the archive' \
'discover:Unannotated transcription\: cluster molecules unclaimed by --gtf into candidate loci' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'aie query commands' commands "$@"
}
(( $+functions[_aie__subcmd__query__subcmd__apa_commands] )) ||
_aie__subcmd__query__subcmd__apa_commands() {
    local commands; commands=()
    _describe -t commands 'aie query apa commands' commands "$@"
}
(( $+functions[_aie__subcmd__query__subcmd__apa-test_commands] )) ||
_aie__subcmd__query__subcmd__apa-test_commands() {
    local commands; commands=()
    _describe -t commands 'aie query apa-test commands' commands "$@"
}
(( $+functions[_aie__subcmd__query__subcmd__batch_commands] )) ||
_aie__subcmd__query__subcmd__batch_commands() {
    local commands; commands=()
    _describe -t commands 'aie query batch commands' commands "$@"
}
(( $+functions[_aie__subcmd__query__subcmd__cooccur_commands] )) ||
_aie__subcmd__query__subcmd__cooccur_commands() {
    local commands; commands=()
    _describe -t commands 'aie query cooccur commands' commands "$@"
}
(( $+functions[_aie__subcmd__query__subcmd__discover_commands] )) ||
_aie__subcmd__query__subcmd__discover_commands() {
    local commands; commands=()
    _describe -t commands 'aie query discover commands' commands "$@"
}
(( $+functions[_aie__subcmd__query__subcmd__events_commands] )) ||
_aie__subcmd__query__subcmd__events_commands() {
    local commands; commands=()
    _describe -t commands 'aie query events commands' commands "$@"
}
(( $+functions[_aie__subcmd__query__subcmd__help_commands] )) ||
_aie__subcmd__query__subcmd__help_commands() {
    local commands; commands=(
'transcript-ecs:Annotation-conditional compatible-transcript sets for archived UMI classes' \
'batch:Execute many anchor-region and exact-junction predicates with shared archive/chunk work' \
'cooccur:Evaluate named region, junction, and terminal-tail predicates on the same evidence unit' \
'region:Molecules with archive anchors in chrom\:start-end; per-cell UMI counts to stdout' \
'junction:Per-cell molecule counts supporting the junction chrom\:donor-acceptor (0-based, exact)' \
'junctions:Enumerate splice junctions whose endpoints lie in a 0-based half-open window' \
'jset:Class-level inclusion/exclusion junction-set usage with an explicit both-side category' \
'events:Discover coordinate-defined splice events and reduce all of them in one union decode' \
'splice-graph:Strand-aware junction graph with molecule-class path-fragment hyperedges' \
'apa:Strand-aware 3'\''-end site usage in a window, with per-site UMI and cell counts' \
'apa-test:Differential 3'\''-site usage per gene, genome-wide\: an annotation-free site×group table per gene, a multinomial G-test, and BH-FDR across genes. The GTF supplies gene spans and ids only — sites come from the archive' \
'discover:Unannotated transcription\: cluster molecules unclaimed by --gtf into candidate loci' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'aie query help commands' commands "$@"
}
(( $+functions[_aie__subcmd__query__subcmd__help__subcmd__apa_commands] )) ||
_aie__subcmd__query__subcmd__help__subcmd__apa_commands() {
    local commands; commands=()
    _describe -t commands 'aie query help apa commands' commands "$@"
}
(( $+functions[_aie__subcmd__query__subcmd__help__subcmd__apa-test_commands] )) ||
_aie__subcmd__query__subcmd__help__subcmd__apa-test_commands() {
    local commands; commands=()
    _describe -t commands 'aie query help apa-test commands' commands "$@"
}
(( $+functions[_aie__subcmd__query__subcmd__help__subcmd__batch_commands] )) ||
_aie__subcmd__query__subcmd__help__subcmd__batch_commands() {
    local commands; commands=()
    _describe -t commands 'aie query help batch commands' commands "$@"
}
(( $+functions[_aie__subcmd__query__subcmd__help__subcmd__cooccur_commands] )) ||
_aie__subcmd__query__subcmd__help__subcmd__cooccur_commands() {
    local commands; commands=()
    _describe -t commands 'aie query help cooccur commands' commands "$@"
}
(( $+functions[_aie__subcmd__query__subcmd__help__subcmd__discover_commands] )) ||
_aie__subcmd__query__subcmd__help__subcmd__discover_commands() {
    local commands; commands=()
    _describe -t commands 'aie query help discover commands' commands "$@"
}
(( $+functions[_aie__subcmd__query__subcmd__help__subcmd__events_commands] )) ||
_aie__subcmd__query__subcmd__help__subcmd__events_commands() {
    local commands; commands=()
    _describe -t commands 'aie query help events commands' commands "$@"
}
(( $+functions[_aie__subcmd__query__subcmd__help__subcmd__help_commands] )) ||
_aie__subcmd__query__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'aie query help help commands' commands "$@"
}
(( $+functions[_aie__subcmd__query__subcmd__help__subcmd__jset_commands] )) ||
_aie__subcmd__query__subcmd__help__subcmd__jset_commands() {
    local commands; commands=()
    _describe -t commands 'aie query help jset commands' commands "$@"
}
(( $+functions[_aie__subcmd__query__subcmd__help__subcmd__junction_commands] )) ||
_aie__subcmd__query__subcmd__help__subcmd__junction_commands() {
    local commands; commands=()
    _describe -t commands 'aie query help junction commands' commands "$@"
}
(( $+functions[_aie__subcmd__query__subcmd__help__subcmd__junctions_commands] )) ||
_aie__subcmd__query__subcmd__help__subcmd__junctions_commands() {
    local commands; commands=()
    _describe -t commands 'aie query help junctions commands' commands "$@"
}
(( $+functions[_aie__subcmd__query__subcmd__help__subcmd__region_commands] )) ||
_aie__subcmd__query__subcmd__help__subcmd__region_commands() {
    local commands; commands=()
    _describe -t commands 'aie query help region commands' commands "$@"
}
(( $+functions[_aie__subcmd__query__subcmd__help__subcmd__splice-graph_commands] )) ||
_aie__subcmd__query__subcmd__help__subcmd__splice-graph_commands() {
    local commands; commands=()
    _describe -t commands 'aie query help splice-graph commands' commands "$@"
}
(( $+functions[_aie__subcmd__query__subcmd__help__subcmd__transcript-ecs_commands] )) ||
_aie__subcmd__query__subcmd__help__subcmd__transcript-ecs_commands() {
    local commands; commands=()
    _describe -t commands 'aie query help transcript-ecs commands' commands "$@"
}
(( $+functions[_aie__subcmd__query__subcmd__jset_commands] )) ||
_aie__subcmd__query__subcmd__jset_commands() {
    local commands; commands=()
    _describe -t commands 'aie query jset commands' commands "$@"
}
(( $+functions[_aie__subcmd__query__subcmd__junction_commands] )) ||
_aie__subcmd__query__subcmd__junction_commands() {
    local commands; commands=()
    _describe -t commands 'aie query junction commands' commands "$@"
}
(( $+functions[_aie__subcmd__query__subcmd__junctions_commands] )) ||
_aie__subcmd__query__subcmd__junctions_commands() {
    local commands; commands=()
    _describe -t commands 'aie query junctions commands' commands "$@"
}
(( $+functions[_aie__subcmd__query__subcmd__region_commands] )) ||
_aie__subcmd__query__subcmd__region_commands() {
    local commands; commands=()
    _describe -t commands 'aie query region commands' commands "$@"
}
(( $+functions[_aie__subcmd__query__subcmd__splice-graph_commands] )) ||
_aie__subcmd__query__subcmd__splice-graph_commands() {
    local commands; commands=()
    _describe -t commands 'aie query splice-graph commands' commands "$@"
}
(( $+functions[_aie__subcmd__query__subcmd__transcript-ecs_commands] )) ||
_aie__subcmd__query__subcmd__transcript-ecs_commands() {
    local commands; commands=()
    _describe -t commands 'aie query transcript-ecs commands' commands "$@"
}
(( $+functions[_aie__subcmd__replay_commands] )) ||
_aie__subcmd__replay_commands() {
    local commands; commands=()
    _describe -t commands 'aie replay commands' commands "$@"
}
(( $+functions[_aie__subcmd__replay-rows_commands] )) ||
_aie__subcmd__replay-rows_commands() {
    local commands; commands=()
    _describe -t commands 'aie replay-rows commands' commands "$@"
}
(( $+functions[_aie__subcmd__resolve_commands] )) ||
_aie__subcmd__resolve_commands() {
    local commands; commands=()
    _describe -t commands 'aie resolve commands' commands "$@"
}
(( $+functions[_aie__subcmd__seal-archive_commands] )) ||
_aie__subcmd__seal-archive_commands() {
    local commands; commands=()
    _describe -t commands 'aie seal-archive commands' commands "$@"
}
(( $+functions[_aie__subcmd__sig-stats_commands] )) ||
_aie__subcmd__sig-stats_commands() {
    local commands; commands=()
    _describe -t commands 'aie sig-stats commands' commands "$@"
}
(( $+functions[_aie__subcmd__stamp-genome_commands] )) ||
_aie__subcmd__stamp-genome_commands() {
    local commands; commands=()
    _describe -t commands 'aie stamp-genome commands' commands "$@"
}
(( $+functions[_aie__subcmd__umi-graph_commands] )) ||
_aie__subcmd__umi-graph_commands() {
    local commands; commands=()
    _describe -t commands 'aie umi-graph commands' commands "$@"
}

if [ "$funcstack[1]" = "_aie" ]; then
    _aie "$@"
else
    compdef _aie aie
fi
