@datagrok/curves 1.10.12 → 1.10.13

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.
Files changed (48) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/dist/package-test.js +470 -4270
  3. package/dist/package-test.js.map +1 -1
  4. package/dist/package.js +254 -3895
  5. package/dist/package.js.map +1 -1
  6. package/package.json +4 -4
  7. package/src/fit/fit-demo.ts +1 -1
  8. package/src/fit/fit-grid-cell-handler.ts +385 -385
  9. package/src/fit/fit-inspection.ts +39 -0
  10. package/src/fit/fit-renderer.ts +1 -8
  11. package/src/fit/multi-curve-viewer.ts +1 -3
  12. package/src/fit/render-utils.ts +4 -2
  13. package/src/package-api.ts +2 -125
  14. package/src/package-test.ts +2 -3
  15. package/src/package.g.ts +0 -82
  16. package/src/package.ts +21 -128
  17. package/src/tests/curves-cell-renderer-tests.ts +15 -15
  18. package/src/tests/detector-tests.ts +1 -1
  19. package/src/tests/transform-tests.ts +1 -1
  20. package/test-console-output-1.log +22 -242
  21. package/test-record-1.mp4 +0 -0
  22. package/databases/plates/0000_init.sql +0 -167
  23. package/queries/plates-crud.sql +0 -148
  24. package/src/fit/const.ts +0 -73
  25. package/src/plate/excel-plates.ts +0 -112
  26. package/src/plate/plate-cell-renderer.ts +0 -50
  27. package/src/plate/plate-drc-analysis.ts +0 -262
  28. package/src/plate/plate-reader.ts +0 -28
  29. package/src/plate/plate-well-validators.ts +0 -41
  30. package/src/plate/plate-widget.ts +0 -242
  31. package/src/plate/plate.ts +0 -557
  32. package/src/plate/plates-folder-preview.ts +0 -63
  33. package/src/plate/readers/bmg-pherastar-96.ts +0 -42
  34. package/src/plate/readers/delfia-envision-96-max-rlu.ts +0 -16
  35. package/src/plate/readers/delfia-envision-by-row.ts +0 -18
  36. package/src/plate/readers/spectramax.ts +0 -42
  37. package/src/plate/utils.ts +0 -141
  38. package/src/plates/numeric_matcher.ts +0 -191
  39. package/src/plates/objects/plate-template-handler.ts +0 -48
  40. package/src/plates/plates-app.ts +0 -64
  41. package/src/plates/plates-crud.ts +0 -502
  42. package/src/plates/plates-demo.ts +0 -107
  43. package/src/plates/plates.sql +0 -169
  44. package/src/plates/views/plates-create-view.ts +0 -123
  45. package/src/plates/views/plates-schema-view.ts +0 -58
  46. package/src/plates/views/plates-search-view.ts +0 -137
  47. package/src/plates/views/plates-templates-view.ts +0 -37
  48. package/src/tests/plate-tests.ts +0 -153
@@ -1,153 +0,0 @@
1
- /* eslint-disable max-len */
2
- import * as DG from 'datagrok-api/dg';
3
- import * as ui from 'datagrok-api/ui';
4
-
5
- import {category, expect, test} from '@datagrok-libraries/utils/src/test';
6
- import {Plate} from '../plate/plate';
7
-
8
- // @ts-ignore
9
- import * as jStat from 'jstat';
10
- import {excelToNum, numToExcel} from '../plate/utils';
11
- import {PlateWidget} from '../plate/plate-widget';
12
-
13
-
14
- function getPlate(): Plate {
15
- const concentration = Plate.fromCsvTable(concentrationCsv, 'concentration');
16
- const layout = Plate.fromCsvTable(layoutCsv, 'role');
17
- const readout = Plate.fromCsvTable(readoutCsv, 'readout');
18
-
19
- return Plate.fromPlates([concentration, layout, readout]);
20
- }
21
-
22
- category('plates', () => {
23
- test('fromCsvPlate', async () => {
24
- const plate = Plate.fromCsv(concentrationCsv, {field: 'concentration'});
25
- plate.print();
26
- expect(plate.rows, 16);
27
- expect(plate.cols, 24);
28
- });
29
-
30
- test('mergePlates', async () => {
31
- const concentration = Plate.fromCsvTable(concentrationCsv, 'concentration');
32
- const layout = Plate.fromCsvTable(layoutCsv, 'role');
33
- const readout = Plate.fromCsvTable(readoutCsv, 'value');
34
-
35
- readout.merge(layout).merge(concentration).print();
36
- });
37
-
38
- test('fromFile', async () => {
39
- const concentration = await Plate.fromCsvTableFile('System:DemoFiles/hts/plate/concentration.csv', 'concentration');
40
- const layout = await Plate.fromCsvTableFile('System:DemoFiles/hts/plate/layout.csv', 'role');
41
- const readout = await Plate.fromCsvTableFile('System:DemoFiles/hts/plate/readout.csv', 'value');
42
-
43
- Plate.fromPlates([concentration, layout, readout]).print();
44
- });
45
-
46
- test('fromExcel', async () => {
47
- const plate = await Plate.fromExcelPath('System:DemoFiles/hts/xlsx_plates/plate1.xlsx');
48
- ui.dialog({title: 'Inspect plate'})
49
- .add(PlateWidget.detailedView(plate).root)
50
- .show({width: 500, height: 500});
51
- await DG.delay(10000);
52
- });
53
-
54
- test('normalization', async () => {
55
- const plate = getPlate();
56
-
57
- const hcMean = jStat.mean(plate.fieldValues('readout', {match: {'layout': 'High Control'}}));
58
- const lcMean = jStat.mean(plate.fieldValues('readout', {match: {'layout': 'Low Control'}}));
59
- plate.normalize('readout', (value) => (hcMean - value) / (hcMean - lcMean));
60
- });
61
-
62
- test('use case', async () => {
63
- const plate = getPlate();
64
-
65
- const hcMean = jStat.mean(plate.fieldValues('readout', {match: {'layout': 'High Control'}}));
66
- const lcMean = jStat.mean(plate.fieldValues('readout', {match: {'layout': 'Low Control'}}));
67
- plate.normalize('readout', (value) => (hcMean - value) / (hcMean - lcMean));
68
-
69
- const drc = plate.doseResponseSeries({concentration: 'concentration', value: 'readout'}); // if we get
70
- Plate.inspectSeries(drc['Compound 1'], '4pl-regression');
71
- });
72
-
73
- test('render', async () => {
74
- const plate = getPlate();
75
- ui.dialog({title: 'Inspect plate'})
76
- .add(PlateWidget.detailedView(plate).root)
77
- .show({width: 500, height: 500});
78
- await DG.delay(10000);
79
- });
80
-
81
- test('numToExcel', async () => {
82
- expect(numToExcel(0), 'A');
83
- expect(numToExcel(1), 'B');
84
- expect(numToExcel(26), 'AA');
85
- expect(numToExcel(52), 'BA');
86
- });
87
-
88
- test('excelToNum', async () => {
89
- expect(excelToNum('A'), 0);
90
- expect(excelToNum('B'), 1);
91
- expect(excelToNum('Z'), 25);
92
-
93
- expect(excelToNum('AA'), 26);
94
- expect(excelToNum('BA'), 52);
95
- });
96
- });
97
-
98
-
99
- const concentrationCsv = `col 1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24
100
- A,,,,,,,,,,,,,,,,,,,,,,,,
101
- B,,0.00001,0.00001,0.00000403,0.00000163,0.000000656,0.000000265,0.000000107,0.0000000431,0.0000000174,0.00000000701,0.00000000183,0.00001,0.00000403,0.00000163,0.000000656,0.000000265,0.000000107,0.0000000431,0.0000000174,0.00000000701,0.00000000183,0.00001,
102
- C,,0.00000,0.00001,0.00000403,0.00000163,0.000000656,0.000000265,0.000000107,0.0000000431,0.0000000174,0.00000000701,0.00000000183,0.00001,0.00000403,0.00000163,0.000000656,0.000000265,0.000000107,0.0000000431,0.0000000174,0.00000000701,0.00000000183,0.00000,
103
- D,,0.00001,0.00001,0.00000403,0.00000163,0.000000656,0.000000265,0.000000107,0.0000000431,0.0000000174,0.00000000701,0.00000000183,0.00001,0.00000403,0.00000163,0.000000656,0.000000265,0.000000107,0.0000000431,0.0000000174,0.00000000701,0.00000000183,0.00001,
104
- E,,0.00000,0.00001,0.00000403,0.00000163,0.000000656,0.000000265,0.000000107,0.0000000431,0.0000000174,0.00000000701,0.00000000183,0.00001,0.00000403,0.00000163,0.000000656,0.000000265,0.000000107,0.0000000431,0.0000000174,0.00000000701,0.00000000183,0.00000,
105
- F,,0.00001,0.00001,0.00000403,0.00000163,0.000000656,0.000000265,0.000000107,0.0000000431,0.0000000174,0.00000000701,0.00000000183,0.00001,0.00000403,0.00000163,0.000000656,0.000000265,0.000000107,0.0000000431,0.0000000174,0.00000000701,0.00000000183,0.00001,
106
- G,,0.00000,0.00001,0.00000403,0.00000163,0.000000656,0.000000265,0.000000107,0.0000000431,0.0000000174,0.00000000701,0.00000000183,0.00001,0.00000403,0.00000163,0.000000656,0.000000265,0.000000107,0.0000000431,0.0000000174,0.00000000701,0.00000000183,0.00000,
107
- H,,0.00001,0.00001,0.00000403,0.00000163,0.000000656,0.000000265,0.000000107,0.0000000431,0.0000000174,0.00000000701,0.00000000183,0.00001,0.00000403,0.00000163,0.000000656,0.000000265,0.000000107,0.0000000431,0.0000000174,0.00000000701,0.00000000183,0.00001,
108
- I,,0.00000,0.00001,0.00000403,0.00000163,0.000000656,0.000000265,0.000000107,0.0000000431,0.0000000174,0.00000000701,0.00000000183,0.00001,0.00000403,0.00000163,0.000000656,0.000000265,0.000000107,0.0000000431,0.0000000174,0.00000000701,0.00000000183,0.00000,
109
- J,,0.00001,0.00001,0.00000403,0.00000163,0.000000656,0.000000265,0.000000107,0.0000000431,0.0000000174,0.00000000701,0.00000000183,0.00001,0.00000403,0.00000163,0.000000656,0.000000265,0.000000107,0.0000000431,0.0000000174,0.00000000701,0.00000000183,0.00001,
110
- K,,0.00000,0.00001,0.00000403,0.00000163,0.000000656,0.000000265,0.000000107,0.0000000431,0.0000000174,0.00000000701,0.00000000183,0.00001,0.00000403,0.00000163,0.000000656,0.000000265,0.000000107,0.0000000431,0.0000000174,0.00000000701,0.00000000183,0.00000,
111
- L,,0.00001,0.00001,0.00000403,0.00000163,0.000000656,0.000000265,0.000000107,0.0000000431,0.0000000174,0.00000000701,0.00000000183,0.00001,0.00000403,0.00000163,0.000000656,0.000000265,0.000000107,0.0000000431,0.0000000174,0.00000000701,0.00000000183,0.00001,
112
- M,,0.00000,0.00001,0.00000403,0.00000163,0.000000656,0.000000265,0.000000107,0.0000000431,0.0000000174,0.00000000701,0.00000000183,0.00001,0.00000403,0.00000163,0.000000656,0.000000265,0.000000107,0.0000000431,0.0000000174,0.00000000701,0.00000000183,0.00000,
113
- N,,0.00001,0.00001,0.00000403,0.00000163,0.000000656,0.000000265,0.000000107,0.0000000431,0.0000000174,0.00000000701,0.00000000183,0.00001,0.00000403,0.00000163,0.000000656,0.000000265,0.000000107,0.0000000431,0.0000000174,0.00000000701,0.00000000183,0.00001,
114
- O,,0.00000,0.00001,0.00000403,0.00000163,0.000000656,0.000000265,0.000000107,0.0000000431,0.0000000174,0.00000000701,0.00000000183,0.00001,0.00000403,0.00000163,0.000000656,0.000000265,0.000000107,0.0000000431,0.0000000174,0.00000000701,0.00000000183,0.00000,
115
- P,,,,,,,,,,,,,,,,,,,,,,,,`;
116
-
117
-
118
- const layoutCsv = `col 1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24
119
- A,,,,,,,,,,,,,,,,,,,,,,,,
120
- B,,Low Control,Compound 1,Compound 1,Compound 1,Compound 1,Compound 1,Compound 1,Compound 1,Compound 1,Compound 1,Compound 1,Compound 41,Compound 41,Compound 41,Compound 41,Compound 41,Compound 41,Compound 41,Compound 41,Compound 41,Compound 41,Low Control,
121
- C,,High Control,Compound 1,Compound 1,Compound 1,Compound 1,Compound 1,Compound 1,Compound 1,Compound 1,Compound 1,Compound 1,Compound 41,Compound 41,Compound 41,Compound 41,Compound 41,Compound 41,Compound 41,Compound 41,Compound 41,Compound 41,High Control,
122
- D,,Low Control,Compound 42,Compound 42,Compound 42,Compound 42,Compound 42,Compound 42,Compound 42,Compound 42,Compound 42,Compound 42,Compound 43,Compound 43,Compound 43,Compound 43,Compound 43,Compound 43,Compound 43,Compound 43,Compound 43,Compound 43,Low Control,
123
- E,,High Control,Compound 42,Compound 42,Compound 42,Compound 42,Compound 42,Compound 42,Compound 42,Compound 42,Compound 42,Compound 42,Compound 43,Compound 43,Compound 43,Compound 43,Compound 43,Compound 43,Compound 43,Compound 43,Compound 43,Compound 43,High Control,
124
- F,,Low Control,Compound 44,Compound 44,Compound 44,Compound 44,Compound 44,Compound 44,Compound 44,Compound 44,Compound 44,Compound 44,Compound 45,Compound 45,Compound 45,Compound 45,Compound 45,Compound 45,Compound 45,Compound 45,Compound 45,Compound 45,Low Control,
125
- G,,High Control,Compound 44,Compound 44,Compound 44,Compound 44,Compound 44,Compound 44,Compound 44,Compound 44,Compound 44,Compound 44,Compound 45,Compound 45,Compound 45,Compound 45,Compound 45,Compound 45,Compound 45,Compound 45,Compound 45,Compound 45,High Control,
126
- H,,Low Control,Compound 46,Compound 46,Compound 46,Compound 46,Compound 46,Compound 46,Compound 46,Compound 46,Compound 46,Compound 46,Compound 47,Compound 47,Compound 47,Compound 47,Compound 47,Compound 47,Compound 47,Compound 47,Compound 47,Compound 47,Low Control,
127
- I,,High Control,Compound 46,Compound 46,Compound 46,Compound 46,Compound 46,Compound 46,Compound 46,Compound 46,Compound 46,Compound 46,Compound 47,Compound 47,Compound 47,Compound 47,Compound 47,Compound 47,Compound 47,Compound 47,Compound 47,Compound 47,High Control,
128
- J,,Low Control,Compound 48,Compound 48,Compound 48,Compound 48,Compound 48,Compound 48,Compound 48,Compound 48,Compound 48,Compound 48,Compound 49,Compound 49,Compound 49,Compound 49,Compound 49,Compound 49,Compound 49,Compound 49,Compound 49,Compound 49,Low Control,
129
- K,,High Control,Compound 48,Compound 48,Compound 48,Compound 48,Compound 48,Compound 48,Compound 48,Compound 48,Compound 48,Compound 48,Compound 49,Compound 49,Compound 49,Compound 49,Compound 49,Compound 49,Compound 49,Compound 49,Compound 49,Compound 49,High Control,
130
- L,,Low Control,Compound 50,Compound 50,Compound 50,Compound 50,Compound 50,Compound 50,Compound 50,Compound 50,Compound 50,Compound 50,Compound 51,Compound 51,Compound 51,Compound 51,Compound 51,Compound 51,Compound 51,Compound 51,Compound 51,Compound 51,Low Control,
131
- M,,High Control,Compound 50,Compound 50,Compound 50,Compound 50,Compound 50,Compound 50,Compound 50,Compound 50,Compound 50,Compound 50,Compound 51,Compound 51,Compound 51,Compound 51,Compound 51,Compound 51,Compound 51,Compound 51,Compound 51,Compound 51,High Control,
132
- N,,Low Control,Compound 52,Compound 52,Compound 52,Compound 52,Compound 52,Compound 52,Compound 52,Compound 52,Compound 52,Compound 52,Compound 53,Compound 53,Compound 53,Compound 53,Compound 53,Compound 53,Compound 53,Compound 53,Compound 53,Compound 53,Low Control,
133
- O,,High Control,Compound 52,Compound 52,Compound 52,Compound 52,Compound 52,Compound 52,Compound 52,Compound 52,Compound 52,Compound 52,Compound 53,Compound 53,Compound 53,Compound 53,Compound 53,Compound 53,Compound 53,Compound 53,Compound 53,Compound 53,High Control,
134
- P,,,,,,,,,,,,,,,,,,,,,,,,`;
135
-
136
-
137
- const readoutCsv = `col 1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24
138
- A,,,,,,,,,,,,,,,,,,,,,,,,
139
- B,,0.07219099668,0.06947737465,0.07019976172,0.07263956168,0.07334269904,0.07654089128,0.07628940202,0.08834969214,0.13557287840,0.1486864679,0.1503697113,0.15200083420,0.15061775480,0.15309907440,0.15286653780,0.15379914010,0.15155727890,0.15232794460,0.15298766400,0.1538730651,0.1542393465,0.15071555580,
140
- C,,0.14996855360,0.07212290660,0.06957076093,0.07069321642,0.07227733865,0.07664359412,0.07918610560,0.07808503586,0.12496495030,0.1378908893,0.1465698921,0.15578283900,0.15186884230,0.15151635070,0.15141401530,0.15052587190,0.15486747600,0.15294037650,0.15241116130,0.1546532344,0.1537365814,0.07231605295,
141
- D,,0.07023863668,0.07030474895,0.07086594623,0.07378772619,0.07813099195,0.08443275691,0.10024937710,0.11821695280,0.14031173800,0.1505845411,0.1505987702,0.07099481653,0.07322787956,0.07588648236,0.08377558210,0.09888790085,0.11395358370,0.12947949180,0.14055841590,0.1493699333,0.1540055735,0.15226875140,
142
- E,,0.14929130930,0.06932695867,0.07157716491,0.07214187679,0.07721194315,0.08504549754,0.10174360480,0.11748417490,0.13321393730,0.1456650512,0.1483001297,0.07167267085,0.07383087952,0.07670410142,0.08204578635,0.09386326869,0.11296832520,0.30900000000,0.13807843210,0.1487301787,0.1519785410,0.07219836243,
143
- F,,0.07063914398,0.07039007372,0.07078597316,0.07132027961,0.07222210814,0.07442561862,0.08135627908,0.09196745273,0.11146019360,0.1364485205,0.1450632971,0.08126099235,0.09318398047,0.10961914380,0.12860206080,0.14110717340,0.14655533300,0.15212245890,0.15233422070,0.1521740437,0.1539843278,0.15514745160,
144
- G,,0.15147635060,0.07238581078,0.06968522213,0.07128524617,0.07252406181,0.07567350355,0.07943235275,0.09117074615,0.10537654310,0.1344820888,0.1400224330,0.08242500433,0.09563371204,0.10936069820,0.12848949680,0.14108995770,0.14405660970,0.15031406210,0.15131600980,0.1522018720,0.1534152011,0.07219962790,
145
- H,,0.07201551934,0.14139074650,0.10970399700,0.14927003800,0.15153471030,0.15239784500,0.15275285200,0.15300022370,0.15204696770,0.1499048651,0.1522479639,0.08013306126,0.08511773454,0.09873312909,0.11965236570,0.13423325770,0.14790643020,0.14787378410,0.15121033310,0.1516832849,0.1546688514,0.15391338010,
146
- I,,0.15106747120,0.14298828240,0.14478508750,0.14400005770,0.12812788070,0.15020659840,0.15070640480,0.14981230230,0.15107167610,0.1525554191,0.1492535524,0.08018720930,0.08601155699,0.09880353225,0.11672648890,0.13325225690,0.14354164670,0.14463708830,0.15318329890,0.1521327032,0.1512182552,0.07244861048,
147
- J,,0.07134151692,0.07106139536,0.07290563639,0.07320964199,0.07531163459,0.08077714646,0.08726929940,0.10068593880,0.11914215450,0.1418191958,0.1443463920,0.07247201272,0.06999750950,0.07076991276,0.07228675508,0.07237591892,0.07201251723,0.07741640477,0.08773368972,0.1219768071,0.1387552698,0.15192226570,
148
- K,,0.15000436380,0.07156625599,0.07087075250,0.07123659002,0.07345421874,0.07832545577,0.08734304748,0.09985159477,0.11591447310,0.1397237122,0.1459823861,0.07214517236,0.07005683091,0.07016838344,0.07131776580,0.07200174821,0.07350492337,0.07785311421,0.08866229169,0.1234911377,0.1371697196,0.07064796366,
149
- L,,0.07054096934,0.07004726921,0.07201825002,0.07179815990,0.07268889103,0.07379454514,0.07427085340,0.07982570255,0.08854676858,0.1198873673,0.1322562498,0.07034679393,0.07523627163,0.07582258339,0.08392782907,0.09669262374,0.11261560310,0.12874291890,0.14171585180,0.1491004443,0.1502214336,0.15198125010,
150
- M,,0.15232172270,0.07166689716,0.07099964730,0.07172948942,0.07140356089,0.07359647053,0.07391627346,0.07872536050,0.08793247921,0.1177668597,0.1316288144,0.06733039177,0.07260462946,0.07516068933,0.08359475310,0.09611904399,0.11364151330,0.12772328380,0.14070692820,0.1486696188,0.1541842928,0.07174453270,
151
- N,,0.07126884935,0.07332587669,0.07786873273,0.08482253378,0.10140499840,0.11854947500,0.13401382360,0.14613488070,0.15066237370,0.1545757395,0.1510962397,0.07286614211,0.07215169457,0.07227939024,0.07337505876,0.07530546981,0.08265249465,0.09167518260,0.11122719660,0.1391977320,0.1459690588,0.15291802550,
152
- O,,0.15243482930,0.07280165939,0.07688708790,0.31500000000,0.09886803400,0.11454911710,0.12960429510,0.14047477320,0.14718270040,0.1509524590,0.1501338551,0.07212897291,0.07072700474,0.07059273173,0.07088234657,0.07421414395,0.08105493058,0.09094554089,0.10660934950,0.1358113503,0.1432621746,0.07009305748,
153
- P,,,,,,,,,,,,,,,,,,,,,,,,`;