Skip to content

Support vdj modality for DMS datasets - #9

Open
mzueva wants to merge 2 commits into
mainfrom
MILAB-6668_vdj-modality-model-selection
Open

Support vdj modality for DMS datasets#9
mzueva wants to merge 2 commits into
mainfrom
MILAB-6668_vdj-modality-model-selection

Conversation

@mzueva

@mzueva mzueva commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR recognizes producer-declared VDJ modality when constructing embedding scopes, introduces an explicit unknown-receptor state, broadens model selection for DMS VDJ data, and updates Platforma SDK dependencies.

  • Modality — the producer-declared run category stored under pl7.app/modality; the PR detects "vdj" and uses it to distinguish V-domain sequences from ordinary amplicon/peptide sequences.
  • Scope feature — the biological sequence region used for model compatibility; VDJ amplicon-sequence columns now become VDJRegion, while VDJ CDR3 region columns become CDR3.
  • Scope receptor — the receptor associated with a selectable scope; the new ScopeReceptor type extends WorkflowReceptor with "unknown" when VDJ data supplies neither receptor nor chain metadata.
  • Model compatibility — filtering that determines which embedding models support a scope; unknown-receptor scopes now bypass receptor and heavy-chain specialization gates, while ESM-2 remains the default.
  • Sequence selector — metadata criteria used to discover input columns; a selector was added for amino-acid CDR3 columns represented as pl7.app/sequence.
  • Recommended model — the initial model selected for a scope; unknown-receptor scopes now default to universal ESM-2 instead of a receptor-specific specialist.

Confidence Score: 5/5

The PR appears safe to merge because no concrete changed-code defect or actionable security issue remains.

The new modality classification, receptor representation, compatibility filtering, and dependency refresh are internally consistent, and the potentially surprising model-selection behavior is explicitly documented as intentional.

Important Files Changed

Filename Overview
model/src/scopes.ts Adds VDJ modality detection, CDR3 discovery, unknown-receptor resolution, and modality-sensitive scope classification.
model/src/compat.ts Widens compatibility APIs to ScopeReceptor, relaxes specialization gates for unknown receptors, and defaults those scopes to ESM-2.
model/src/index.ts Reads entity-axis modality metadata and passes it into scope construction while exporting the new receptor type.
model/src/types.ts Introduces ScopeReceptor and propagates it through persisted selected scopes and generated scope configuration.
pnpm-workspace.yaml Updates the cataloged Platforma SDK patch versions used across workspace packages.
pnpm-lock.yaml Refreshes resolved Platforma SDK packages and their transitive dependency graph consistently with the workspace catalog.
.changeset/vdj-modality-model-selection.md Documents the new VDJ scope classification, unknown-receptor behavior, model-selection tradeoff, and package release impact.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Input entity-axis metadata] --> B{pl7.app/modality is vdj?}
  B -- No --> C[Classify amplicon sequence as peptide]
  B -- Yes --> D[Classify whole variant as VDJRegion]
  B -- Yes --> E[Classify region column as CDR3]
  A --> F{Receptor or chain supplied?}
  F -- Yes --> G[Resolve IG, TCRAB, or TCRGD]
  F -- No, VDJ --> H[ScopeReceptor unknown]
  G --> I[Apply receptor and heavy-chain model gates]
  H --> J[Offer feature-compatible VDJ models]
  J --> K[Default to ESM-2]
  C --> L[Build selectable scope configuration]
  D --> L
  E --> L
  I --> L
  K --> L
Loading

Reviews (1): Last reviewed commit: "Support vdj modality for DMS datasets" | Re-trigger Greptile

Context used:

  • Context used - Terms is a types in codebase. Provide the list of ... (source)

@mzueva
mzueva requested a review from julenmendieta August 31, 2026 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant