@datagrok/curves 1.12.1 → 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/dist/package.js CHANGED
@@ -7872,7 +7872,15 @@ function parseCellValue(cellValue, column) {
7872
7872
  if (!cellValue || cellValue === '')
7873
7873
  return { series: [] };
7874
7874
  const jsonStr = column ? convertCellValue(cellValue, column) : cellValue;
7875
- return (_a = JSON.parse(jsonStr !== null && jsonStr !== void 0 ? jsonStr : '{}')) !== null && _a !== void 0 ? _a : {};
7875
+ try {
7876
+ return (_a = JSON.parse(jsonStr !== null && jsonStr !== void 0 ? jsonStr : '{}')) !== null && _a !== void 0 ? _a : {};
7877
+ }
7878
+ catch (_e) {
7879
+ // Cell value is not valid fit JSON (e.g. a column mis-detected as 'fit' via a substring match).
7880
+ // Degrade to an empty chart so the renderer hits the existing 'No series to show' path and draws the
7881
+ // incorrect-fit marker, instead of throwing a SyntaxError on every grid redraw.
7882
+ return { series: [] };
7883
+ }
7876
7884
  }
7877
7885
  /** Returns true if the column uses a non-native format (has a converter). */
7878
7886
  function hasConverter(column) {
@@ -10753,15 +10761,17 @@ function _initCurves() {
10753
10761
  yield _package__WEBPACK_IMPORTED_MODULE_0__.PackageFunctions._initCurves();
10754
10762
  });
10755
10763
  }
10764
+ //name: Fit Dose-Response Curves
10765
+ //description: Group well-level assay data by compound, assay, target, and run, then fit a dose-response curve per group.
10756
10766
  //input: dataframe df
10757
- //input: column concentrationCol
10758
- //input: column readoutCol
10759
- //input: column batchIDCol
10760
- //input: column assayCol
10761
- //input: column runIDCol
10762
- //input: column compoundIDCol
10763
- //input: column targetEntityCol
10764
- //input: column excludeOutliersCol { nullable: true }
10767
+ //input: column concentrationCol { description: Concentration (dose) column }
10768
+ //input: column readoutCol { description: Readout (response) column }
10769
+ //input: column batchIDCol { description: Batch identifier column }
10770
+ //input: column assayCol { description: Assay name column }
10771
+ //input: column runIDCol { description: Run identifier column }
10772
+ //input: column compoundIDCol { description: Compound identifier column }
10773
+ //input: column targetEntityCol { description: Target entity column }
10774
+ //input: column excludeOutliersCol { nullable: true; description: Boolean column marking points to exclude as outliers }
10765
10775
  //input: dataframe parentTable { nullable: true }
10766
10776
  //input: list<string> fitParamColumns { nullable: true }
10767
10777
  //input: string reportedIC50Column { nullable: true }
@@ -10785,20 +10795,24 @@ function dataToCurvesTopMenu() {
10785
10795
  return yield _package__WEBPACK_IMPORTED_MODULE_0__.PackageFunctions.dataToCurvesTopMenu();
10786
10796
  });
10787
10797
  }
10798
+ //name: Add Curve Statistic Column
10799
+ //description: Extract a fit statistic (e.g. IC50, AUC, R²) from a specific curve series into a new column.
10788
10800
  //input: dataframe table
10789
- //input: string colName
10790
- //input: string propName
10791
- //input: int seriesNumber
10801
+ //input: string colName { description: Name of the curve column to read }
10802
+ //input: string propName { description: Fit statistic to extract (e.g. IC50, AUC, R²) }
10803
+ //input: int seriesNumber { description: Zero-based index of the curve series }
10792
10804
  //output: column result
10793
10805
  //meta.vectorFunc: true
10794
10806
  //meta.role: transform
10795
10807
  function addStatisticsColumn(table, colName, propName, seriesNumber) {
10796
10808
  return _package__WEBPACK_IMPORTED_MODULE_0__.PackageFunctions.addStatisticsColumn(table, colName, propName, seriesNumber);
10797
10809
  }
10810
+ //name: Add Aggregated Curve Statistic Column
10811
+ //description: Aggregate a fit statistic across all series of a curve into a new column.
10798
10812
  //input: dataframe table
10799
- //input: string colName
10800
- //input: string propName
10801
- //input: string aggrType
10813
+ //input: string colName { description: Name of the curve column to read }
10814
+ //input: string propName { description: Fit statistic to aggregate (e.g. IC50, AUC, R²) }
10815
+ //input: string aggrType { description: Aggregation type applied across series (e.g. avg, min, max) }
10802
10816
  //output: column result
10803
10817
  //meta.vectorFunc: true
10804
10818
  //meta.role: transform
@@ -10835,7 +10849,8 @@ function previewPzfx(file) {
10835
10849
  return yield _package__WEBPACK_IMPORTED_MODULE_0__.PackageFunctions.previewPzfx(file);
10836
10850
  });
10837
10851
  }
10838
- //input: list bytes
10852
+ //description: Open a GraphPad Prism (.pzfx) file as data tables, fitting XY curve tables.
10853
+ //input: list bytes { description: Raw bytes of the .pzfx file }
10839
10854
  //output: list<dataframe> result
10840
10855
  //meta.role: fileHandler
10841
10856
  //meta.ext: pzfx
@@ -11125,8 +11140,18 @@ __decorate([
11125
11140
  __metadata("design:returntype", Promise)
11126
11141
  ], PackageFunctions, "_initCurves", null);
11127
11142
  __decorate([
11128
- datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.func(),
11129
- __param(8, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { nullable: true } })),
11143
+ datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.func({
11144
+ name: 'Fit Dose-Response Curves',
11145
+ description: 'Group well-level assay data by compound, assay, target, and run, then fit a dose-response curve per group.',
11146
+ }),
11147
+ __param(1, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { description: 'Concentration (dose) column' } })),
11148
+ __param(2, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { description: 'Readout (response) column' } })),
11149
+ __param(3, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { description: 'Batch identifier column' } })),
11150
+ __param(4, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { description: 'Assay name column' } })),
11151
+ __param(5, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { description: 'Run identifier column' } })),
11152
+ __param(6, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { description: 'Compound identifier column' } })),
11153
+ __param(7, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { description: 'Target entity column' } })),
11154
+ __param(8, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { nullable: true, description: 'Boolean column marking points to exclude as outliers' } })),
11130
11155
  __param(9, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { nullable: true } })),
11131
11156
  __param(10, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { nullable: true } })),
11132
11157
  __param(11, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { nullable: true } })),
@@ -11148,14 +11173,27 @@ __decorate([
11148
11173
  __metadata("design:returntype", Promise)
11149
11174
  ], PackageFunctions, "dataToCurvesTopMenu", null);
11150
11175
  __decorate([
11151
- datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.func({ meta: { vectorFunc: 'true', role: 'transform' } }),
11152
- __param(3, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ type: 'int' })),
11176
+ datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.func({
11177
+ name: 'Add Curve Statistic Column',
11178
+ description: 'Extract a fit statistic (e.g. IC50, AUC, R²) from a specific curve series into a new column.',
11179
+ meta: { vectorFunc: 'true', role: 'transform' },
11180
+ }),
11181
+ __param(1, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { description: 'Name of the curve column to read' } })),
11182
+ __param(2, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { description: 'Fit statistic to extract (e.g. IC50, AUC, R²)' } })),
11183
+ __param(3, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ type: 'int', options: { description: 'Zero-based index of the curve series' } })),
11153
11184
  __metadata("design:type", Function),
11154
11185
  __metadata("design:paramtypes", [datagrok_api_dg__WEBPACK_IMPORTED_MODULE_1__.DataFrame, String, String, Number]),
11155
11186
  __metadata("design:returntype", datagrok_api_dg__WEBPACK_IMPORTED_MODULE_1__.Column)
11156
11187
  ], PackageFunctions, "addStatisticsColumn", null);
11157
11188
  __decorate([
11158
- datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.func({ meta: { vectorFunc: 'true', role: 'transform' } }),
11189
+ datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.func({
11190
+ name: 'Add Aggregated Curve Statistic Column',
11191
+ description: 'Aggregate a fit statistic across all series of a curve into a new column.',
11192
+ meta: { vectorFunc: 'true', role: 'transform' },
11193
+ }),
11194
+ __param(1, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { description: 'Name of the curve column to read' } })),
11195
+ __param(2, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { description: 'Fit statistic to aggregate (e.g. IC50, AUC, R²)' } })),
11196
+ __param(3, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ options: { description: 'Aggregation type applied across series (e.g. avg, min, max)' } })),
11159
11197
  __metadata("design:type", Function),
11160
11198
  __metadata("design:paramtypes", [datagrok_api_dg__WEBPACK_IMPORTED_MODULE_1__.DataFrame, String, String, String]),
11161
11199
  __metadata("design:returntype", datagrok_api_dg__WEBPACK_IMPORTED_MODULE_1__.Column)
@@ -11185,8 +11223,11 @@ __decorate([
11185
11223
  __metadata("design:returntype", Promise)
11186
11224
  ], PackageFunctions, "previewPzfx", null);
11187
11225
  __decorate([
11188
- datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.fileHandler({ ext: 'pzfx' }),
11189
- __param(0, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ type: 'list' })),
11226
+ datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.fileHandler({
11227
+ ext: 'pzfx',
11228
+ description: 'Open a GraphPad Prism (.pzfx) file as data tables, fitting XY curve tables.',
11229
+ }),
11230
+ __param(0, datagrok_api_grok__WEBPACK_IMPORTED_MODULE_2__.decorators.param({ type: 'list', options: { description: 'Raw bytes of the .pzfx file' } })),
11190
11231
  __metadata("design:type", Function),
11191
11232
  __metadata("design:paramtypes", [Uint8Array]),
11192
11233
  __metadata("design:returntype", Array)