From 18da74584f458044d8ead8a90693f38b29b85f95 Mon Sep 17 00:00:00 2001 From: Mark Chernyshev Date: Mon, 31 Aug 2026 12:14:14 +0200 Subject: [PATCH 1/2] MILAB-6848: fix sc TCR domain mapping --- .changeset/fix-sc-tcr-chain-letters.md | 6 ++++++ ui/src/utils.ts | 9 +++++---- 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 .changeset/fix-sc-tcr-chain-letters.md diff --git a/.changeset/fix-sc-tcr-chain-letters.md b/.changeset/fix-sc-tcr-chain-letters.md new file mode 100644 index 0000000..85a1985 --- /dev/null +++ b/.changeset/fix-sc-tcr-chain-letters.md @@ -0,0 +1,6 @@ +--- +'@platforma-open/milaboratories.vj-usage.ui': minor +'@platforma-open/milaboratories.vj-usage': minor +--- + +Fix single-cell TCR chain selector mapping: A/B were swapped for TCRAB and TCRGD. Producers (mixcr-clonotyping, import-vdj-data) assign A to the more diverse chains: Beta and Delta. The selector was running usage on the opposite chain from the one labelled. Existing blocks are relabelled only, with the stored chain value is unchanged, so nothing re-runs. diff --git a/ui/src/utils.ts b/ui/src/utils.ts index c8966cb..0b6990b 100644 --- a/ui/src/utils.ts +++ b/ui/src/utils.ts @@ -33,6 +33,7 @@ export function useScChainOptions( const receptor = axisSpec.domain?.["pl7.app/vdj/receptor"]; let options: { label: string; value: string }[]; + // A/B order is the producers' (mixcr-clonotyping, import-vdj-data): A is the more diverse chain. switch (receptor) { case "IG": options = [ @@ -42,14 +43,14 @@ export function useScChainOptions( break; case "TCRAB": options = [ - { label: "Alpha", value: "A" }, - { label: "Beta", value: "B" }, + { label: "Beta", value: "A" }, + { label: "Alpha", value: "B" }, ]; break; case "TCRGD": options = [ - { label: "Gamma", value: "A" }, - { label: "Delta", value: "B" }, + { label: "Delta", value: "A" }, + { label: "Gamma", value: "B" }, ]; break; default: From 3c83182cf6788043bb0428fb5683cd22ef98aa06 Mon Sep 17 00:00:00 2001 From: Mark Chernyshev Date: Mon, 31 Aug 2026 13:11:35 +0200 Subject: [PATCH 2/2] MILAB-6848: list sc chains in classic annotation order The chain mapping fix reordered the selector to Beta/Alpha and Delta/Gamma, since array order is display order. Keep the producers' values and order the labels Alpha/Beta and Gamma/Delta instead. --- .changeset/fix-sc-tcr-chain-letters.md | 4 +++- ui/src/utils.ts | 7 ++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.changeset/fix-sc-tcr-chain-letters.md b/.changeset/fix-sc-tcr-chain-letters.md index 85a1985..0d4e0fd 100644 --- a/.changeset/fix-sc-tcr-chain-letters.md +++ b/.changeset/fix-sc-tcr-chain-letters.md @@ -3,4 +3,6 @@ '@platforma-open/milaboratories.vj-usage': minor --- -Fix single-cell TCR chain selector mapping: A/B were swapped for TCRAB and TCRGD. Producers (mixcr-clonotyping, import-vdj-data) assign A to the more diverse chains: Beta and Delta. The selector was running usage on the opposite chain from the one labelled. Existing blocks are relabelled only, with the stored chain value is unchanged, so nothing re-runs. +Fix single-cell TCR chain selector mapping: A/B were swapped for TCRAB and TCRGD. Producers (mixcr-clonotyping, import-vdj-data) assign A to the more diverse chains: Beta and Delta. The selector was running usage on the opposite chain from the one labelled. Existing blocks are relabelled only, the stored chain value is unchanged, so nothing re-runs. + +The selector also lists chains in the classic annotation order again — Alpha/Beta and Gamma/Delta — instead of the value order A/B. diff --git a/ui/src/utils.ts b/ui/src/utils.ts index 0b6990b..01f24ef 100644 --- a/ui/src/utils.ts +++ b/ui/src/utils.ts @@ -32,8 +32,9 @@ export function useScChainOptions( const receptor = axisSpec.domain?.["pl7.app/vdj/receptor"]; + // Values are the producers' (mixcr-clonotyping, import-vdj-data): A is the more diverse + // chain. Array order is display order, kept in the classic annotation order. let options: { label: string; value: string }[]; - // A/B order is the producers' (mixcr-clonotyping, import-vdj-data): A is the more diverse chain. switch (receptor) { case "IG": options = [ @@ -43,14 +44,14 @@ export function useScChainOptions( break; case "TCRAB": options = [ - { label: "Beta", value: "A" }, { label: "Alpha", value: "B" }, + { label: "Beta", value: "A" }, ]; break; case "TCRGD": options = [ - { label: "Delta", value: "A" }, { label: "Gamma", value: "B" }, + { label: "Delta", value: "A" }, ]; break; default: