@datagrok/sequence-translator 1.10.17 → 1.10.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/CLAUDE.md +15 -12
- package/dist/package-test.js +1 -1
- package/dist/package-test.js.map +1 -1
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/package.json +1 -1
- package/src/apps/common/model/oligo-toolkit-package.ts +13 -1
- package/src/oligo-renderer/analog-cache.ts +48 -0
- package/src/oligo-renderer/canvas-renderer.ts +125 -15
- package/src/oligo-renderer/cell-renderer.ts +19 -20
- package/src/oligo-renderer/helm-parser.ts +3 -2
- package/src/oligo-renderer/legend-panel.ts +31 -6
- package/src/oligo-renderer/types.ts +21 -0
- package/src/package-api.ts +7 -0
- package/src/package-test.ts +1 -0
- package/src/package.g.ts +8 -0
- package/src/package.ts +32 -2
- package/src/tests/oligo-cell-editor-tests.ts +83 -0
- package/src/tests/oligo-renderer-tests.ts +64 -1
- package/test-console-output-1.log +194 -146
- package/test-record-1.mp4 +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Sequence Translator changelog
|
|
2
2
|
|
|
3
|
+
## 1.10.18 (2026-05-11)
|
|
4
|
+
|
|
5
|
+
* OligoNucleotide cell renderer: Fixed bracketed monomer base parsing (e.g. `[5Br-dC]` inside `(...)`) so renderer/resolver pick up modification colors and structures correctly.
|
|
6
|
+
* OligoNucleotide: Added double-click HELM Web Editor for OligoNucleotide cells; OK saves the edited HELM back to the cell
|
|
7
|
+
|
|
3
8
|
## 1.10.14 (2026-04-21)
|
|
4
9
|
|
|
5
10
|
* Chem Enumeration
|
package/CLAUDE.md
CHANGED
|
@@ -107,13 +107,13 @@ The table below lists every function/app/panel registered by `PackageFunctions`.
|
|
|
107
107
|
|
|
108
108
|
#### Top-Menu Functions
|
|
109
109
|
|
|
110
|
-
| Method | top-menu | Description |
|
|
111
|
-
|
|
112
|
-
| `polyToolConvertTopMenu` | `Bio \| PolyTool \| Convert...` | Open convert dialog |
|
|
113
|
-
| `polyToolEnumerateHelmTopMenu` | `Bio \| PolyTool \| Enumerate HELM...` | HELM enumerate dialog |
|
|
114
|
-
| `polyToolEnumerateChemTopMenu` | `Bio \| PolyTool \| Enumerate Chem...` | Chem enumerate dialog |
|
|
115
|
-
| `chemEnumerateReactionsTopMenu` | `Chem \| Transform \| Reactions \| Enumerate...` | Alternate menu for chem enumeration |
|
|
116
|
-
| `getPolyToolCombineDialog` | `Bio \| PolyTool \| Combine Sequences...` | Cartesian-product combine |
|
|
110
|
+
| Method | Registered name | top-menu | Description |
|
|
111
|
+
|---|---|---|---|
|
|
112
|
+
| `polyToolConvertTopMenu` | polyToolConvert | `Bio \| PolyTool \| Convert...` | Open convert dialog |
|
|
113
|
+
| `polyToolEnumerateHelmTopMenu` | polyToolEnumerateHelm | `Bio \| PolyTool \| Enumerate HELM...` | HELM enumerate dialog |
|
|
114
|
+
| `polyToolEnumerateChemTopMenu` | polyToolEnumerateChem | `Bio \| PolyTool \| Enumerate Chem...` | Chem enumerate dialog |
|
|
115
|
+
| `chemEnumerateReactionsTopMenu` | chemEnumerateReactions | `Chem \| Transform \| Reactions \| Enumerate...` | Alternate menu for chem enumeration |
|
|
116
|
+
| `getPolyToolCombineDialog` | Combine Sequences | `Bio \| PolyTool \| Combine Sequences...` | Cartesian-product combine |
|
|
117
117
|
|
|
118
118
|
#### Cell Renderer
|
|
119
119
|
|
|
@@ -252,9 +252,9 @@ A self-contained renderer + panels + converters for siRNA/ASO duplex HELM cells.
|
|
|
252
252
|
|
|
253
253
|
**Model:** `event-bus.ts` (RxJS BehaviorSubjects), `data-manager.ts` (singleton CRUD via user storage, SHA1 identity), `translator.ts` (`bulkTranslate`, `applyPatternToRawSequence`), `router.ts` (URL ↔ EventBus), `subscription-manager.ts`, `types.ts`, `const.ts` (strands, termini, `MAX_SEQUENCE_LENGTH = 34`), `utils.ts`.
|
|
254
254
|
|
|
255
|
-
**View:** `ui.ts` (`OligoPatternUI`), `components/` (left section, edit-block, load-block, strand-editor dialog, terminal-modification editor, bulk-convert, numeric-label visibility, translation-examples).
|
|
255
|
+
**View:** `ui.ts` (`OligoPatternUI`), `components/` (left-section, right-section, edit-block, load-block, strand-editor dialog, terminal-modification editor, bulk-convert, numeric-label visibility, translation-examples).
|
|
256
256
|
|
|
257
|
-
**SVG Rendering** (`view/svg-utils/`): `svg-renderer.ts` (`NucleotidePatternSVGRenderer`), `strands-block.ts`, `title-block.ts`, `legend-block.ts`, `svg-element-factory.ts`, `svg-display-manager.ts` (debounced 100ms + PNG export), `text-dimensions-calculator.ts`, `const.ts`.
|
|
257
|
+
**SVG Rendering** (`view/svg-utils/`): `svg-block-base.ts` (`SVGBlockBase` — base class for composable SVG blocks, see Design Pattern #7), `svg-renderer.ts` (`NucleotidePatternSVGRenderer`), `strands-block.ts`, `title-block.ts`, `legend-block.ts`, `svg-element-factory.ts`, `svg-display-manager.ts` (debounced 100ms + PNG export), `text-dimensions-calculator.ts`, `utils.ts`, `const.ts`.
|
|
258
258
|
|
|
259
259
|
### `apps/structure/` — Molecular Structure App
|
|
260
260
|
|
|
@@ -278,8 +278,8 @@ A self-contained renderer + panels + converters for siRNA/ASO duplex HELM cells.
|
|
|
278
278
|
|---|---|
|
|
279
279
|
| `pt-dialog.ts` | Main convert dialog; `polyToolConvertUI()`, `polyToolConvert()` |
|
|
280
280
|
| `pt-enumerate-seq-dialog.ts` | HELM enumeration dialog; `polyToolEnumerateHelmUI(cell?, outputAsOligo=false)`, `getPolyToolEnumerateDialog`, `polyToolEnumerateSeq`. The `outputAsOligo` flag tags the result column as OligoNucleotide so the duplex renderer picks it up |
|
|
281
|
-
| `pt-chem-enum.ts` | Chem enumeration core (formerly `pt-enumeration-chem.ts` in older docs) |
|
|
282
|
-
| `pt-chem-enum-dialog.ts` | Chem enumeration dialog UI; `polyToolEnumerateChemUI
|
|
281
|
+
| `pt-chem-enum.ts` | Chem enumeration core (formerly `pt-enumeration-chem.ts` in older docs). Pure logic — RDKit module only, no Datagrok/UI deps. Normalizes 5 R-label spellings (`[N*]`, `[*:N]`, `[*N]`, `[RN]`, `[R:N]`) to `[*:N]`. `Zip` and `Cartesian` modes; `CHEM_ENUM_MAX_RESULTS = 1_000_000` cap. **Two-path SMILES assembly** (`buildJoinedSmiles`): atom-substitution R-groups (no `[*:N]` in their SMILES — single-atom mode) are spliced into the core via plain string replace; labeled R-groups are then joined via shared ring-closure digits across a disconnected SMILES. **`isSingleAtom`** on `ChemEnumRGroup` is set when `makeRGroup` finds 0 R-labels and `trySingleAtomCanonical` (RDKit `get_num_atoms(true) === 1` + `remove_hs_in_place()`) returns a canonical atom token. Pipeline is two-stage: `enumerateRaw` returns parseable-but-uncanonical SMILES with **zero RDKit calls**; `executeEnumeration` then canonicalizes the whole column in one batched `Chem:convertNotation` call, which also fixes aromaticity case after a single-atom splice. `enumerate` / `enumerateSample` are sync-RDKit variants for tests. Helpers: `moveStartRLabelToBranch`, `pickFreeRingDigits`, `formatRingDigit`, `substituteRLabelWithRingDigit`, `substituteRLabelWithAtom` |
|
|
282
|
+
| `pt-chem-enum-dialog.ts` | Chem enumeration dialog UI; `polyToolEnumerateChemUI(cell?)` (dialog; cell preload → first core when it has ≥1 R-label, else `grok.shell.info`) and `polyToolEnumerateChemApp` (`DG.View` entry; both share `buildChemEnumPanel` + `bindActionButton`). Card UI 110×104 with 320×260 hover tooltip, three hover-revealed action icons: edit + duplicate (`var(--blue-3)`) + delete (`var(--red-3)`). **Duplicate** reopens the sketcher pre-loaded with the molecule and pushes a NEW card on OK (original untouched). Cores rendered in a single horizontal `virtualView`; R-groups in one horizontal `virtualView` per R# inside a capped-height vertical scroll. Live preview: up to 12 reservoir-sampled molecules via `enumerateSampleRaw` (uncanonical SMILES, `grok.chem.drawMolecule` parses lazily per visible card). `openCoreSketchDialog` accepts when ≥1 R-label is present; `openRGroupSketchDialog` accepts when **(exactly 1 R-label) OR (single atom + target R# set)**. Import wizard (`openImportWizard`) picks Molecule column from any open table, infers R# from column name via `/r[\s_\-:]*(\d+)/i`, dedup checkbox, single-atom rows labeled `R{n} · atom`. Mode tooltip / status messages explain Zip vs Cartesian and the single-atom shortcut |
|
|
283
283
|
| `pt-enumeration-helm.ts` | `doPolyToolEnumerateHelm` engine — Single / Parallel / Matrix / Breadth strategies |
|
|
284
284
|
| `pt-combine-dialog.ts` | `getPTCombineDialog` — Cartesian combine |
|
|
285
285
|
| `pt-placeholders-input.ts` | Grid input for point placeholders |
|
|
@@ -386,6 +386,8 @@ Helper scripts and a standalone HTML prototype for the OligoNucleotide subsystem
|
|
|
386
386
|
8. **Dialog Singletons** — Strand/terminal editors prevent multiple instances
|
|
387
387
|
9. **HELMCore-canonical aliases** (oligo-renderer) — input HELM may use vendor / Pistoia / legacy symbols (`mR`, `fR`, `sP`); the renderer resolves through alias maps and serializes canonical (`m`, `fl2r`, `sp`) before forwarding to Bio's library-driven pipelines (so monomer lookups always hit)
|
|
388
388
|
10. **Column-version-keyed cache** — the OligoNucleotide cell renderer's per-cell layout cache is keyed by `${colName}@${col.version}::${rowIdx}`, so column edits orphan old entries automatically
|
|
389
|
+
11. **Two-stage chem-enum pipeline** — `enumerateRaw` does pure-string assembly (ring-closure trick + atom splice for single-atom R-groups), produces parseable but uncanonical SMILES with **zero per-row RDKit calls**; `executeEnumeration` then canonicalizes the whole output column in a single batched `Chem:convertNotation` call (`overwrite: true`, `kekulize: false`). This also handles aromaticity case-fixup after a single-atom splice (e.g. uppercase `N` spliced into an aromatic ring). The bulk path is parallelized across Chem workers; per-row sync RDKit (`enumerate` / `enumerateSample`) is reserved for tests
|
|
390
|
+
12. **Single-atom R-group shortcut** (chem-enum) — drawing a bare atom (`N`, `O`, `Cl`) without any `[*:N]` label is accepted as long as RDKit confirms exactly one heavy atom. Such groups bypass ring-closure joining and are spliced into the core's `[*:N]` slot via plain string replace; mixing single-atom and labeled R-groups in the same enumeration is supported per R-number
|
|
389
391
|
|
|
390
392
|
---
|
|
391
393
|
|
|
@@ -452,7 +454,8 @@ OligoNucleotide structures panel:
|
|
|
452
454
|
| Structure app | `src/apps/structure/` |
|
|
453
455
|
| PolyTool convert pipeline | `src/polytool/conversion/`, `pt-dialog.ts` |
|
|
454
456
|
| HELM enumeration (with `outputAsOligo`) | `src/polytool/pt-enumerate-seq-dialog.ts` |
|
|
455
|
-
| Chem enumeration | `src/polytool/pt-chem-enum.ts
|
|
457
|
+
| Chem enumeration (logic) | `src/polytool/pt-chem-enum.ts` (`buildJoinedSmiles` two-path assembly, `trySingleAtomCanonical`, `substituteRLabelWithAtom`) |
|
|
458
|
+
| Chem enumeration (UI) | `src/polytool/pt-chem-enum-dialog.ts` (`buildChemEnumPanel`, sketch dialogs, `openImportWizard`, duplicate/edit/delete card icons) |
|
|
456
459
|
| Demo / sample siRNA data | `files/samples/sirna-demo.csv` |
|
|
457
460
|
| Off-tree dev tooling | `prototypes/` (gen / validate / HTML prototype) |
|
|
458
461
|
| Auto-generated wrappers | `src/package.g.ts`, `src/package-api.ts` |
|