Skip to content

Milab 6848 fix sc tcr chain labels - #40

Open
mchernys wants to merge 3 commits into
mainfrom
MILAB-6848_fix-sc-tcr-chain-labels
Open

Milab 6848 fix sc tcr chain labels#40
mchernys wants to merge 3 commits into
mainfrom
MILAB-6848_fix-sc-tcr-chain-labels

Conversation

@mchernys

@mchernys mchernys commented Sep 1, 2026

Copy link
Copy Markdown

Greptile Summary

This PR aligns single-cell receptor-chain selection with the pl7.app/vdj/scClonotypeChain producer domain and replaces raw chain letters with biological names in generated labels.

Important touched terms

  • ScChain — The persisted "A" | "B" single-cell chain-domain value. Its documented meaning is clarified: A represents Heavy/Beta/Delta, while B represents Light/Alpha/Gamma.
  • BlockArgs.scClonotypeChain — The workflow-facing selected domain letter. It replaces the ambiguous scChain argument so the convention is explicit and intentionally invalidates stale executions.
  • pl7.app/vdj/scClonotypeChain — The source-column domain used to distinguish paired receptor chains. The workflow now compares the selected letter directly instead of inverting TCR letters.
  • chainName — The receptor-specific biological display name derived from a chain letter. Generated V and CDR3 spectratype labels now use names such as Alpha, Beta, Heavy, and Light.
  • scChainNames — The workflow mapping from receptor and domain letter to biological chain name.
  • TCRAB/TCRGD chain options — UI values are remapped so Alpha/Gamma use B and Beta/Delta use A, while retaining the conventional biological display order.
  • Build tooling catalog@platforma-sdk/block-tools moves from 2.12.6 to 2.14.3 and @platforma-sdk/tengo-builder from 4.0.18 to 4.0.23, with corresponding lockfile updates.

Confidence Score: 5/5

The PR appears safe to merge because the model, UI, and workflow consistently use the corrected chain-domain convention.

The selected domain letter is projected consistently, matched directly against primary source columns, and translated to the corresponding biological name only for display; no blocking failure remains.

Important Files Changed

Filename Overview
model/src/index.ts Projects the persisted chain choice under the clearer scClonotypeChain workflow argument name.
model/src/types.ts Documents the domain-letter semantics and updates the workflow argument contract.
ui/src/utils.ts Corrects TCRAB and TCRGD option values to match producer-domain letters while preserving biological display order.
workflow/src/main.tpl.tengo Removes TCR letter inversion, selects source columns directly by domain letter, and emits receptor-specific chain names in result labels.
pnpm-workspace.yaml Updates the block and Tengo build-tool catalog versions.
pnpm-lock.yaml Regenerates the transitive dependency graph for the build-tool upgrades.
.changeset/sc-chain-domain-letters.md Records package releases, changed chain semantics, stale-execution behavior, and user migration guidance.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  U[UI chain option] -->|Alpha/Gamma = B<br/>Beta/Delta = A| D[scClonotypeChain domain letter]
  D --> P[Model argument projection]
  P --> W[Workflow source-column predicate]
  W --> C[Matching primary CDR3 and V-gene columns]
  D --> N[Receptor-specific chain-name mapping]
  N --> L[Biological output labels]
  C --> R[Spectratype results]
  L --> R
Loading

Reviews (1): Last reviewed commit: "MILAB-6848: rename the args chain field ..." | Re-trigger Greptile

Context used (5)

cdr3-spectratype now uses the scClonotypeChain domain letter
everywhere, with the workflow's TCR swap gone and the selector
kept in classic order (Alpha=B, Beta=A).

The block was already picking the right chain, so the real bug
was just a wrong letter in the exported label; the cost is that
existing single-cell TCR blocks re-run on the opposite chain.
Since the chain letters changed meaning in the preceding commits,
cached results will not match the chain in the settings. A stored
"A" ran as an Alpha, but now it reads as a Beta.
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