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
7 changes: 7 additions & 0 deletions .changeset/fancy-readers-rest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@platforma-open/milaboratories.sequence-properties.workflow': patch
'@platforma-open/milaboratories.sequence-properties.model': patch
'@platforma-open/milaboratories.sequence-properties.ui': patch
---

Enable linker usage to show plot options
7 changes: 5 additions & 2 deletions model/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
Annotation,
ArrayColumnProvider,
BlockModelV3,
createPFrameForGraphs,
createPlDataTableV3,
} from "@platforma-sdk/model";
import { blockDataModel } from "./dataModel";
Expand Down Expand Up @@ -135,7 +136,9 @@ export const platforma = BlockModelV3.create(blockDataModel)
match: (spec) =>
!spec.annotations?.[Annotation.Trace]?.includes(
"milaboratories.sequence-properties",
) && spec.annotations?.["pl7.app/isLinkerColumn"] !== "true",
) &&
spec.annotations?.["pl7.app/isLinkerColumn"] !== "true" &&
spec.annotations?.["pl7.app/isOutput"] !== "true",
visibility: "optional",
},
],
Expand Down Expand Up @@ -178,7 +181,7 @@ export const platforma = BlockModelV3.create(blockDataModel)
),
)
: [];
return ctx.createPFrame([...pCols, ...upstreamMeta]);
return createPFrameForGraphs(ctx, [...pCols, ...upstreamMeta]);
Comment thread
julenmendieta marked this conversation as resolved.
})
.output("propertiesPfCols", (ctx): PColumnIdAndSpec[] | undefined => {
const pCols = ctx.outputs?.resolve("propertiesPf")?.getPColumns();
Expand Down
11 changes: 9 additions & 2 deletions ui/src/pages/HistogramPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import {

const app = useApp();

const dataColumnPredicate = (spec: PColumnSpec) => isNumericScalar(spec);

// R20 default + R20a fallback.
const defaultOptions = computed((): PredefinedGraphOption<"histogram">[] | null => {
const cols = app.model.outputs.propertiesPfCols;
Expand All @@ -25,6 +23,14 @@ const defaultOptions = computed((): PredefinedGraphOption<"histogram">[] | null

return [{ inputName: "value", selectedSource: metric }];
});

const dataColumnPredicate = (spec: PColumnSpec) =>
isNumericScalar(spec) &&
spec.annotations?.["pl7.app/isOutput"] === "true" &&
!spec.annotations?.["pl7.app/trace"]?.includes("sequence-properties");
Comment thread
julenmendieta marked this conversation as resolved.

const metaColumnPredicate = (spec: PColumnSpec) =>
!spec.annotations?.["pl7.app/trace"]?.includes("sequence-properties");
</script>

<template>
Expand All @@ -34,6 +40,7 @@ const defaultOptions = computed((): PredefinedGraphOption<"histogram">[] | null
:p-frame="app.model.outputs.propertiesPfHandle"
:default-options="defaultOptions"
:data-column-predicate="dataColumnPredicate"
:meta-column-predicate="metaColumnPredicate"
:status-text="{
noPframe: { title: 'Select an input dataset on the Main tab to plot.' },
}"
Expand Down
11 changes: 9 additions & 2 deletions ui/src/pages/ScatterPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import { defaultScatterAxes, isNumericScalar, numericScalarsInOrder } from "../u

const app = useApp();

const dataColumnPredicate = (spec: PColumnSpec) => isNumericScalar(spec);

// R19 default + R19a fallback. Returns null while inputs are loading; null
// keeps GraphMaker in a "no defaults yet" state without applying stale picks.
const defaultOptions = computed((): PredefinedGraphOption<"scatterplot-umap">[] | null => {
Expand All @@ -34,6 +32,14 @@ const defaultOptions = computed((): PredefinedGraphOption<"scatterplot-umap">[]
{ inputName: "y", selectedSource: y },
];
});

const dataColumnPredicate = (spec: PColumnSpec) =>
isNumericScalar(spec) &&
spec.annotations?.["pl7.app/isOutput"] === "true" &&
!spec.annotations?.["pl7.app/trace"]?.includes("sequence-properties");
Comment thread
julenmendieta marked this conversation as resolved.

const metaColumnPredicate = (spec: PColumnSpec) =>
!spec.annotations?.["pl7.app/trace"]?.includes("sequence-properties");
</script>

<template>
Expand All @@ -44,6 +50,7 @@ const defaultOptions = computed((): PredefinedGraphOption<"scatterplot-umap">[]
:default-options="defaultOptions"
:default-palette="{ categorical: 'bright' }"
:data-column-predicate="dataColumnPredicate"
:meta-column-predicate="metaColumnPredicate"
:status-text="{
noPframe: { title: 'Select an input dataset on the Main tab to plot.' },
}"
Expand Down
Loading
Loading