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
- YAML schema rewrite (vaxrank/config/schema.py): top-level
peptide: / mrna: schemas; ManufacturabilityConfigSchema becomes a sub-field of PeptideConstructConfigSchema.
- Loader back-compat aliases: pre-2.18 layouts (
vaccine_constructs: wrapper, top-level manufacturability:, vaccine_peptides.manufacturability:) keep working with a one-cycle DeprecationWarning.
- Modality registry (vaxrank/modalities.py): single source of truth for known modalities; CLI
--vaccine-type choices, dispatch table, and schema all read from it.
- 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.
- 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.
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 invaccine_peptides:), there's nothing cross-modality left to factor.peptide:/mrna:at top level is symmetric withepitopes:/vaccine_peptides:and trivially extends todna:.Scope
peptide:/mrna:schemas;ManufacturabilityConfigSchemabecomes a sub-field ofPeptideConstructConfigSchema.vaccine_constructs:wrapper, top-levelmanufacturability:,vaccine_peptides.manufacturability:) keep working with a one-cycleDeprecationWarning.--vaccine-typechoices, dispatch table, and schema all read from it.ManufacturabilityConfigfromVaccineConfig; attach toPeptideConstructConfig. Auto-skip the manufacturability sentinel inranking_ruleswhen--vaccine-typedoesn't include peptide.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.