Skip to content

Support DMS VDJ datasets - #66

Merged
mzueva merged 2 commits into
mainfrom
mzueva/dms-support-vdj
Sep 10, 2026
Merged

mzueva merged 2 commits into
mainfrom
mzueva/dms-support-vdj

Conversation

@mzueva

@mzueva mzueva commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds designed-library and DMS profiler support by classifying datasets from axis-domain metadata, offering profiler sequence columns, applying long-sequence matching behavior, and publishing variant-specific labels.

Important touched terms:

  • Modality — the biological category that controls defaults and workflow behavior; expanded from antibody_tcr | peptide to include amplicon.

  • Amplicon — a designed-library or DMS variant dataset whose sequences are treated as long sequences; introduced as a distinct modality with antibody/TCR-style matching defaults and variant-facing output labels.

  • SequenceFamily — the namespace and shape of available sequence columns; introduced with peptide, universal, and vdj values so biological modality is independent of column namespace.

  • InputClass — the combined dataset classification containing modality and sequences; introduced to let VDJ profiler datasets retain antibody/TCR semantics while using universal sequence columns.

  • classifyDataset — the model-side classifier derived from the entity-axis name and domain; introduced to drive model modality output and target-column choices.

  • datasetModality — the workflow-side modality classifier; expanded from a peptide Boolean check to three-way classification using declarations and producer run IDs.

  • lastAppliedModality — persisted context identifying which modality supplied the current defaults; its runtime contract now accepts amplicon.

  • Target options — sequence columns offered for matching; profiler inputs now expose feature-tagged pl7.app/sequence columns, including whole-variant and regional sequences.

  • Recognizes declared vdj and amplicon profiler datasets.

  • Falls back to producer-specific run-ID keys for undeclared datasets.

  • Keeps short-peptide search adaptation limited to peptide inputs.

  • Labels amplicon results as matched variants and variant-to-assay links.

  • Adds Tengo modality tests and kind validation coverage.

Confidence Score: 4/5

The PR appears safe to merge, with a non-blocking recommendation to test the model-side copy of the modality-routing contract.

The current TypeScript and Tengo classifiers agree across the supported dataset shapes, and downstream matching behavior, sequence selection, validation, and labels consistently handle amplicon. The remaining concern is regression risk from maintaining two classifier implementations while directly testing only one.

Files Needing Attention: model/src/modality.ts

Important Files Changed

Filename Overview
kind/src/index.ts Expands the shared modality contract and runtime validation to accept amplicon.
model/src/modality.ts Introduces model-side dataset and sequence-family classification, but lacks direct tests for this duplicated routing contract.
model/src/index.ts Uses dataset classification to publish modality and select peptide, universal profiler, or VDJ target columns.
workflow/src/modality.lib.tengo Adds three-way workflow modality classification using declarations and producer run-ID fallbacks.
workflow/src/main.tpl.tengo Restricts short-peptide alignment adaptation to datasets classified as peptide.
workflow/src/build-outputs.tpl.tengo Adds matched-variant and variant-to-assay labels for amplicon outputs.
workflow/src/modality.test.tengo Covers declared, legacy-fallback, peptide, imported receptor, and conventional VDJ classification cases.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Dataset entity axis] --> B{Model classifyDataset}
  A --> C{Workflow datasetModality}
  B --> D[Biological modality]
  B --> E[Sequence family]
  D --> F[UI threshold defaults]
  E --> G[Target sequence options]
  C --> H[Peptide search adaptation]
  C --> I[Clone, peptide, or variant labels]
Loading

Fix all with Greploop Fix All in Claude Code

Prompt To Fix All With AI
### Issue 1
model/src/modality.ts:42
**Classifier parity is untested**

`classifyDataset` adds a second implementation of the modality-routing rules, but only the Tengo implementation has tests. The model classifier controls target choices and UI defaults, while the workflow classifier controls alignment behavior and output labels. A future change to only one copy could silently make those behaviors disagree. Please add equivalent model tests or shared parity fixtures covering each producer and fallback case.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

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

Greptile also left 1 inline comment on this PR.

Context used (5)

Comment thread model/src/modality.ts
@mzueva
mzueva merged commit da0fd83 into main Sep 10, 2026
10 checks passed
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