Skip to content

Config flatten: drop vaccine_constructs wrapper, move manufacturability under peptide #273

Description

@iskandr

Goal

Restructure the YAML config layout to match user mental model + make future modalities (DNA, …) trivial to add.

Proposed shape

```yaml
epitopes: # filter / score MHC ligand predictions
vaccine_peptides: # ranking + antigen-window selection
# (absorbs antigen_content / epitopes_per_antigen /
# candidates_per_slot from the old vaccine_constructs
# top level — those are antigen design, not assembly)

Modality-specific assembly sections at top level — one per modality:

peptide:
linker: G4Sx3
antigens_per_construct: 1
...
manufacturability: # peptide-only synthesis-difficulty rules
rules: [...]
max_c_terminal_hydropathy: 1.5

mrna:
linker: G4Sx2
signal_peptide: HLA_B
...

Future:

dna:
promoter: ...
```

Why

  • vaccine_constructs: wrapper isn't earning its keep — once antigen-design knobs are moved out (they belong in vaccine_peptides:), there's nothing cross-modality left to factor.
  • Manufacturability is peptide-only; placing it at the top level made it look modality-agnostic.
  • peptide: / mrna: at top level is symmetric with epitopes: / vaccine_peptides: and trivially extends to dna:.

Scope

  1. YAML schema rewrite (vaxrank/config/schema.py): top-level peptide: / mrna: schemas; ManufacturabilityConfigSchema becomes a sub-field of PeptideConstructConfigSchema.
  2. Loader back-compat aliases: pre-2.18 layouts (vaccine_constructs: wrapper, top-level manufacturability:, vaccine_peptides.manufacturability:) keep working with a one-cycle DeprecationWarning.
  3. Modality registry (vaxrank/modalities.py): single source of truth for known modalities; CLI --vaccine-type choices, dispatch table, and schema all read from it.
  4. In-code split: extract ManufacturabilityConfig from VaccineConfig; attach to PeptideConstructConfig. Auto-skip the manufacturability sentinel in ranking_rules when --vaccine-type doesn't include peptide.
  5. default.yaml rewrite to match.

Why not in #271

Started this in #271 alongside the mRNA-output ergonomics fixes; the loader rewrite + back-compat handling alone broke ~5 tests, and the in-code split (extract ManufacturabilityConfig, thread through ranker) is itself a focused refactor that warrants independent review. Splitting keeps each PR's diff understandable.

cc @iskandr — surfaced during the #271 design discussion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions