diff --git a/.changeset/fix-sc-tcr-chain-letters.md b/.changeset/fix-sc-tcr-chain-letters.md new file mode 100644 index 0000000..0d4e0fd --- /dev/null +++ b/.changeset/fix-sc-tcr-chain-letters.md @@ -0,0 +1,8 @@ +--- +'@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, 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 c8966cb..01f24ef 100644 --- a/ui/src/utils.ts +++ b/ui/src/utils.ts @@ -32,6 +32,8 @@ 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 }[]; switch (receptor) { case "IG": @@ -42,14 +44,14 @@ export function useScChainOptions( break; case "TCRAB": options = [ - { label: "Alpha", value: "A" }, - { label: "Beta", value: "B" }, + { label: "Alpha", value: "B" }, + { label: "Beta", value: "A" }, ]; break; case "TCRGD": options = [ - { label: "Gamma", value: "A" }, - { label: "Delta", value: "B" }, + { label: "Gamma", value: "B" }, + { label: "Delta", value: "A" }, ]; break; default: