Skip to content

Commit 3c83182

Browse files
committed
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.
1 parent 18da745 commit 3c83182

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

.changeset/fix-sc-tcr-chain-letters.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33
'@platforma-open/milaboratories.vj-usage': minor
44
---
55

6-
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.
6+
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.
7+
8+
The selector also lists chains in the classic annotation order again — Alpha/Beta and Gamma/Delta — instead of the value order A/B.

ui/src/utils.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ export function useScChainOptions(
3232

3333
const receptor = axisSpec.domain?.["pl7.app/vdj/receptor"];
3434

35+
// Values are the producers' (mixcr-clonotyping, import-vdj-data): A is the more diverse
36+
// chain. Array order is display order, kept in the classic annotation order.
3537
let options: { label: string; value: string }[];
36-
// A/B order is the producers' (mixcr-clonotyping, import-vdj-data): A is the more diverse chain.
3738
switch (receptor) {
3839
case "IG":
3940
options = [
@@ -43,14 +44,14 @@ export function useScChainOptions(
4344
break;
4445
case "TCRAB":
4546
options = [
46-
{ label: "Beta", value: "A" },
4747
{ label: "Alpha", value: "B" },
48+
{ label: "Beta", value: "A" },
4849
];
4950
break;
5051
case "TCRGD":
5152
options = [
52-
{ label: "Delta", value: "A" },
5353
{ label: "Gamma", value: "B" },
54+
{ label: "Delta", value: "A" },
5455
];
5556
break;
5657
default:

0 commit comments

Comments
 (0)