@datagrok-libraries/bio 5.61.4 → 5.61.5

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/CLAUDE.md ADDED
@@ -0,0 +1,305 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Overview
6
+
7
+ **@datagrok-libraries/bio** is the core shared library for all bioinformatics functionality in the Datagrok platform. It provides types, utilities, renderers, and service interfaces for working with macromolecules (peptides, DNA, RNA, HELM), 3D molecular structures (PDB/PDBQT/mmCIF), phylogenetic trees, and monomer libraries.
8
+
9
+ This is a **library** (not a package) — it has no `package.ts`, no webpack, no platform registration. It is compiled with `tsc` to `.js`/`.d.ts` and consumed by multiple packages (`Bio`, `Helm`, `Peptides`, `BiostructureViewer`, `Dendrogram`, `HitTriage`, etc.).
10
+
11
+ ## Build Commands
12
+
13
+ ```bash
14
+ npm install
15
+ npm run build # grok check --soft && tsc
16
+ npm run build-all # Builds chem-meta → js-api → gridext → utils → ml → this library
17
+ npm run lint # eslint "./src/**/*.ts"
18
+ npm run lint-fix
19
+ npm run link-all # Links chem-meta, datagrok-api, gridext, utils, ml
20
+ ```
21
+
22
+ ## Key Dependencies
23
+
24
+ - `datagrok-api` — platform API (`DG`, `grok`, `ui`)
25
+ - `@datagrok-libraries/chem-meta` — RDKit API types, chemistry metadata (MolNotation, RDModule)
26
+ - `@datagrok-libraries/utils` — BitArray, vector operations, type declarations, SVG utilities
27
+ - `@datagrok-libraries/ml` — distance metrics, dimensionality reduction
28
+ - `@datagrok-libraries/gridext` — grid extension types (IGridNeighbor)
29
+ - `@datagrok-libraries/helm-web-editor` — JSDraw2 + Pistoia HELM Web Editor types (devDependency, types only)
30
+ - `@datagrok-libraries/js-draw-lite` — JSDraw2 Lite types (devDependency, types only)
31
+ - `lru-cache`, `rxjs`, `wu`, `cash-dom`, `uuid`, `fastest-levenshtein`
32
+
33
+ ## Architecture — Service Pattern
34
+
35
+ Many capabilities are defined as **interfaces here** but **implemented in packages**. Factory functions dynamically resolve implementations at runtime via `DG.Func.find()`:
36
+
37
+ | Interface | Factory function | Implementing package |
38
+ |---|---|---|
39
+ | `ISeqHelper` | `getSeqHelper()` | Bio |
40
+ | `IMonomerLibHelper` | `getMonomerLibHelper()` | Bio |
41
+ | `IHelmHelper` | `getHelmHelper()` | Helm |
42
+ | `HelmServiceBase` | `getHelmService()` | Helm |
43
+ | `IPdbHelper` | `getPdbHelper()` | BiostructureViewer |
44
+ | `IAutoDockService` | `getAutoDockService()` | Docking |
45
+ | `NglGlServiceBase` | `getNglGlService()` | BiostructureViewer |
46
+ | `PhylocanvasGlServiceBase` | `getPhylocanvasGlService()` | PhyloTreeViewer |
47
+ | `ITreeHelper` | `getTreeHelper()` | Dendrogram |
48
+ | `IDendrogramService` | `getDendrogramService()` | Dendrogram |
49
+ | `RDModule` | `getRdKitModule()` | Chem |
50
+
51
+ This decouples the library from concrete package implementations, allowing packages to be installed independently.
52
+
53
+ ## Source Structure
54
+
55
+ ### Top-Level Modules (`src/`)
56
+
57
+ | File | Purpose |
58
+ |---|---|
59
+ | `aminoacids.ts` | `Aminoacids` class (names, codes, semantic types) + `AminoacidsPalettes` (Lesk, GrokGroups, RasMol color schemes) |
60
+ | `nucleotides.ts` | `Nucleotides` class (names, codes) + `NucleotidesPalettes` (Chromatogram colors) |
61
+ | `seq-palettes.ts` | `SeqPalette` interface + `SeqPaletteBase` base class with shared color palette definitions |
62
+ | `sequence-encoder.ts` | `AlignedSequenceEncoder` — categorical/numerical encoding of amino acid sequences (Wimley-White, categorial scales) |
63
+ | `unknown.ts` | `UnknownSeqPalettes` — hash-based color assignment for non-standard monomers, reads custom colors from monomer library |
64
+ | `utils.ts` | `getColumnSeparator()` — detects separator character in sequence columns |
65
+
66
+ ### `types/` — Core Type Definitions
67
+
68
+ | File | Purpose |
69
+ |---|---|
70
+ | `monomer-library.ts` | **Key file.** `Monomer` type (HELM JSON schema), `IMonomerLib` / `IMonomerLibBase` (monomer library interface), `IMonomerLibHelper` (library management singleton), `IMonomerLibProvider` (pluggable library sources — files, DBs, etc.), `MonomerSet` / `MonomerSetPlaceholder` |
71
+ | `renderer.ts` | `IRenderer` interface — `onRendered` observable + `invalidate()` + `awaitRendered()` for test synchronization |
72
+ | `input.ts` | `InputColumnBase` — extended column input with `setColumnInputTable()`, augments `ui.input` namespace |
73
+ | `dojo.ts` | Dojo Toolkit module declaration (for HELM Web Editor) |
74
+ | `ngl.ts` | NGL.js library type declarations (Stage, Component, Viewer, Colormaker, etc.) |
75
+ | `index.ts` | Re-exports from `monomer-library.ts` |
76
+
77
+ ### `helm/` — HELM Notation Types and Helpers
78
+
79
+ | File | Purpose |
80
+ |---|---|
81
+ | `types.ts` | Re-exports all HELM types from `@datagrok-libraries/helm-web-editor` and `js-draw-lite`: `HelmType`, `HelmAtom`, `HelmBond`, `HelmMol`, `HelmEditor`, `PolymerType`, `MonomerType`, `IHelmWebEditor`, `ISeqMonomer`, `MonomerSetType`, etc. |
82
+ | `consts.ts` | Re-exports `HelmTypes`, `MonomerTypes`, `PolymerTypes`, `MonomerNumberingTypes`, `HelmTabKeys` |
83
+ | `helm-helper.ts` | `IHelmHelper` interface (parse, removeGaps, getMolfiles, createHelmInput, createWebEditorApp), `HelmInputBase` abstract class, `HelmNotSupportedError`, `getHelmHelper()` factory, `getMonomerHandleArgs()` helper. Augments `ui.input` with `helmAsync()` |
84
+ | `utils.ts` | `cleanupHelmSymbol()` — strips brackets from HELM monomer symbols |
85
+
86
+ ### `molecule/` — 2D Molecule Column Handling
87
+
88
+ | File | Purpose |
89
+ |---|---|
90
+ | `types.ts` | `MoleculeBase` data class, `MoleculeBuildDataFunc` type |
91
+ | `molecule-build-data.ts` | `buildDataMolV2000` / `buildDataMolV3000` — parsers for MOL V2000/V3000 |
92
+ | `molecule-units-handler.ts` | `MoleculeUnitsHandler` — units handler for `Molecule` semtype columns (molV2000/molV3000), `getAsPdb()` conversion |
93
+
94
+ ### `molecule-3d/` — 3D Molecular Structure Column Handling
95
+
96
+ | File | Purpose |
97
+ |---|---|
98
+ | `types.ts` | `Molecule3DBase` data class, `Molecule3DBuildDataFunc` type |
99
+ | `molecule-3d-build-data.ts` | `buildDataPdb` / `buildDataPdbqt` / `buildDataMmcif` — parsers for PDB/PDBQT/mmCIF |
100
+ | `molecule-3d-units-handler.ts` | `Molecule3DUnitsHandler` — units handler for `Molecule3D` semtype columns (pdb/pdbqt/mmcif), `getAsPdb()` conversion |
101
+ | `index.ts` | Barrel re-export |
102
+
103
+ ### `monomer-works/` — Sequence-to-Molfile Conversion Engine
104
+
105
+ The core engine for converting macromolecule sequences into V3000 molfiles.
106
+
107
+ | File | Purpose |
108
+ |---|---|
109
+ | `types.ts` | Core types: `MonomerGraph` (atoms, bonds, R-groups), `MolGraph` (assembled molecule graph), `MonomerMapValue` (atom/bond indices per position), `MonomerSequenceDict`, `SeqToMolfileWorkerInput/Output`, `LibSettings` |
110
+ | `consts.ts` | V2K/V3K parsing tokens, precision factors, canonical nucleotide component symbols (ribose, deoxyribose, phosphate) |
111
+ | `monomer-works.ts` | `MonomerWorks` class — wraps `IMonomerLib`, provides `getMonomerMolfile()`. `helmTypeToPolymerType()` converter |
112
+ | `to-atomic-level.ts` | **Core engine.** `seqColToMolFileColumn()` — converts macromolecule column to molfile column. Handles molfile parsing, V2K→V3K conversion, spatial adjustment (rotation, flipping, coordinate shifting), R-group capping, stereo-center handling, and final V3K assembly |
113
+ | `to-atomic-level-utils.ts` | Molfile assembly engine: `buildMolfileFromSeq()` — chains monomers into a complete V3K molfile. Handles peptide bonds, nucleotide assembly (sugar+phosphate+base), terminal capping |
114
+ | `seq-to-molfile.ts` | Parallel orchestration: `seqToMolfile()` — spawns Web Workers for parallel conversion. `getHighlightMoleculeData()` — builds per-monomer atom/bond coloring for highlights |
115
+ | `seq-to-molfile-worker.ts` | Web Worker entry point — receives sequence chunks, calls `buildMolfileFromSeq()`, posts results back |
116
+ | `monomer-hover.ts` | `addMonomerHoverLink()` — creates hover links between sequence cells and molecule cells with LRU-cached monomer maps. `executeHoverLinks()` / `getHoverLinks()` / `addHoverLink()` |
117
+ | `monomer-utils.ts` | Analytics: `encodeMonomerSymbol()` (Unicode encoding), `getMonomerMolfiles()`, `sdfToJson()` (SDF→HELM library conversion), `calculatePositionChemSimilarity()`, `monomerPairwiseSimilarity()`, `getSubstitutionMatrix()` |
118
+ | `lib-settings.ts` | `loadLibSettings()` / `saveLibSettings()` — user-specific monomer library preferences with chunked storage |
119
+ | `utils.ts` | Small shared helpers: `getAtomicLevelColName()`, `helmTypeToNotation()`, `hexToPercentRgba()` |
120
+
121
+ **Data flow for sequence → molfile conversion:**
122
+ 1. `seqColToMolFileColumn()` in `to-atomic-level.ts` is the entry point
123
+ 2. It parses monomer molfiles from the library into `MonomerGraph` objects
124
+ 3. `seqToMolfile()` in `seq-to-molfile.ts` spawns Web Workers
125
+ 4. Each worker (`seq-to-molfile-worker.ts`) calls `buildMolfileFromSeq()` from `to-atomic-level-utils.ts`
126
+
127
+ ### `utils/` — Core Utilities
128
+
129
+ #### Macromolecule subsystem (`utils/macromolecule/`)
130
+
131
+ | File | Purpose |
132
+ |---|---|
133
+ | `types.ts` | **Key file.** `ISplitted` (split sequence interface), `INotationProvider` (notation-specific behavior), `SplitterFunc` type, `CandidateType` (alphabet detection), `SeqColStats` / `SeqColStatsCached` |
134
+ | `consts.ts` | **Key file.** `NOTATION` enum (FASTA, SEPARATOR, HELM), `ALIGNMENT` enum, `ALPHABET` enum (DNA, RNA, PT, UN), `TAGS` (column tag names for units, aligned, alphabet, separator, region), `GAP_SYMBOL`, `ALPHABET_CHARS`, regex patterns for FASTA/HELM parsing |
135
+ | `utils.ts` | **Largest utility file.** All `Splitter` implementations: `SplitterBase`, `SplitterFasta`, `SplitterHelm`, `SplitterBiln`. Splitter factory functions. Alphabet detection via cosine similarity. Palette selection. Monomer abbreviation. `getJoiner()`, `getAlphabetSimilarity()`, `getStats()`, `candidateStats()` |
136
+ | `seq-handler.ts` | `ISeqHandler` interface — central abstraction for a macromolecule column: notation, alphabet, separator, splitter/joiner, HELM conversion, region extraction, distance function selection. `SeqValueBase` — wraps a single row value with `getOriginal()`, `getCanonical()`, `helm` |
137
+ | `scoring.ts` | `ScoringMethod` enum + `calculateIdentityScoring()` / `calculateChemSimilarityScoring()` — sequence scoring vs reference |
138
+ | `alignment.ts` | `pairwiseAlignmentWithEmptyPositions()` — Needleman-Wunsch alignment with gap penalties |
139
+ | `monomers.ts` | Precomputed SMILES/fingerprints for 20 amino acids + 5 nucleotides. `calcMonomerFps()`, `matchMonomerToNatural()` |
140
+ | `index.ts` | Barrel re-exports for the macromolecule module |
141
+
142
+ #### Cell Rendering
143
+
144
+ | File | Purpose |
145
+ |---|---|
146
+ | `cell-renderer-consts.ts` | Temp/tag name constants for renderer settings (font size, color coding, max monomer length, multiline) |
147
+ | `cell-renderer.ts` | Low-level `drawMonomer()` function — paints individual monomers on canvas with MSA/classic styles, transparency, color coding |
148
+ | `cell-renderer-monomer-placer.ts` | `MonomerPlacer` — the core rendering engine for macromolecule sequences in grid cells. Computes per-position widths, handles single-line/multiline layout, MSA alignment, reference sequence comparison, position scrolling, hit-testing for hover/click, monomer tooltips |
149
+ | `cell-renderer-back-base.ts` | `CellRendererBackBase` — lifecycle management base class (dataframe subscriptions, dirty tracking, `IRenderer` implementation) |
150
+ | `cell-renderer-async-base.ts` | `GridCellRendererBackAsyncBase` — async rendering with priority queue, LRU image cache, timeout/retry, stale task sweeping |
151
+
152
+ #### Other Utilities
153
+
154
+ | File | Purpose |
155
+ |---|---|
156
+ | `seq-helper.ts` | `ISeqHelper` interface + `getSeqHelper()` factory. `ISeqHelper` is the primary entry point for sequence operations: `getSeqHandler()`, `setNotationProvider()`, `getMonomersList()`, `helmToSmiles()`, `helmToMolfile()` |
157
+ | `const.ts` | HELM monomer library JSON schema field names (`HELM_REQUIRED_FIELD`, `HELM_OPTIONAL_FIELDS`, `HELM_RGROUP_FIELDS`), SDF-to-JSON mapping, dummy monomer template, encoding ranges |
158
+ | `splitter.ts` | `joinDataFrames()` — splits aligned sequences into per-position columns |
159
+ | `composition-table.ts` | `getCompositionTable()` — builds HTML monomer composition bar chart |
160
+ | `fasta-handler.ts` | `FastaFileHandler` — parses FASTA files into DataFrames |
161
+ | `generator.ts` | Test data generators for synthetic macromolecule columns |
162
+ | `sequence-position-scroller.ts` | `SequencePositionScroller` — interactive MSA header with WebLogo tracks, conservation scoring, position slider, composition tooltips (~1600 lines) |
163
+ | `data-provider.ts` | `getDataProviderFuncs()` — discovers registered data provider functions by semtype |
164
+ | `docker.ts` | `awaitStatus()` — polls Docker container status until target state |
165
+ | `syncer.ts` | `Syncer` — serializes concurrent async operations into sequential execution |
166
+ | `units-handler-base.ts` | `UnitsHandlerBase<S, D>` — generic base class for semtype column units handling with lazy data parsing |
167
+ | `err-info.ts` | `errInfo()` / `toErrorString()` — error message extraction from various error types |
168
+ | `logger.ts` | `ILogger` / `BioLogger` — structured logging with prefix and debug suppression |
169
+ | `monomer-ui.ts` | Interfaces for monomer editor UI (`ICreateMonomerForm`, `IMonomerManager`) and DG property schema for monomer input fields |
170
+
171
+ ### `viewers/` — Viewer Interface Definitions
172
+
173
+ All viewer types follow `IXxxViewer` + property defaults pattern. Implementations live in their respective packages.
174
+
175
+ | File | Purpose |
176
+ |---|---|
177
+ | `viewer.ts` | `IBioViewer` base interface (extends `IRenderer`) |
178
+ | `web-logo.ts` | `IWebLogoViewer` — sequence logo viewer properties and interface |
179
+ | `helm-service.ts` | `HelmServiceBase` — off-screen HELM rendering service abstraction |
180
+ | `molecule3d.ts` | `Molecule3DData` type, `DockingRole` enum, `IMolecule3DViewer` interface |
181
+ | `molstar-viewer.ts` | `IMolstarViewer` — Mol* biostructure viewer properties |
182
+ | `ngl-gl-service.ts` | `NglGlServiceBase` — NGL cell-level rendering service |
183
+ | `ngl-gl-viewer.ts` | `INglGlViewer` — full NGL 3D viewer properties |
184
+ | `phylocanvas-gl-viewer.ts` | `IPhylocanvasGlViewer` + `PhylocanvasGlServiceBase` — phylogenetic tree viewer/service |
185
+ | `vd-regions.ts` | `IVdRegionsViewer` — antibody V-Domain region viewer (CDR/FR with IMGT numbering) |
186
+ | `biotrack.ts` | `IBiotrackViewer` — biotrack viewer interface |
187
+
188
+ ### `pdb/` — PDB/PDBQT File Format Handling
189
+
190
+ | File | Purpose |
191
+ |---|---|
192
+ | `types.ts` | `BiostructureData` type (binary/text with extension), `BiostructureDataJson` namespace for serialization |
193
+ | `pdb-helper.ts` | `IPdbHelper` interface (parse, convert PDB/PDBQT/mol), `PdbAtomDataFrame` typed DataFrame |
194
+ | `auto-dock-service.ts` | `IAutoDockService` interface (docking operations, Docker container management) |
195
+ | `index.ts` | `PdbTag` constant export |
196
+ | `format/` | PDB/PDBQT atom record parsing classes: `AtomRecordBase` → `PdbAtomRecord` / `PdbqtAtomRecord`, with coordinate parsing, chain/residue sorting, TER records |
197
+
198
+ ### `trees/` — Phylogenetic Tree Handling
199
+
200
+ | File | Purpose |
201
+ |---|---|
202
+ | `types.ts` | `NodeType` (name, branch_length, children), `NodeCuttedType`, `ClusterMatrix` |
203
+ | `consts.ts` | Newick tags, tree color palette, distance metrics (Euclidean, Manhattan), linkage methods (single, complete, average, Ward, etc.) |
204
+ | `phylocanvas.ts` | PhylocanvasGL integration: tree layouts, node shapes, Newick parser |
205
+ | `tree-helper.ts` | `ITreeHelper` — comprehensive tree manipulation (Newick↔DataFrame, clustering, filtering, cutting, grid reordering) |
206
+ | `dendrogram.ts` | `IDendrogramService` — grid-adjacent dendrogram visualization |
207
+ | `utils.ts` | `isLeaf()` helper |
208
+ | `index.ts` | Barrel re-export |
209
+
210
+ ### `tests/` — Library-Level Tests
211
+
212
+ | File | Purpose |
213
+ |---|---|
214
+ | `monomer-lib-tests.ts` | `testExpectedMonomerLib()` — validates IMonomerLib against expected polymer type counts |
215
+ | `palettes-tests.ts` | Tests for nucleotide and amino acid palette instantiation |
216
+
217
+ ### Other
218
+
219
+ | File | Purpose |
220
+ |---|---|
221
+ | `chem/rdkit-module.ts` | `getRdKitModule()` — dynamically loads RDKit WASM from Chem package |
222
+ | `ntseq/ntseq.js` | High-performance nucleotide sequence library (4-bit encoding, complement, translation, alignment/mapping) |
223
+ | `substructure-filter/bio-substructure-filter-types.ts` | `IBioSubstructureFilter` abstract class — framework for FASTA/HELM substructure filtering |
224
+
225
+ ## Key Concepts
226
+
227
+ ### Semantic Types & Notations
228
+
229
+ Macromolecule columns have `semType = 'Macromolecule'` with metadata tags:
230
+ - `units` — notation: `fasta`, `separator`, `helm`
231
+ - `alphabet` — `PT` (peptide), `DNA`, `RNA`, `UN` (unknown)
232
+ - `separator` — monomer delimiter for separator notation (`.`, `-`, ` `)
233
+ - `aligned` — `SEQ` (unaligned), `SEQ.MSA` (multiple sequence alignment)
234
+
235
+ ### Monomer Library System
236
+
237
+ Monomers follow the Pistoia HELM JSON schema. The library system has three layers:
238
+ 1. **`IMonomerLibProvider`** — pluggable data sources (files, databases)
239
+ 2. **`IMonomerLibHelper`** — singleton manager, loads/reloads libraries from configured providers
240
+ 3. **`IMonomerLib`** — the in-memory monomer dictionary, queryable by polymer type + symbol
241
+
242
+ ### Sequence Splitting
243
+
244
+ Sequences are split into per-position monomers via `SplitterFunc` implementations:
245
+ - `SplitterFasta` — character-level splitting for FASTA notation
246
+ - `SplitterBase` — separator-based splitting
247
+ - `SplitterHelm` — HELM parsing with graph/connection info
248
+ - `SplitterBiln` — BILN notation with cyclization marks
249
+
250
+ The split result implements `ISplitted` with `getOriginal(pos)`, `getCanonical(pos)`, `isGap(pos)`, `length`.
251
+
252
+ ### Cell Rendering Pipeline
253
+
254
+ Macromolecule grid cell rendering uses a layered async architecture:
255
+ 1. `CellRendererBackBase` — lifecycle management, dirty tracking
256
+ 2. `GridCellRendererBackAsyncBase` — async rendering with LRU cache
257
+ 3. `MonomerPlacer` — layout engine (single/multiline, position widths, scrolling)
258
+ 4. `drawMonomer()` — low-level canvas drawing with palette colors
259
+
260
+ ## Quick Lookups
261
+
262
+ | Looking for... | Check first |
263
+ |---|---|
264
+ | Monomer library types (`Monomer`, `IMonomerLib`) | `src/types/monomer-library.ts` |
265
+ | Monomer library management (`IMonomerLibHelper`) | `src/types/monomer-library.ts` |
266
+ | HELM types (`HelmType`, `HelmAtom`, `HelmMol`) | `src/helm/types.ts` |
267
+ | HELM helper interface (`IHelmHelper`) | `src/helm/helm-helper.ts` |
268
+ | Sequence helper interface (`ISeqHelper`) | `src/utils/seq-helper.ts` |
269
+ | Macromolecule handler interface (`ISeqHandler`) | `src/utils/macromolecule/seq-handler.ts` |
270
+ | Notation/alphabet/tag constants | `src/utils/macromolecule/consts.ts` |
271
+ | Sequence splitter implementations | `src/utils/macromolecule/utils.ts` |
272
+ | Macromolecule type system (`ISplitted`, `SplitterFunc`) | `src/utils/macromolecule/types.ts` |
273
+ | Amino acid palettes & names | `src/aminoacids.ts` |
274
+ | Nucleotide palettes & names | `src/nucleotides.ts` |
275
+ | Non-standard monomer palettes | `src/unknown.ts` |
276
+ | Cell renderer for sequences | `src/utils/cell-renderer-monomer-placer.ts` |
277
+ | Low-level monomer drawing | `src/utils/cell-renderer.ts` |
278
+ | Async cell renderer base classes | `src/utils/cell-renderer-async-base.ts` |
279
+ | Sequence-to-molfile conversion | `src/monomer-works/to-atomic-level.ts` |
280
+ | Molfile assembly from monomers | `src/monomer-works/to-atomic-level-utils.ts` |
281
+ | Parallel molfile conversion | `src/monomer-works/seq-to-molfile.ts` |
282
+ | Monomer hover highlighting | `src/monomer-works/monomer-hover.ts` |
283
+ | Monomer similarity/scoring matrices | `src/monomer-works/monomer-utils.ts` |
284
+ | HELM JSON schema constants | `src/utils/const.ts` |
285
+ | PDB/PDBQT parsing | `src/pdb/format/` |
286
+ | PDB helper interface | `src/pdb/pdb-helper.ts` |
287
+ | AutoDock service interface | `src/pdb/auto-dock-service.ts` |
288
+ | 3D structure data types | `src/viewers/molecule3d.ts` + `src/pdb/types.ts` |
289
+ | Tree types & Newick parsing | `src/trees/phylocanvas.ts` |
290
+ | Tree helper interface | `src/trees/tree-helper.ts` |
291
+ | Dendrogram service interface | `src/trees/dendrogram.ts` |
292
+ | WebLogo viewer interface | `src/viewers/web-logo.ts` |
293
+ | Molstar viewer interface | `src/viewers/molstar-viewer.ts` |
294
+ | NGL viewer interface | `src/viewers/ngl-gl-viewer.ts` |
295
+ | FASTA file parsing | `src/utils/fasta-handler.ts` |
296
+ | Sequence alignment (Needleman-Wunsch) | `src/utils/macromolecule/alignment.ts` |
297
+ | Sequence scoring (identity/similarity) | `src/utils/macromolecule/scoring.ts` |
298
+ | Natural monomer fingerprints | `src/utils/macromolecule/monomers.ts` |
299
+ | MSA position scroller/header | `src/utils/sequence-position-scroller.ts` |
300
+ | Substructure filter framework | `src/substructure-filter/bio-substructure-filter-types.ts` |
301
+ | Nucleotide sequence library (fast) | `src/ntseq/ntseq.js` |
302
+ | RDKit module accessor | `src/chem/rdkit-module.ts` |
303
+ | Test data generation | `src/utils/generator.ts` |
304
+ | Error handling utilities | `src/utils/err-info.ts` |
305
+ | Docker container polling | `src/utils/docker.ts` |
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "access": "public"
9
9
  },
10
10
  "friendlyName": "Datagrok bio library",
11
- "version": "5.61.4",
11
+ "version": "5.61.5",
12
12
  "description": "Bio utilities, types supporting Macromolecule, Molecule3D data",
13
13
  "dependencies": {
14
14
  "@datagrok-libraries/chem-meta": "^1.2.7",
@@ -36,7 +36,6 @@
36
36
  "@types/wu": "^2.1.44",
37
37
  "@typescript-eslint/eslint-plugin": "^8.8.1",
38
38
  "@typescript-eslint/parser": "^8.8.1",
39
- "datagrok-tools": "^4.14.20",
40
39
  "eslint": "8.57.1",
41
40
  "eslint-config-google": "^0.14.0",
42
41
  "eslint-plugin-deprecation": "^3.0.0",
@@ -51,4 +51,5 @@ export declare const GapOriginals: {
51
51
  [units: string]: string;
52
52
  };
53
53
  export declare const MONOMER_MOTIF_SPLITTER = " , ";
54
+ export declare const NOTATION_PROVIDER_CONSTRUCTOR_ROLE = "notationProviderConstructor";
54
55
  //# sourceMappingURL=consts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["consts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,SAAS,CAAC;AAEtC,0EAA0E;AAC1E,oBAAY,QAAQ;IAClB,KAAK,UAAU;IACf,SAAS,cAAc;IACvB,IAAI,SAAS;IACmB,MAAM,WAAW;IACjB,IAAI,SAAS;CAC9C;AAED,0BAAkB,SAAS;IACzB,OAAO,YAAY;IACnB,GAAG,QAAQ;CACZ;AAED,oBAAY,QAAQ;IAClB,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,EAAE,OAAO;IACT,cAAc;IACd,EAAE,OAAO;CACV;AAED,oBAAY,IAAI;IACd,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,YAAY,kBAAkB;IAC9B,mBAAmB,yBAAyB;IAC5C,SAAS,cAAc;IACvB,gBAAgB,sBAAsB;IACtC,aAAa,mBAAmB;IAChC,cAAc,oBAAoB;IAClC,OAAO,aAAa;IACpB,aAAa,mBAAmB;IAChC,gBAAgB,sBAAsB;IACtC,qBAAqB,2BAA2B;CACjD;AAED,OAAO,EAAC,IAAI,IAAI,OAAO,EAAC,CAAC;AAEzB,eAAO,MAAM,iBAAiB,EAAE,MAAa,CAAC;AAE9C,eAAO,MAAM,SAAS,EAAE,MAAqD,CAAC;AAE9E,eAAO,MAAM,MAAM,EAAE,MAA0C,CAAC;AAChE,eAAO,MAAM,SAAS,EAAE,MAAyB,CAAC;AAElD,eAAO,MAAM,SAAS;;;;;;CASnB,CAAC;AAEJ,eAAO,MAAM,kBAAkB,EAAE,aAAa,EAI7C,CAAC;AAEF,2BAA2B;AAC3B,eAAO,MAAM,UAAU,EAAE,MAAoB,CAAC;AAE9C,eAAO,MAAM,YAAY,EAAE;IACzB,CAAC,K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A;CAMxB,CAAC;AAEF,eAAO,MAAM,sBAAsB,QAAQ,CAAC;AAC5C,eAAO,MAAM,kCAAkC,gCAAgC,CAAC"}
@@ -62,4 +62,5 @@ export const GapOriginals = {
62
62
  [NOTATION.BILN]: '',
63
63
  };
64
64
  export const MONOMER_MOTIF_SPLITTER = ' , ';
65
+ export const NOTATION_PROVIDER_CONSTRUCTOR_ROLE = 'notationProviderConstructor';
65
66
  //# sourceMappingURL=consts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"consts.js","sourceRoot":"","sources":["consts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,SAAS,CAAC;AAEtC,0EAA0E;AAC1E,MAAM,CAAN,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,2BAAe,CAAA;IACf,mCAAuB,CAAA;IACvB,yBAAa,CAAA;IACb,+BAA+B,CAAC,6BAAiB,CAAA;IACjD,+BAA+B,CAAC,yBAAa,CAAA;AAC/C,CAAC,EANW,QAAQ,KAAR,QAAQ,QAMnB;AAOD,MAAM,CAAN,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,uBAAW,CAAA;IACX,uBAAW,CAAA;IACX,qBAAS,CAAA;IACT,cAAc;IACd,qBAAS,CAAA;AACX,CAAC,EANW,QAAQ,KAAR,QAAQ,QAMnB;AAED,MAAM,CAAN,IAAY,IAaX;AAbD,WAAY,IAAI;IACd,2BAAmB,CAAA;IACnB,6BAAqB,CAAA;IACrB,sCAA8B,CAAA;IAC9B,oDAA4C,CAAA;IAC5C,+BAAuB,CAAA;IACvB,8CAAsC,CAAA;IACtC,wCAAgC,CAAA;IAChC,0CAAkC,CAAA;IAClC,4BAAoB,CAAA;IACpB,wCAAgC,CAAA;IAChC,8CAAsC,CAAA;IACtC,wDAAgD,CAAA;AAClD,CAAC,EAbW,IAAI,KAAJ,IAAI,QAaf;AAED,OAAO,EAAC,IAAI,IAAI,OAAO,EAAC,CAAC;AAEzB,MAAM,CAAC,MAAM,i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QAAQ,CAAC,SAAS,CAAC,EAAE,EAAE;IACxB,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,GAAG;IACpB,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE;CACpB,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,CAAC;AAC5C,MAAM,CAAC,MAAM,kCAAkC,GAAG,6BAA6B,CAAC"}
@@ -44,6 +44,15 @@ export interface INotationProvider {
44
44
  getHelm(seq: string, options: any): string;
45
45
  createCellRendererBack(gridCol: DG.GridColumn | null, tableCol: DG.Column<string>): CellRendererBackBase<string>;
46
46
  }
47
+ export declare abstract class NotationProviderBase {
48
+ /** Name of the custom notation */
49
+ static get notationName(): string;
50
+ /** flag to let bio know if this provider implements method for converting helm to it */
51
+ static get implementsFromHelm(): boolean;
52
+ /** Method for converting HELM to this notation */
53
+ static convertFromHelm(helm: string, options: any): string;
54
+ static getProviderConstructors(): Promise<typeof NotationProviderBase[]>;
55
+ }
47
56
  export type SeqColStats = {
48
57
  freq: MonomerFreqs;
49
58
  sameLength: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAEtC,OAAO,EAAC,oBAAoB,EAAC,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAE7C,MAAM,MAAM,eAAe,GAAG,SAAS,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;AAEnE,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,WAAW,CAAC;IACtB,QAAQ,EAAE,WAAW,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa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,oBAAoB,CAAC,MAAM,CAAC,CAAC;CAClH;AAED,8BAAsB,oBAAoB;IACxC,kCAAkC;IAClC,MAAM,KAAK,YAAY,IAAI,MAAM,CAEhC;IAED,wFAAwF;IACxF,MAAM,KAAK,kBAAkB,IAAI,OAAO,CAEvC;IAED,kDAAkD;IAClD,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,GAAG,MAAM;WAI7C,uBAAuB,IAAI,OAAO,CAAC,OAAO,oBAAoB,EAAE,CAAC;CAI/E;AAED,MAAM,MAAM,WAAW,GAAG;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAE,CAAA;AACrE,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,YAAY,CAAC;AACzD,MAAM,MAAM,YAAY,GAAG;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAEnD,8BAA8B;AAC9B,qBAAa,aAAa;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;gBAEH,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM;CAKhE;AAED,yCAAyC;AACzC,qBAAa,gBAAiB,SAAQ,aAAa;IACjD,IAAI,EAAE,YAAY,CAAC;IACnB,4BAA4B;IAC5B,UAAU,EAAE,MAAM,CAAC;gBAEP,SAAS,EAAE,aAAa,EAAE,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM;CAK7E"}
@@ -1,3 +1,26 @@
1
+ import * as DG from 'datagrok-api/dg';
2
+ import { NOTATION_PROVIDER_CONSTRUCTOR_ROLE } from './consts';
3
+ export class NotationProviderBase {
4
+ /** Name of the custom notation */
5
+ static get notationName() {
6
+ return 'Custom';
7
+ }
8
+ ;
9
+ /** flag to let bio know if this provider implements method for converting helm to it */
10
+ static get implementsFromHelm() {
11
+ return false;
12
+ }
13
+ ;
14
+ /** Method for converting HELM to this notation */
15
+ static convertFromHelm(helm, options) {
16
+ throw new Error(`Method convertFromHelm not implemented for this notation provider`);
17
+ }
18
+ ;
19
+ static async getProviderConstructors() {
20
+ const constFuncs = DG.Func.find({ meta: { role: NOTATION_PROVIDER_CONSTRUCTOR_ROLE } });
21
+ return Promise.all(constFuncs.map((f) => f.apply({})));
22
+ }
23
+ }
1
24
  /** Alphabet candidate type */
2
25
  export class CandidateType {
3
26
  constructor(name, alphabet, cutoff) {
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AA0EA,8BAA8B;AAC9B,MAAM,OAAO,aAAa;IAKxB,YAAY,IAAY,EAAE,QAAqB,EAAE,MAAc;QAC7D,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF;AAED,yCAAyC;AACzC,MAAM,OAAO,gBAAiB,SAAQ,aAAa;IAKjD,YAAY,SAAwB,EAAE,IAAkB,EAAE,UAAkB;QAC1E,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,QAAQ,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;QAC5D,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;CACF"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAKtC,OAAO,EAAC,kCAAkC,EAAC,MAAM,UAAU,CAAC;AAgE5D,MAAM,OAAgB,oBAAoB;IACxC,kCAAkC;IAClC,MAAM,KAAK,YAAY;QACrB,O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