Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/short-toys-think.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@platforma-open/milaboratories.3d-structure-based-liabilities.model': patch
---

Fix Open button for bulk dataset
10 changes: 8 additions & 2 deletions model/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ export const platforma = BlockModelV3.create(dataModel)
if (!parsed.isComplete) return undefined;
return parsed.data;
})
// Axis id of the scClonotypeKey axis, used to attach the viewer-trigger
// Axis id of the clonotype-key axis (scClonotypeKey for single-cell,
// clonotypeKey for bulk), used to attach the viewer-trigger
// button to that column in the table. Derive from the actual scoresData
// column (which is what populates the table), so the AxisId matches the
// table column's id byte-for-byte. Deriving from the PDB col's spec
Expand All @@ -232,7 +233,12 @@ export const platforma = BlockModelV3.create(dataModel)
return undefined;
}
const first = cols?.[0];
const found = first?.spec.axesSpec.find((a) => a.name === "pl7.app/vdj/scClonotypeKey");
// The clonotype-key axis is named `scClonotypeKey` for single-cell data
// and `clonotypeKey` for bulk; match either so the viewer-trigger button
// attaches in both regimes (the scores column is single-keyed on it).
const found = first?.spec.axesSpec.find(
(a) => a.name === "pl7.app/vdj/scClonotypeKey" || a.name === "pl7.app/vdj/clonotypeKey",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Damn, it was this easy of a fix 😭

);
Comment thread
xnacly marked this conversation as resolved.
if (!found) return undefined;
return getAxisId(found);
})
Expand Down
Loading