Skip to content

Fix empty sequence column options and add a loading state - #63

Merged
kevindetry-milaboratories merged 2 commits into
mainfrom
fix-assay-target-options-bulk
Sep 9, 2026
Merged

kevindetry-milaboratories merged 2 commits into
mainfrom
fix-assay-target-options-bulk

Conversation

@kevindetry-milaboratories

@kevindetry-milaboratories kevindetry-milaboratories commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Problem 1: empty "Sequence column to match" for bulk datasets

The dropdown is empty when the selected dataset is a bulk MiXCR dataset and the project also contains a single-cell MiXCR block. targetOptions returns [], the dropdown shows no entries, and Run stays disabled without a message.

Cause

model/src/index.ts, targetOptions output. The probe that decides whether a dataset is paired calls getAnchoredPColumns with a selector that has name and domain but no axes. A selector without axes matches the whole result pool. In a mixed project the probe hits the single-cell block's pl7.app/vdj/sequence columns with scClonotypeChain/index: "primary", so isPaired becomes true for the bulk dataset. The paired matcher then requires that domain on the bulk clonotypeKey axis. No column has it, so the result is empty.

The probe came in with 1.6.0 (#60). Before that, pairing was decided from the axis name only, which is correct for bulk MiXCR data.

Fix

Add axes: [{ anchor: "main", idx: 1 }] to the pairing probe and to the scFv probe. This is the same axis constraint the matchers below them already use. Axis 1 is the clonotype axis by construction: datasetOptions only accepts anchors with exactly two axes, pl7.app/sampleId at 0 and the clonotype, single-cell clonotype, or variant key at 1.

Problem 2: abrupt update after a dataset change

After a dataset change the dropdown kept the options of the old dataset until the new list arrived, then switched at once. A stale target could stay selected.

Fix

  • Model: targetOptions returns { datasetRef, options }, the options tagged with the dataset they were computed for.
  • UI: the dropdown gets undefined as options until the options for the selected dataset arrive. PlDropdown then shows a spinner and disables the field. When the list arrives, a target that is not in the list is cleared and the label is refreshed. Without a dataset the dropdown is disabled with the hint "Select a dataset first".

Test

Dev build loaded into a project with one 10x MiXCR block and one bulk MiXCR block on app.hz.platforma.bio:

Dataset Published 1.7.0 This branch
Bulk IGHeavy/umi-count 0 options 16 options (FR1..FR4, CDR1..CDR3, VDJRegion, nt and aa)
10x abundance/IG/cell-count 32 options 32 options

Dataset switch 10x -> bulk with "Heavy CDR3 aa Primary" selected, sampled from the DOM: old value shown for 100 ms, then spinner and disabled field for 2.6 s, then the new options with the target cleared.

pnpm build:dev-no-software and pnpm check pass.

The targetOptions output probes the result pool for a sequence column
with the domain scClonotypeChain/index=primary to decide whether the
dataset is paired. The probe had no axes constraint, so it matched the
whole pool. In a project with a single-cell MiXCR block, every bulk
dataset was marked as paired. The paired matcher then required the
primary domain on the bulk clonotypeKey axis, found nothing, and the
"Sequence column to match" dropdown was empty. Run stayed disabled.

Add the dataset axis to the pairing probe and to the scFv probe, in the
same way as the matchers that follow them.
@kevindetry-milaboratories kevindetry-milaboratories changed the title Fix empty sequence column options for bulk datasets Fix empty sequence column options and add a loading state Sep 8, 2026
@kevindetry-milaboratories
kevindetry-milaboratories force-pushed the fix-assay-target-options-bulk branch 2 times, most recently from 76f2bf5 to cf08224 Compare September 8, 2026 13:59
After a dataset change, "Sequence column to match" kept the options of
the old dataset until the new list arrived, and then switched abruptly.

The model now returns the options together with the dataset ref they
were computed for. The UI passes undefined to the dropdown until the
options for the selected dataset arrive. PlDropdown then shows a spinner
and disables the field. When the new list arrives, a target that is not
in the list is cleared and the label is refreshed. Without a dataset the
dropdown is disabled and shows a hint.
@kevindetry-milaboratories
kevindetry-milaboratories merged commit c85abca into main Sep 9, 2026
10 checks passed
@kevindetry-milaboratories
kevindetry-milaboratories deleted the fix-assay-target-options-bulk branch September 9, 2026 10:08
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.

2 participants