@datagrok/curves 1.12.0 → 1.12.2
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 +15 -0
- package/CLAUDE.md +0 -12
- package/CREDITS.md +79 -0
- package/agents/package-knowledge.yaml +29 -0
- package/dist/package-test.js +109 -23
- package/dist/package-test.js.map +1 -1
- package/dist/package.js +104 -23
- package/dist/package.js.map +1 -1
- package/files/demo/Assay_Curves.csv +44 -0
- package/files/demo/Assay_Curves.layout +981 -0
- package/package.json +4 -3
- package/src/fit/curve-converter.ts +8 -1
- package/src/fit/fit-demo.ts +13 -0
- package/src/package-api.ts +19 -12
- package/src/package.g.ts +29 -15
- package/src/package.ts +46 -10
- package/src/tests/converter-tests.ts +6 -0
- package/test-console-output-1.log +109 -50
- package/test-record-1.mp4 +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
# Curves changelog
|
|
2
2
|
|
|
3
|
+
## v.next
|
|
4
|
+
|
|
5
|
+
* GROK-20232: Fit renderer: degrade gracefully on malformed fit-cell JSON instead of throwing on every grid redraw
|
|
6
|
+
|
|
7
|
+
## 1.12.0 (2026-04-02)
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* Added PZFX (GraphPad Prism) file viewer and handler
|
|
12
|
+
* Added dynamically extendable format support
|
|
13
|
+
|
|
3
14
|
## 1.11.0 (2026-03-13)
|
|
4
15
|
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* Added editable GridCellWidget support
|
|
19
|
+
|
|
5
20
|
## 1.10.15 (2025-12-02)
|
|
6
21
|
|
|
7
22
|
* Png Renderer: Fix flickering and moved to PowerGrid
|
package/CLAUDE.md
CHANGED
|
@@ -1,23 +1,11 @@
|
|
|
1
1
|
# CLAUDE.md
|
|
2
2
|
|
|
3
|
-
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
-
|
|
5
3
|
## Overview
|
|
6
4
|
|
|
7
5
|
**Curves** (`@datagrok/curves`) is a Datagrok plugin for **fitted curves** — dose-response curves, sigmoid fits, and general curve fitting. It provides in-grid cell rendering of charts stored in various formats in cells, interactive editing (outlier toggling, property panels), automatic curve fitting, a "Data to Curves" pipeline that converts well-level assay data into fitted curve summaries, a multi-curve overlay viewer, and statistics extraction (IC50, AUC, R², etc.).
|
|
8
6
|
|
|
9
7
|
Category: **Visualizations**. Top menu: `Data | Curves | ...`.
|
|
10
8
|
|
|
11
|
-
## Build Commands
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
npm install
|
|
15
|
-
npm run build # grok api && grok check --soft && webpack
|
|
16
|
-
npm run test # grok test
|
|
17
|
-
npm run build-all # Builds js-api → utils → statistics → this package
|
|
18
|
-
npm run link-all # Links datagrok-api, @datagrok-libraries/utils, @datagrok-libraries/statistics
|
|
19
|
-
```
|
|
20
|
-
|
|
21
9
|
## Key Dependencies
|
|
22
10
|
|
|
23
11
|
- `@datagrok-libraries/statistics` — **core fitting engine**: defines `IFitChartData`, `IFitSeries`, `IFitChartOptions`, `IFitPoint`, `FitStatistics`, `FitCurve`, `FitFunction` classes, Nelder-Mead optimizer, sigmoid/linear/log-linear/exponential/4PL fit functions, confidence intervals, box-plot statistics, and `FitConstants` (tags, sizing, thresholds)
|
package/CREDITS.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Curves — Third-Party Libraries
|
|
2
|
+
|
|
3
|
+
The `@datagrok/curves` package is distributed under the MIT license that
|
|
4
|
+
covers the rest of the `public/` repository (see [`../../LICENSE.md`](../../LICENSE.md)).
|
|
5
|
+
It incorporates the open-source components listed below; this file reproduces
|
|
6
|
+
the attribution and notices required by their respective licenses.
|
|
7
|
+
|
|
8
|
+
All runtime JavaScript dependencies bundled into the published artifact are
|
|
9
|
+
under permissive licenses (MIT). No copyleft (GPL/LGPL/MPL) component is
|
|
10
|
+
bundled into the published Curves plugin.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 1. Bundled in the published artifact (`dist/`)
|
|
15
|
+
|
|
16
|
+
### jStat (1.9.x)
|
|
17
|
+
|
|
18
|
+
Statistical distributions library used for confidence-interval and goodness-of-fit
|
|
19
|
+
calculations on dose-response curves.
|
|
20
|
+
|
|
21
|
+
- Upstream: https://github.com/jstat/jstat
|
|
22
|
+
- License: **MIT**
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
Copyright (c) 2013 jStat
|
|
26
|
+
|
|
27
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
28
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
29
|
+
in the Software without restriction, including without limitation the rights
|
|
30
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
31
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
32
|
+
furnished to do so, subject to the following conditions:
|
|
33
|
+
|
|
34
|
+
The above copyright notice and this permission notice shall be included in
|
|
35
|
+
all copies or substantial portions of the Software.
|
|
36
|
+
|
|
37
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
38
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
39
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
40
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
41
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
42
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
43
|
+
THE SOFTWARE.
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
(`@types/wu` is a TypeScript-only types stub for the `wu` external — no
|
|
47
|
+
runtime code is shipped from it. `eslint`, `eslint-config-google`, and the
|
|
48
|
+
`@typescript-eslint/*` packages are listed in `dependencies` but are
|
|
49
|
+
build-time-only and produce no bundled output.)
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## 2. Linked at runtime via the Datagrok platform (webpack externals)
|
|
54
|
+
|
|
55
|
+
These libraries are not bundled into Curves's `dist/` — they are provided
|
|
56
|
+
once by the platform host and shared across all packages.
|
|
57
|
+
|
|
58
|
+
| Component | Version | License | Upstream |
|
|
59
|
+
|----------------------------------|---------|--------------|---------------------------------------------------|
|
|
60
|
+
| datagrok-api | 1.x | MIT | https://github.com/datagrok-ai/public |
|
|
61
|
+
| RxJS | 6.x | Apache-2.0 | https://github.com/ReactiveX/rxjs |
|
|
62
|
+
| cash-dom | 8.x | MIT | https://github.com/fabiospampinato/cash |
|
|
63
|
+
| Day.js | 1.x | MIT | https://github.com/iamkun/dayjs |
|
|
64
|
+
| ExcelJS | 4.x | MIT | https://github.com/exceljs/exceljs |
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## 3. Development-only dependencies
|
|
69
|
+
|
|
70
|
+
Tools used during the build/test cycle (not in the runtime tree, not bundled):
|
|
71
|
+
the `datagrok-tools` CLI transitively pulls in `puppeteer-screen-recorder`,
|
|
72
|
+
which references `@ffmpeg-installer/ffmpeg` (LGPL-2.1) and
|
|
73
|
+
`@ffmpeg-installer/win32-x64` (GPLv3). These binaries are **not** redistributed
|
|
74
|
+
as part of the published Curves plugin and impose no obligation on users of
|
|
75
|
+
the plugin.
|
|
76
|
+
|
|
77
|
+
The `scripts/calculateMSR.py` Python script depends on `statsmodels` (BSD-3-Clause)
|
|
78
|
+
and runs on the Datagrok server's managed Python environment — it is not part
|
|
79
|
+
of the JavaScript bundle.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
packageName: Curves
|
|
2
|
+
description: Dose-response curve fitting and statistics — fits 4PL/sigmoidal curves to concentration-readout data, extracts IC50/Hill/AUC/top/bottom per row, renders inline curve cells, and provides assay-plate and well-level workflows.
|
|
3
|
+
keywords:
|
|
4
|
+
- dose-response
|
|
5
|
+
- dose response
|
|
6
|
+
- curve fitting
|
|
7
|
+
- 4PL
|
|
8
|
+
- sigmoidal
|
|
9
|
+
- IC50
|
|
10
|
+
- EC50
|
|
11
|
+
- hill slope
|
|
12
|
+
- AUC
|
|
13
|
+
- intercept
|
|
14
|
+
- top
|
|
15
|
+
- bottom
|
|
16
|
+
- r-squared
|
|
17
|
+
- fit chart
|
|
18
|
+
- fit statistics
|
|
19
|
+
- assay plate
|
|
20
|
+
- assay readout
|
|
21
|
+
- well level
|
|
22
|
+
- data to curves
|
|
23
|
+
- pzfx
|
|
24
|
+
- prism
|
|
25
|
+
- 3dx
|
|
26
|
+
- compact-dr
|
|
27
|
+
- curve renderer
|
|
28
|
+
apiRef: src/package-api.ts
|
|
29
|
+
docsRef: README.md
|
package/dist/package-test.js
CHANGED
|
@@ -9475,7 +9475,15 @@ function parseCellValue(cellValue, column) {
|
|
|
9475
9475
|
if (!cellValue || cellValue === '')
|
|
9476
9476
|
return { series: [] };
|
|
9477
9477
|
const jsonStr = column ? convertCellValue(cellValue, column) : cellValue;
|
|
9478
|
-
|
|
9478
|
+
try {
|
|
9479
|
+
return (_a = JSON.parse(jsonStr !== null && jsonStr !== void 0 ? jsonStr : '{}')) !== null && _a !== void 0 ? _a : {};
|
|
9480
|
+
}
|
|
9481
|
+
catch (_e) {
|
|
9482
|
+
// Cell value is not valid fit JSON (e.g. a column mis-detected as 'fit' via a substring match).
|
|
9483
|
+
// Degrade to an empty chart so the renderer hits the existing 'No series to show' path and draws the
|
|
9484
|
+
// incorrect-fit marker, instead of throwing a SyntaxError on every grid redraw.
|
|
9485
|
+
return { series: [] };
|
|
9486
|
+
}
|
|
9479
9487
|
}
|
|
9480
9488
|
/** Returns true if the column uses a non-native format (has a converter). */
|
|
9481
9489
|
function hasConverter(column) {
|
|
@@ -10177,6 +10185,7 @@ function convertDataToCurves(df, concentrationCol, readoutCol, batchIDCol, assay
|
|
|
10177
10185
|
"use strict";
|
|
10178
10186
|
__webpack_require__.r(__webpack_exports__);
|
|
10179
10187
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10188
|
+
/* harmony export */ assayCurvesDemo: () => (/* binding */ assayCurvesDemo),
|
|
10180
10189
|
/* harmony export */ createDemoDataFrame: () => (/* binding */ createDemoDataFrame),
|
|
10181
10190
|
/* harmony export */ createSigmoidPoints: () => (/* binding */ createSigmoidPoints),
|
|
10182
10191
|
/* harmony export */ curveDemo: () => (/* binding */ curveDemo)
|
|
@@ -10293,6 +10302,20 @@ function curveDemo() {
|
|
|
10293
10302
|
// tableView.addViewer('MultiCurveViewer');
|
|
10294
10303
|
});
|
|
10295
10304
|
}
|
|
10305
|
+
function assayCurvesDemo() {
|
|
10306
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
10307
|
+
const df = yield datagrok_api_grok__WEBPACK_IMPORTED_MODULE_1__.data.loadTable(`${_package__WEBPACK_IMPORTED_MODULE_2__._package.webRoot}files/demo/Assay_Curves.csv`);
|
|
10308
|
+
yield df.meta.detectSemanticTypes();
|
|
10309
|
+
const layoutTXT = yield _package__WEBPACK_IMPORTED_MODULE_2__._package.files.readAsText('demo/Assay_Curves.layout');
|
|
10310
|
+
const layout = datagrok_api_dg__WEBPACK_IMPORTED_MODULE_0__.ViewLayout.fromJson(layoutTXT);
|
|
10311
|
+
df.selection.set(13, true);
|
|
10312
|
+
df.selection.set(14, true); // two curves for multicurve viewer
|
|
10313
|
+
const tv = datagrok_api_grok__WEBPACK_IMPORTED_MODULE_1__.shell.addTableView(df);
|
|
10314
|
+
yield datagrok_api_dg__WEBPACK_IMPORTED_MODULE_0__.delay(100);
|
|
10315
|
+
tv.loadLayout(layout, true);
|
|
10316
|
+
datagrok_api_grok__WEBPACK_IMPORTED_MODULE_1__.shell.info('Select cells in Trellis plot to see corresponding curves in Multi Curve Viewer.', { timeout: 10 });
|
|
10317
|
+
});
|
|
10318
|
+
}
|
|
10296
10319
|
|
|
10297
10320
|
|
|
10298
10321
|
/***/ },
|
|
@@ -12276,6 +12299,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12276
12299
|
/* harmony export */ _initCurves: () => (/* binding */ _initCurves),
|
|
12277
12300
|
/* harmony export */ addAggrStatisticsColumn: () => (/* binding */ addAggrStatisticsColumn),
|
|
12278
12301
|
/* harmony export */ addStatisticsColumn: () => (/* binding */ addStatisticsColumn),
|
|
12302
|
+
/* harmony export */ assayCurveFitDemo: () => (/* binding */ assayCurveFitDemo),
|
|
12279
12303
|
/* harmony export */ convertCompactDrToJsonFunc: () => (/* binding */ convertCompactDrToJsonFunc),
|
|
12280
12304
|
/* harmony export */ convertPzfxToJsonFunc: () => (/* binding */ convertPzfxToJsonFunc),
|
|
12281
12305
|
/* harmony export */ convertXmlCurveToJsonFunc: () => (/* binding */ convertXmlCurveToJsonFunc),
|
|
@@ -12326,21 +12350,31 @@ function curveFitDemo() {
|
|
|
12326
12350
|
yield _package__WEBPACK_IMPORTED_MODULE_0__.PackageFunctions.curveFitDemo();
|
|
12327
12351
|
});
|
|
12328
12352
|
}
|
|
12353
|
+
//name: Assay Curves
|
|
12354
|
+
//description: Dashboard with curves for multiple compounds, assays and targets
|
|
12355
|
+
//meta.demoPath: Curves | Assay Curves
|
|
12356
|
+
function assayCurveFitDemo() {
|
|
12357
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12358
|
+
yield _package__WEBPACK_IMPORTED_MODULE_0__.PackageFunctions.assayCurveFitDemo();
|
|
12359
|
+
});
|
|
12360
|
+
}
|
|
12329
12361
|
//meta.role: init
|
|
12330
12362
|
function _initCurves() {
|
|
12331
12363
|
return __awaiter(this, void 0, void 0, function* () {
|
|
12332
12364
|
yield _package__WEBPACK_IMPORTED_MODULE_0__.PackageFunctions._initCurves();
|
|
12333
12365
|
});
|
|
12334
12366
|
}
|
|
12367
|
+
//name: Fit Dose-Response Curves
|
|
12368
|
+
//description: Group well-level assay data by compound, assay, target, and run, then fit a dose-response curve per group.
|
|
12335
12369
|
//input: dataframe df
|
|
12336
|
-
//input: column concentrationCol
|
|
12337
|
-
//input: column readoutCol
|
|
12338
|
-
//input: column batchIDCol
|
|
12339
|
-
//input: column assayCol
|
|
12340
|
-
//input: column runIDCol
|
|
12341
|
-
//input: column compoundIDCol
|
|
12342
|
-
//input: column targetEntityCol
|
|
12343
|
-
//input: column excludeOutliersCol { nullable: true }
|
|
12370
|
+
//input: column concentrationCol { description: Concentration (dose) column }
|
|
12371
|
+
//input: column readoutCol { description: Readout (response) column }
|
|
12372
|
+
//input: column batchIDCol { description: Batch identifier column }
|
|
12373
|
+
//input: column assayCol { description: Assay name column }
|
|
12374
|
+
//input: column runIDCol { description: Run identifier column }
|
|
12375
|
+
//input: column compoundIDCol { description: Compound identifier column }
|
|
12376
|
+
//input: column targetEntityCol { description: Target entity column }
|
|
12377
|
+
//input: column excludeOutliersCol { nullable: true; description: Boolean column marking points to exclude as outliers }
|
|
12344
12378
|
//input: dataframe parentTable { nullable: true }
|
|
12345
12379
|
//input: list<string> fitParamColumns { nullable: true }
|
|
12346
12380
|
//input: string reportedIC50Column { nullable: true }
|
|
@@ -12364,20 +12398,24 @@ function dataToCurvesTopMenu() {
|
|
|
12364
12398
|
return yield _package__WEBPACK_IMPORTED_MODULE_0__.PackageFunctions.dataToCurvesTopMenu();
|
|
12365
12399
|
});
|
|
12366
12400
|
}
|
|
12401
|
+
//name: Add Curve Statistic Column
|
|
12402
|
+
//description: Extract a fit statistic (e.g. IC50, AUC, R²) from a specific curve series into a new column.
|
|
12367
12403
|
//input: dataframe table
|
|
12368
|
-
//input: string colName
|
|
12369
|
-
//input: string propName
|
|
12370
|
-
//input: int seriesNumber
|
|
12404
|
+
//input: string colName { description: Name of the curve column to read }
|
|
12405
|
+
//input: string propName { description: Fit statistic to extract (e.g. IC50, AUC, R²) }
|
|
12406
|
+
//input: int seriesNumber { description: Zero-based index of the curve series }
|
|
12371
12407
|
//output: column result
|
|
12372
12408
|
//meta.vectorFunc: true
|
|
12373
12409
|
//meta.role: transform
|
|
12374
12410
|
function addStatisticsColumn(table, colName, propName, seriesNumber) {
|
|
12375
12411
|
return _package__WEBPACK_IMPORTED_MODULE_0__.PackageFunctions.addStatisticsColumn(table, colName, propName, seriesNumber);
|
|
12376
12412
|
}
|
|
12413
|
+
//name: Add Aggregated Curve Statistic Column
|
|
12414
|
+
//description: Aggregate a fit statistic across all series of a curve into a new column.
|
|
12377
12415
|
//input: dataframe table
|
|
12378
|
-
//input: string colName
|
|
12379
|
-
//input: string propName
|
|
12380
|
-
//input: string aggrType
|
|
12416
|
+
//input: string colName { description: Name of the curve column to read }
|
|
12417
|
+
//input: string propName { description: Fit statistic to aggregate (e.g. IC50, AUC, R²) }
|
|
12418
|
+
//input: string aggrType { description: Aggregation type applied across series (e.g. avg, min, max) }
|
|
12381
12419
|
//output: column result
|
|
12382
12420
|
//meta.vectorFunc: true
|
|
12383
12421
|
//meta.role: transform
|
|
@@ -12414,7 +12452,8 @@ function previewPzfx(file) {
|
|
|
12414
12452
|
return yield _package__WEBPACK_IMPORTED_MODULE_0__.PackageFunctions.previewPzfx(file);
|
|
12415
12453
|
});
|
|
12416
12454
|
}
|
|
12417
|
-
//
|
|
12455
|
+
//description: Open a GraphPad Prism (.pzfx) file as data tables, fitting XY curve tables.
|
|
12456
|
+
//input: list bytes { description: Raw bytes of the .pzfx file }
|
|
12418
12457
|
//output: list<dataframe> result
|
|
12419
12458
|
//meta.role: fileHandler
|
|
12420
12459
|
//meta.ext: pzfx
|
|
@@ -12442,6 +12481,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12442
12481
|
/* harmony export */ _package: () => (/* binding */ _package),
|
|
12443
12482
|
/* harmony export */ addAggrStatisticsColumn: () => (/* reexport safe */ _package_g__WEBPACK_IMPORTED_MODULE_0__.addAggrStatisticsColumn),
|
|
12444
12483
|
/* harmony export */ addStatisticsColumn: () => (/* reexport safe */ _package_g__WEBPACK_IMPORTED_MODULE_0__.addStatisticsColumn),
|
|
12484
|
+
/* harmony export */ assayCurveFitDemo: () => (/* reexport safe */ _package_g__WEBPACK_IMPORTED_MODULE_0__.assayCurveFitDemo),
|
|
12445
12485
|
/* harmony export */ convertCompactDrToJsonFunc: () => (/* reexport safe */ _package_g__WEBPACK_IMPORTED_MODULE_0__.convertCompactDrToJsonFunc),
|
|
12446
12486
|
/* harmony export */ convertPzfxToJsonFunc: () => (/* reexport safe */ _package_g__WEBPACK_IMPORTED_MODULE_0__.convertPzfxToJsonFunc),
|
|
12447
12487
|
/* harmony export */ convertXmlCurveToJsonFunc: () => (/* reexport safe */ _package_g__WEBPACK_IMPORTED_MODULE_0__.convertXmlCurveToJsonFunc),
|
|
@@ -12526,6 +12566,11 @@ class PackageFunctions {
|
|
|
12526
12566
|
yield (0,_fit_fit_demo__WEBPACK_IMPORTED_MODULE_5__.curveDemo)();
|
|
12527
12567
|
});
|
|
12528
12568
|
}
|
|
12569
|
+
static assayCurveFitDemo() {
|
|
12570
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12571
|
+
yield (0,_fit_fit_demo__WEBPACK_IMPORTED_MODULE_5__.assayCurvesDemo)();
|
|
12572
|
+
});
|
|
12573
|
+
}
|
|
12529
12574
|
// @grok.decorators.func({
|
|
12530
12575
|
// name: 'Assay Plates',
|
|
12531
12576
|
// description: 'Assasy plates with concentration, layout and readout data',
|
|
@@ -12681,6 +12726,16 @@ __decorate([
|
|
|
12681
12726
|
__metadata("design:paramtypes", []),
|
|
12682
12727
|
__metadata("design:returntype", Promise)
|
|
12683
12728
|
], PackageFunctions, "curveFitDemo", null);
|
|
12729
|
+
__decorate([
|
|
12730
|
+
datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.demo({
|
|
12731
|
+
name: 'Assay Curves',
|
|
12732
|
+
description: 'Dashboard with curves for multiple compounds, assays and targets',
|
|
12733
|
+
meta: { demoPath: 'Curves | Assay Curves' },
|
|
12734
|
+
}),
|
|
12735
|
+
__metadata("design:type", Function),
|
|
12736
|
+
__metadata("design:paramtypes", []),
|
|
12737
|
+
__metadata("design:returntype", Promise)
|
|
12738
|
+
], PackageFunctions, "assayCurveFitDemo", null);
|
|
12684
12739
|
__decorate([
|
|
12685
12740
|
datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.init(),
|
|
12686
12741
|
__metadata("design:type", Function),
|
|
@@ -12688,8 +12743,18 @@ __decorate([
|
|
|
12688
12743
|
__metadata("design:returntype", Promise)
|
|
12689
12744
|
], PackageFunctions, "_initCurves", null);
|
|
12690
12745
|
__decorate([
|
|
12691
|
-
datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.func(
|
|
12692
|
-
|
|
12746
|
+
datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.func({
|
|
12747
|
+
name: 'Fit Dose-Response Curves',
|
|
12748
|
+
description: 'Group well-level assay data by compound, assay, target, and run, then fit a dose-response curve per group.',
|
|
12749
|
+
}),
|
|
12750
|
+
__param(1, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { description: 'Concentration (dose) column' } })),
|
|
12751
|
+
__param(2, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { description: 'Readout (response) column' } })),
|
|
12752
|
+
__param(3, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { description: 'Batch identifier column' } })),
|
|
12753
|
+
__param(4, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { description: 'Assay name column' } })),
|
|
12754
|
+
__param(5, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { description: 'Run identifier column' } })),
|
|
12755
|
+
__param(6, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { description: 'Compound identifier column' } })),
|
|
12756
|
+
__param(7, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { description: 'Target entity column' } })),
|
|
12757
|
+
__param(8, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { nullable: true, description: 'Boolean column marking points to exclude as outliers' } })),
|
|
12693
12758
|
__param(9, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { nullable: true } })),
|
|
12694
12759
|
__param(10, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { nullable: true } })),
|
|
12695
12760
|
__param(11, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { nullable: true } })),
|
|
@@ -12711,14 +12776,27 @@ __decorate([
|
|
|
12711
12776
|
__metadata("design:returntype", Promise)
|
|
12712
12777
|
], PackageFunctions, "dataToCurvesTopMenu", null);
|
|
12713
12778
|
__decorate([
|
|
12714
|
-
datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.func({
|
|
12715
|
-
|
|
12779
|
+
datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.func({
|
|
12780
|
+
name: 'Add Curve Statistic Column',
|
|
12781
|
+
description: 'Extract a fit statistic (e.g. IC50, AUC, R²) from a specific curve series into a new column.',
|
|
12782
|
+
meta: { vectorFunc: 'true', role: 'transform' },
|
|
12783
|
+
}),
|
|
12784
|
+
__param(1, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { description: 'Name of the curve column to read' } })),
|
|
12785
|
+
__param(2, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { description: 'Fit statistic to extract (e.g. IC50, AUC, R²)' } })),
|
|
12786
|
+
__param(3, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ type: 'int', options: { description: 'Zero-based index of the curve series' } })),
|
|
12716
12787
|
__metadata("design:type", Function),
|
|
12717
12788
|
__metadata("design:paramtypes", [datagrok_api_dg__WEBPACK_IMPORTED_MODULE_1__.DataFrame, String, String, Number]),
|
|
12718
12789
|
__metadata("design:returntype", datagrok_api_dg__WEBPACK_IMPORTED_MODULE_1__.Column)
|
|
12719
12790
|
], PackageFunctions, "addStatisticsColumn", null);
|
|
12720
12791
|
__decorate([
|
|
12721
|
-
datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.func({
|
|
12792
|
+
datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.func({
|
|
12793
|
+
name: 'Add Aggregated Curve Statistic Column',
|
|
12794
|
+
description: 'Aggregate a fit statistic across all series of a curve into a new column.',
|
|
12795
|
+
meta: { vectorFunc: 'true', role: 'transform' },
|
|
12796
|
+
}),
|
|
12797
|
+
__param(1, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { description: 'Name of the curve column to read' } })),
|
|
12798
|
+
__param(2, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { description: 'Fit statistic to aggregate (e.g. IC50, AUC, R²)' } })),
|
|
12799
|
+
__param(3, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { description: 'Aggregation type applied across series (e.g. avg, min, max)' } })),
|
|
12722
12800
|
__metadata("design:type", Function),
|
|
12723
12801
|
__metadata("design:paramtypes", [datagrok_api_dg__WEBPACK_IMPORTED_MODULE_1__.DataFrame, String, String, String]),
|
|
12724
12802
|
__metadata("design:returntype", datagrok_api_dg__WEBPACK_IMPORTED_MODULE_1__.Column)
|
|
@@ -12748,8 +12826,11 @@ __decorate([
|
|
|
12748
12826
|
__metadata("design:returntype", Promise)
|
|
12749
12827
|
], PackageFunctions, "previewPzfx", null);
|
|
12750
12828
|
__decorate([
|
|
12751
|
-
datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.fileHandler({
|
|
12752
|
-
|
|
12829
|
+
datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.fileHandler({
|
|
12830
|
+
ext: 'pzfx',
|
|
12831
|
+
description: 'Open a GraphPad Prism (.pzfx) file as data tables, fitting XY curve tables.',
|
|
12832
|
+
}),
|
|
12833
|
+
__param(0, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ type: 'list', options: { description: 'Raw bytes of the .pzfx file' } })),
|
|
12753
12834
|
__metadata("design:type", Function),
|
|
12754
12835
|
__metadata("design:paramtypes", [Uint8Array]),
|
|
12755
12836
|
__metadata("design:returntype", Array)
|
|
@@ -12947,6 +13028,11 @@ const SAMPLE_PZFX_WITH_EXCLUSION = `<?xml version="1.0" encoding="UTF-8"?>
|
|
|
12947
13028
|
const chartData = (0,_fit_curve_converter__WEBPACK_IMPORTED_MODULE_7__.parseCellValue)('', null);
|
|
12948
13029
|
(0,_datagrok_libraries_test_src_test__WEBPACK_IMPORTED_MODULE_2__.expect)(chartData.series !== undefined && chartData.series.length === 0, true);
|
|
12949
13030
|
}));
|
|
13031
|
+
(0,_datagrok_libraries_test_src_test__WEBPACK_IMPORTED_MODULE_2__.test)('parseCellValue.malformedJson', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
13032
|
+
// Unquoted-key value that passes the substring-based fit detection but is not valid JSON.
|
|
13033
|
+
const chartData = (0,_fit_curve_converter__WEBPACK_IMPORTED_MODULE_7__.parseCellValue)('{series: [{name: "A", points: [{x:0,y:50}]}]}', null);
|
|
13034
|
+
(0,_datagrok_libraries_test_src_test__WEBPACK_IMPORTED_MODULE_2__.expect)(chartData.series !== undefined && chartData.series.length === 0, true);
|
|
13035
|
+
}));
|
|
12950
13036
|
(0,_datagrok_libraries_test_src_test__WEBPACK_IMPORTED_MODULE_2__.test)('converterCaching', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
12951
13037
|
(0,_fit_curve_converter__WEBPACK_IMPORTED_MODULE_7__.registerCurveConverter)('compact-dr', _fit_converters_compact_dr_converter__WEBPACK_IMPORTED_MODULE_5__.convertCompactDrToJson);
|
|
12952
13038
|
const df = datagrok_api_dg__WEBPACK_IMPORTED_MODULE_0__.DataFrame.fromColumns([datagrok_api_dg__WEBPACK_IMPORTED_MODULE_0__.Column.fromStrings('curves', [SAMPLE_COMPACT_DR])]);
|