Adapt Sequence properties block to dms data#21
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for synthetic-repertoire-profiler (amplicon) variant datasets. It adds a new "amplicon" workflow mode that shares the same whole-sequence physicochemical computation path as the existing "peptide" mode, but uses the "amplicon-sequence" feature for output labeling. The UI has been updated to support amplicon-aware default scatter and histogram axes, and the workflow now correctly maps the amplicon mode to the peptide computation path in the Python engine. No review comments were provided, so there is no feedback to address.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Greptile Summary
This PR adds support for
synthetic-repertoire-profileramplicon variant datasets by introducing a new"amplicon"workflow mode that reuses the existing peptide physicochemical computation path, differing only in which sequence column is read and how outputs are labeled ("amplicon-sequence"feature instead of"peptide").WorkflowMode— Union type inmodel/src/types.ts. Added"amplicon"as a new variant for synthetic-repertoire-profiler datasets; runs the same math as"peptide"but labels output columns with the"amplicon-sequence"feature.detectMode— Function inworkflow/src/main.tpl.tengo. Now recognizespl7.app/repertoire/extractionRunIdon apl7.app/variantKeyaxis and returns"amplicon", instead of falling through to the "no recognized axis" panic.buildWholeSeqColumns— New parameterised helper inworkflow/src/columns.lib.tengo. Extracts the whole-sequence column list (previously inline to peptide mode) into a shared function called by both peptide and amplicon modes with appropriatefeatureanddeltaLabelvalues.wholeSeqMode— Boolean inworkflow/src/main.tpl.tengo. Extended to covermode == "amplicon"in addition tomode == "peptide", gating the single-sequence fetch path and suppressing chain/region logic.pyMode— Variable inworkflow/src/main.tpl.tengo. Bridges the amplicon→peptide translation: for amplicon runspyMode = "peptide"is sent to the Python engine (which runs the same computation), while the original"amplicon"mode value drives column labeling andcolArgs.ampliconSequences— New bundle key inworkflow/src/main.tpl.tengo. Collectspl7.app/sequencecolumns withpl7.app/feature: "amplicon-sequence"andpl7.app/alphabet: "aminoacid"from the input dataset to locate the whole-variant AA sequence.wholeSeqFeature— New TypeScript helper inui/src/utils/scalarColumns.ts. MapsWorkflowModeto the correspondingpl7.app/featuredomain value ("amplicon-sequence"for amplicon,"peptide"for peptide), enabling mode-aware default scatter/histogram axis selection in the UI.Confidence Score: 4/5
The amplicon mode wiring is correct end-to-end; the only gap is a missing info banner in info.tpl.tengo for short amplicon sequences.
The core amplicon path — detectMode, pyMode translation, column domain labeling, and UI axis selection — is implemented correctly and consistently. The only defect is in info.tpl.tengo: the hasPeptideBelowInstabilityFloor warning fires only on mode == "peptide", so amplicon users whose sequences are shorter than 10 aa will see blank Instability Index cells with no explanation.
workflow/src/info.tpl.tengo — the instability floor guard should cover amplicon mode in addition to peptide mode.
Important Files Changed
Sequence Diagram
%%{init: {'theme': 'neutral'}}%% sequenceDiagram participant Input as Input Dataset participant DM as detectMode() participant Body as wf.body participant Python as Python Engine participant XSV as xsv.importFile participant UI as UI / scalarColumns.ts Input->>DM: axisSpec (pl7.app/variantKey) alt domain has pl7.app/peptide/extractionRunId DM-->>Body: "mode = peptide" else domain has pl7.app/repertoire/extractionRunId (NEW) DM-->>Body: "mode = amplicon" else domain has pl7.app/vdj/clonotypingRunId DM-->>Body: "mode = antibody_tcr_universal" end Body->>Body: "wholeSeqMode = true for peptide or amplicon" Body->>Body: "pyMode = peptide (for amplicon) [NEW]" Body->>Python: plan.json with pyMode + input.tsv Python-->>Body: "properties.tsv headers *_peptide + stats.json" Body->>XSV: "buildColumns → feature=amplicon-sequence [NEW]" XSV-->>Body: PColumns with amplicon-sequence domain Body->>UI: "WorkflowInfo mode=amplicon" UI->>UI: wholeSeqFeature(amplicon) → amplicon-sequence [NEW] UI-->>UI: defaultScatterAxes on amplicon-sequence domain%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%% sequenceDiagram participant Input as Input Dataset participant DM as detectMode() participant Body as wf.body participant Python as Python Engine participant XSV as xsv.importFile participant UI as UI / scalarColumns.ts Input->>DM: axisSpec (pl7.app/variantKey) alt domain has pl7.app/peptide/extractionRunId DM-->>Body: "mode = peptide" else domain has pl7.app/repertoire/extractionRunId (NEW) DM-->>Body: "mode = amplicon" else domain has pl7.app/vdj/clonotypingRunId DM-->>Body: "mode = antibody_tcr_universal" end Body->>Body: "wholeSeqMode = true for peptide or amplicon" Body->>Body: "pyMode = peptide (for amplicon) [NEW]" Body->>Python: plan.json with pyMode + input.tsv Python-->>Body: "properties.tsv headers *_peptide + stats.json" Body->>XSV: "buildColumns → feature=amplicon-sequence [NEW]" XSV-->>Body: PColumns with amplicon-sequence domain Body->>UI: "WorkflowInfo mode=amplicon" UI->>UI: wholeSeqFeature(amplicon) → amplicon-sequence [NEW] UI-->>UI: defaultScatterAxes on amplicon-sequence domainReviews (1): Last reviewed commit: "Adapt Sequence properties block to dms d..." | Re-trigger Greptile
Context used: