Skip to content

Milab 6958 no msa for peptides - #13

Merged
mchernys merged 3 commits into
mainfrom
MILAB-6958_no-MSA-for-peptides
Sep 24, 2026
Merged

mchernys merged 3 commits into
mainfrom
MILAB-6958_no-MSA-for-peptides

Conversation

@mchernys

@mchernys mchernys commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

The PR appears safe to merge, with the non-blocking concern that its new metadata-sensitive peptide classifier lacks focused regression tests.

Fix All in Claude CodeFindings

  1. P2 Peptide Classification Lacks Tests ▶
Fix with agent prompt
### Issue 1
model/src/index.ts:104-115
The new classifier branches on the key axis, modality, three run identifiers, and a default `true` result. This output directly controls whether the table shows the MSA button, but no focused model test covers the peptide, repertoire, V(D)J, or unknown-domain cases. A later metadata or classification regression could therefore expose MSA for unsupported datasets or hide it for supported ones. Please add focused tests for each branch and the fallback behavior.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

This PR classifies selected datasets as peptide or non-peptide and uses that result to suppress the table's multiple-sequence-alignment entry point for peptide datasets. It also updates the repository's SDK tooling and workflow validation command.

  • Adds the isPeptide model output based on the selected dataset's key-axis metadata.
  • Hides the cluster-table cell button when the selected dataset is classified as peptide.
  • Upgrades @platforma-sdk/tengo-builder to 4.1.1 and @platforma-sdk/block-tools to 2.16.1.
  • Updates the structure schema marker to version 3 and runs pl-tengo imports before workflow checking.
  • Adds release changesets for the user-facing behavior and tooling upgrade.

Important touched terms

  • isPeptide — A new boolean model output identifying peptide datasets. It now examines the selected dataset's key axis and its modality/run metadata.
  • pl7.app/variantKey — The key-axis type used by variant-oriented datasets. It is now the prerequisite axis name for peptide classification.
  • Axis domain — Metadata attached to an axis describing its provenance or modality. The new classifier checks peptide extraction, repertoire extraction, V(D)J clonotyping, and modality entries in this domain.
  • Multiple sequence alignment (MSA) — The UI used to inspect aligned source sequences for a cluster. Its table-cell entry button is now omitted for datasets classified as peptide.
  • PlAgDataTableV2 cell button — The cluster-table control that emits cell-button-clicked. Its axis configuration is now conditional on isPeptide.
  • Tengo builder — Tooling used to build and validate the workflow package. It is upgraded from 4.0.26 to 4.1.1, and its imports validation is added to the check command.
  • Block tools — Repository structure and packaging tooling. It is upgraded from 2.15.1 to 2.16.1.
  • Structure schema — The .structure metadata format used by repository tooling. Its version marker changes from 2 to 3.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Selected dataset] --> B{Key axis is variantKey?}
  B -- No --> N[isPeptide = false]
  B -- Yes --> C{Declared VDJ or amplicon?}
  C -- Yes --> N
  C -- No --> D{Peptide extraction ID exists?}
  D -- Yes --> P[isPeptide = true]
  D -- No --> E{Repertoire or VDJ run ID exists?}
  E -- Yes --> N
  E -- No --> P
  P --> H[Hide MSA cell button]
  N --> S[Show MSA cell button]
Loading

Reviews (1) · Last reviewed commit: "MILAB-6958: bump tengo-builder and block..."

Comment thread model/src/index.ts
Comment on lines +104 to +115
.output("isPeptide", (ctx): boolean => {
const ref = ctx.data.datasetRef;
if (ref === undefined) return false;
const keyAxis = ctx.resultPool.getPColumnSpecByRef(ref)?.axesSpec[1];
if (keyAxis?.name !== "pl7.app/variantKey") return false;
const domain = keyAxis.domain ?? {};
const declared = domain["pl7.app/modality"];
if (declared === "vdj" || declared === "amplicon") return false;
if (domain["pl7.app/peptide/extractionRunId"] !== undefined) return true;
if (domain["pl7.app/repertoire/extractionRunId"] !== undefined) return false;
if (domain["pl7.app/vdj/clonotypingRunId"] !== undefined) return false;
return true;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Peptide Classification Lacks Tests

The new classifier branches on the key axis, modality, three run identifiers, and a default true result. This output directly controls whether the table shows the MSA button, but no focused model test covers the peptide, repertoire, V(D)J, or unknown-domain cases. A later metadata or classification regression could therefore expose MSA for unsupported datasets or hide it for supported ones. Please add focused tests for each branch and the fallback behavior.

Prompt To Fix With AI
This is a comment left during a code review.
Path: model/src/index.ts
Line: 104-115

Comment:
**Peptide Classification Lacks Tests**

The new classifier branches on the key axis, modality, three run identifiers, and a default `true` result. This output directly controls whether the table shows the MSA button, but no focused model test covers the peptide, repertoire, V(D)J, or unknown-domain cases. A later metadata or classification regression could therefore expose MSA for unsupported datasets or hide it for supported ones. Please add focused tests for each branch and the fallback behavior.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Claude Code

@mchernys
mchernys merged commit 8c43347 into main Sep 24, 2026
10 checks passed
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