@datagrok/peptides 1.27.11 → 1.28.0

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 (65) hide show
  1. package/.auth.json +1 -0
  2. package/.grokignore +2 -0
  3. package/.turbo/turbo-build.log +26 -0
  4. package/.vscode/settings.json +16 -0
  5. package/CHANGELOG.md +28 -0
  6. package/CLAUDE.md +69 -5
  7. package/dist/659.js +2 -0
  8. package/dist/659.js.map +1 -0
  9. package/dist/806.js +2 -0
  10. package/dist/806.js.map +1 -0
  11. package/dist/package-test.js +396 -1
  12. package/dist/package-test.js.map +1 -1
  13. package/dist/package.js +361 -1
  14. package/dist/package.js.map +1 -1
  15. package/e2e/.auth.json +1 -0
  16. package/e2e/.auth.public.json +1 -0
  17. package/files/aligned_3.csv +6 -6
  18. package/package.json +30 -57
  19. package/rspack.config.js +3 -0
  20. package/src/demo/fasta.ts +0 -1
  21. package/src/model.ts +245 -131
  22. package/src/package-api.ts +18 -10
  23. package/src/package.g.ts +1 -0
  24. package/src/package.ts +19 -24
  25. package/src/tests/core.ts +6 -6
  26. package/src/tests/misc.ts +20 -0
  27. package/src/tests/model.ts +56 -6
  28. package/src/tests/table-view.ts +4 -4
  29. package/src/tests/utils.ts +56 -0
  30. package/src/tests/viewers.ts +270 -14
  31. package/src/tests/widgets.ts +13 -12
  32. package/src/utils/cell-renderer.ts +7 -6
  33. package/src/utils/constants.ts +10 -0
  34. package/src/utils/misc.ts +3 -3
  35. package/src/utils/statistics.ts +2 -2
  36. package/src/viewers/cluster-max-activity-viewer.ts +44 -11
  37. package/src/viewers/logo-summary.ts +126 -40
  38. package/src/viewers/mutation-cliffs-viewer.ts +56 -28
  39. package/src/viewers/peptide-generation-viewer.ts +7 -0
  40. package/src/viewers/position-statistics-viewer.ts +26 -4
  41. package/src/viewers/sar-viewer-status.ts +145 -0
  42. package/src/viewers/sar-viewer.ts +134 -42
  43. package/src/viewers/viewer-render-state.ts +68 -0
  44. package/src/widgets/distribution.ts +1 -1
  45. package/src/widgets/manual-alignment.ts +9 -22
  46. package/src/widgets/peptides.ts +101 -100
  47. package/src/widgets/selection.ts +1 -1
  48. package/src/widgets/settings.ts +11 -9
  49. package/test-playwright-report.json +73 -0
  50. package/test-report-playwright.csv +2 -0
  51. package/tsconfig.json +15 -69
  52. package/.eslintrc.json +0 -53
  53. package/dist/216.js +0 -2
  54. package/dist/216.js.map +0 -1
  55. package/dist/682.js +0 -2
  56. package/dist/682.js.map +0 -1
  57. package/dist/705.js +0 -2
  58. package/dist/705.js.map +0 -1
  59. package/dist/774.js +0 -2
  60. package/dist/774.js.map +0 -1
  61. package/dist/8473fcbfb6e85ca6c852.wasm +0 -0
  62. package/test-console-output-1.log +0 -661
  63. package/test-record-1.mp4 +0 -0
  64. package/webpack.config.js +0 -60
  65. /package/dist/{9a8fbf37666e32487835.wasm → wasmDbscan.wasm} +0 -0
@@ -1,11 +1,9 @@
1
1
  import * as ui from 'datagrok-api/ui';
2
- import * as grok from 'datagrok-api/grok';
3
2
  import * as DG from 'datagrok-api/dg';
4
3
 
5
4
  import $ from 'cash-dom';
6
5
  import '../styles.css';
7
6
  import {PeptidesModel} from '../model';
8
- import {PeptideUtils} from '../peptideUtils';
9
7
 
10
8
  /**
11
9
  * Allows to edit sequence and apply changes to the table and analysis.
@@ -14,33 +12,22 @@ import {PeptideUtils} from '../peptideUtils';
14
12
  * @return Widget for manual sequence alignment
15
13
  */
16
14
  export function manualAlignmentWidget(alignedSequenceCol: DG.Column<string>, currentDf: DG.DataFrame): DG.Widget {
17
- const sequenceInput = ui.input.textArea('', {value: alignedSequenceCol.get(currentDf.currentRowIdx)!});
15
+ const rowIndex = currentDf.currentRowIdx;
16
+ const columnName = currentDf.currentCol?.name;
17
+ const sequenceInput = ui.input.textArea('Sequence', {value: alignedSequenceCol.get(rowIndex)!});
18
18
  $(sequenceInput.root).addClass('pep-textinput');
19
19
 
20
20
  const applyChangesBtn = ui.button('Apply', async () => {
21
- const sh = PeptideUtils.getSeqHelper().getSeqHandler(alignedSequenceCol);
22
- const newSequence = sequenceInput.value;
23
- const splitSequence = sh.splitter(newSequence);
24
- const affectedRowIndex = currentDf.currentRowIdx;
25
- alignedSequenceCol.set(affectedRowIndex, newSequence);
26
- for (let i = 0; i < splitSequence.length; i++) {
27
- const part = splitSequence.getOriginal(i);
28
- if (currentDf.col(i.toString()) !== null)
29
- currentDf.set(i.toString(), affectedRowIndex, part);
21
+ applyChangesBtn.disabled = true;
22
+ try {
23
+ await PeptidesModel.getInstance(currentDf).updateSequence(rowIndex, sequenceInput.value, columnName);
24
+ } finally {
25
+ applyChangesBtn.disabled = false;
30
26
  }
31
- const temp = grok.shell.o;
32
- grok.shell.o = null;
33
-
34
- const peptidesController = PeptidesModel.getInstance(currentDf);
35
- peptidesController.updateGrid();
36
-
37
- setTimeout(() => {
38
- grok.shell.o = temp;
39
- }, 100);
40
27
  }, 'Apply changes');
41
28
 
42
29
  const resetBtn = ui.button(ui.iconFA('redo'),
43
- () => sequenceInput.value = alignedSequenceCol.get(currentDf.currentRowIdx)!, 'Reset');
30
+ () => sequenceInput.value = alignedSequenceCol.get(rowIndex)!, 'Reset');
44
31
  $(resetBtn).addClass('pep-snippet-editor-icon pep-reset-icon');
45
32
 
46
33
  return new DG.Widget(ui.divV([resetBtn, sequenceInput.root, applyChangesBtn], 'pep-textarea-box'));
@@ -9,7 +9,7 @@ import {PeptidesModel, VIEWER_TYPE} from '../model';
9
9
  import $ from 'cash-dom';
10
10
  import {scaleActivity} from '../utils/misc';
11
11
  import {ALIGNMENT, NOTATION, TAGS as bioTAGS} from '@datagrok-libraries/bio/src/utils/macromolecule';
12
- import {ILogoSummaryTable, LogoSummaryTable} from '../viewers/logo-summary';
12
+ import {ILogoSummaryTable} from '../viewers/logo-summary';
13
13
  import {MmDistanceFunctionsNames} from '@datagrok-libraries/ml/src/macromolecule-distance-functions';
14
14
  import {MCL_INPUTS} from './settings';
15
15
  import {createSequenceColumnInput, ISequenceColumnInput} from '@datagrok-libraries/bio/src/utils/sequence-column-input';
@@ -40,6 +40,7 @@ export async function analyzePeptidesUI(df: DG.DataFrame, col?: DG.Column<string
40
40
  sequenceColInput = await createSequenceColumnInput('Sequence', {table: df, value: potentialCol, onValueChanged: (value) => {
41
41
  $(logoHost).empty().append(ui.wait(async () => {
42
42
  const viewer = await df.plot.fromType('WebLogo', {sequenceColumnName: value.name});
43
+ viewer.root.setAttribute('name', 'viewer-WebLogo');
43
44
  viewer.root.style.setProperty('height', '130px');
44
45
  return viewer.root;
45
46
  }));
@@ -212,6 +213,7 @@ export async function analyzePeptidesUI(df: DG.DataFrame, col?: DG.Column<string
212
213
 
213
214
  $(logoHost).empty().append(ui.wait(async () => {
214
215
  const viewer = await df.plot.fromType('WebLogo', {sequenceColumnName: col?.name ?? sequenceColInput!.value!.name});
216
+ viewer.root.setAttribute('name', 'viewer-WebLogo');
215
217
  viewer.root.style.setProperty('height', '130px');
216
218
  return viewer.root;
217
219
  }));
@@ -256,110 +258,109 @@ export async function startAnalysis(activityColumn: DG.Column<number>, peptidesC
256
258
  return model;
257
259
  }
258
260
  const progress = DG.TaskBarProgressIndicator.create('Loading SAR...');
259
-
260
- // Prepare new DF
261
- // const newDf = DG.DataFrame.create(sourceDf.rowCount);
262
- // newDf.name = 'Peptides analysis';
263
- // const newDfCols = newDf.columns;
264
- // newDfCols.add(scaledCol);
265
- // for (const col of sourceDf.columns) {
266
- // if (col.getTag(C.TAGS.ANALYSIS_COL) !== `${true}`) {
267
- // if (col.name.toLowerCase() === scaledCol.name.toLowerCase())
268
- // col.name = sourceDf.columns.getUnusedName(col.name);
269
- // newDfCols.add(col);
270
- // }
271
- // }
272
-
273
- //make sure the data sync is turned off for the dataframe:
274
- sourceDf.tags.delete && sourceDf.tags.delete('.script');
275
-
276
- const sourceCols = sourceDf.columns;
277
- const oldActivityCol = sourceDf.col(scaledCol.name);
278
- if (oldActivityCol)
279
- oldActivityCol.name = sourceCols.getUnusedName(oldActivityCol.name);
280
- const scaleColRawData = scaledCol.getRawData();
281
- sourceDf.columns.addNew(scaledCol.name, scaledCol.type).init((i) => scaleColRawData[i]);
282
- sourceCols.setOrder([scaledCol.name, peptidesCol.name, ...sourceCols.names().filter((name) => name !== peptidesCol.name && name !== scaledCol.name)]);
283
- const settings: type.PeptidesSettings = {
284
- sequenceColumnName: peptidesCol.name, activityColumnName: activityColumn.name, activityScaling: scaling,
285
- columns: {}, showDendrogram: false, showSequenceSpace: false,
286
- sequenceSpaceParams: new type.SequenceSpaceParams(!!options.useEmbeddingsClusters && !clustersColumn),
287
- mclSettings: options.mclSettings ?? new type.MCLSettings(),
288
- };
289
-
290
- if (clustersColumn) {
291
- const clusterCol = sourceDf.getCol(clustersColumn.name);
292
- if (clusterCol.type !== DG.COLUMN_TYPE.STRING)
293
- sourceCols.replace(clusterCol, clusterCol.convertTo(DG.COLUMN_TYPE.STRING));
294
- }
295
- sourceDf.setTag(C.TAGS.SETTINGS, JSON.stringify(settings));
296
-
297
- // const bitset = DG.BitSet.create(sourceDf.rowCount,
298
- // (i) => !activityColumn.isNone(i) && !peptidesCol.isNone(i) && sourceDf.filter.get(i));
299
-
300
- // Cloning dataframe with applied filter. If filter is not applied, cloning is
301
- // needed anyway to allow filtering on the original dataframe
302
- model = PeptidesModel.getInstance(sourceDf);
303
- model.init(settings);
304
- if (clustersColumn) {
305
- const lstProps: ILogoSummaryTable = {
306
- clustersColumnName: clustersColumn.name, sequenceColumnName: peptidesCol.name, activityScaling: scaling,
307
- activityColumnName: activityColumn.name,
261
+ try {
262
+
263
+ // Prepare new DF
264
+ // const newDf = DG.DataFrame.create(sourceDf.rowCount);
265
+ // newDf.name = 'Peptides analysis';
266
+ // const newDfCols = newDf.columns;
267
+ // newDfCols.add(scaledCol);
268
+ // for (const col of sourceDf.columns) {
269
+ // if (col.getTag(C.TAGS.ANALYSIS_COL) !== `${true}`) {
270
+ // if (col.name.toLowerCase() === scaledCol.name.toLowerCase())
271
+ // col.name = sourceDf.columns.getUnusedName(col.name);
272
+ // newDfCols.add(col);
273
+ // }
274
+ // }
275
+
276
+ //make sure the data sync is turned off for the dataframe:
277
+ sourceDf.tags.delete && sourceDf.tags.delete('.script');
278
+
279
+ const sourceCols = sourceDf.columns;
280
+ const oldActivityCol = sourceDf.col(scaledCol.name);
281
+ if (oldActivityCol)
282
+ oldActivityCol.name = sourceCols.getUnusedName(oldActivityCol.name);
283
+ const scaleColRawData = scaledCol.getRawData();
284
+ sourceDf.columns.addNew(scaledCol.name, scaledCol.type).init((i) => scaleColRawData[i]);
285
+ sourceCols.setOrder([scaledCol.name, peptidesCol.name, ...sourceCols.names().filter((name) => name !== peptidesCol.name && name !== scaledCol.name)]);
286
+ const settings: type.PeptidesSettings = {
287
+ sequenceColumnName: peptidesCol.name, activityColumnName: activityColumn.name, activityScaling: scaling,
288
+ columns: {}, showDendrogram: false, showSequenceSpace: false,
289
+ sequenceSpaceParams: new type.SequenceSpaceParams(!!options.useEmbeddingsClusters && !clustersColumn),
290
+ mclSettings: options.mclSettings ?? new type.MCLSettings(),
308
291
  };
309
- await model.addLogoSummaryTable(lstProps);
310
- }
311
- await model.addMonomerPosition();
312
- await model.addMostPotentResidues();
313
-
314
- // FIXME: enable by default for tests
315
- if (options.addSequenceSpace ?? false) {
316
- await model.addSequenceSpace({clusterCol: clustersColumn, clusterEmbeddings: options.useEmbeddingsClusters});
317
- if (!clustersColumn && (options.useEmbeddingsClusters ?? false)) {
318
- const clusterCol = model._sequenceSpaceCols
319
- .find((col) => model!.df.col(col) && model!.df.col(col)?.type === DG.COLUMN_TYPE.STRING);
320
- if (clusterCol) {
321
- const lstProps: ILogoSummaryTable = {
322
- clustersColumnName: clusterCol, sequenceColumnName: peptidesCol.name, activityScaling: scaling,
323
- activityColumnName: activityColumn.name,
324
- };
325
- await model.addLogoSummaryTable(lstProps);
326
- setTimeout(() => {
327
- model && (model?.findViewer(VIEWER_TYPE.LOGO_SUMMARY_TABLE) as LogoSummaryTable)?.render &&
328
- (model?.findViewer(VIEWER_TYPE.LOGO_SUMMARY_TABLE) as LogoSummaryTable)?.render();
329
- }, 100);
330
- }
292
+
293
+ if (clustersColumn) {
294
+ const clusterCol = sourceDf.getCol(clustersColumn.name);
295
+ if (clusterCol.type !== DG.COLUMN_TYPE.STRING)
296
+ sourceCols.replace(clusterCol, clusterCol.convertTo(DG.COLUMN_TYPE.STRING));
331
297
  }
332
- } else if (options.addMCL ?? false) {
333
- await model.addMCLClusters();
334
- if (!clustersColumn && (options.useEmbeddingsClusters ?? false)) {
335
- const mclClusterCol = model._mclCols
336
- .find(
337
- (col) => model?.df.col(col) && col.toLowerCase().startsWith('cluster') && !col.toLowerCase().includes('size'),
338
- );
339
- if (mclClusterCol) {
340
- const lstProps: ILogoSummaryTable = {
341
- clustersColumnName: mclClusterCol, sequenceColumnName: peptidesCol.name, activityScaling: scaling,
342
- activityColumnName: activityColumn.name,
343
- };
344
- await model.addLogoSummaryTable(lstProps);
345
- setTimeout(() => {
346
- model && (model?.findViewer(VIEWER_TYPE.LOGO_SUMMARY_TABLE) as LogoSummaryTable)?.render &&
347
- (model?.findViewer(VIEWER_TYPE.LOGO_SUMMARY_TABLE) as LogoSummaryTable)?.render();
348
- }, 100);
298
+ sourceDf.setTag(C.TAGS.SETTINGS, JSON.stringify(settings));
299
+
300
+ // const bitset = DG.BitSet.create(sourceDf.rowCount,
301
+ // (i) => !activityColumn.isNone(i) && !peptidesCol.isNone(i) && sourceDf.filter.get(i));
302
+
303
+ // Cloning dataframe with applied filter. If filter is not applied, cloning is
304
+ // needed anyway to allow filtering on the original dataframe
305
+ model = PeptidesModel.getInstance(sourceDf);
306
+ model.init(settings);
307
+ if (clustersColumn) {
308
+ const lstProps: ILogoSummaryTable = {
309
+ clustersColumnName: clustersColumn.name, sequenceColumnName: peptidesCol.name, activityScaling: scaling,
310
+ activityColumnName: activityColumn.name,
311
+ };
312
+ await model.addLogoSummaryTable(lstProps);
313
+ }
314
+ await model.addMonomerPosition();
315
+ await model.addMostPotentResidues();
316
+
317
+ // FIXME: enable by default for tests
318
+ if (options.addSequenceSpace ?? false) {
319
+ await model.addSequenceSpace({clusterCol: clustersColumn, clusterEmbeddings: options.useEmbeddingsClusters});
320
+ if (!clustersColumn && (options.useEmbeddingsClusters ?? false)) {
321
+ const clusterCol = model._sequenceSpaceCols
322
+ .find((col) => model!.df.col(col) && model!.df.col(col)?.type === DG.COLUMN_TYPE.STRING);
323
+ if (clusterCol) {
324
+ const lstProps: ILogoSummaryTable = {
325
+ clustersColumnName: clusterCol, sequenceColumnName: peptidesCol.name, activityScaling: scaling,
326
+ activityColumnName: activityColumn.name,
327
+ };
328
+ await model.addLogoSummaryTable(lstProps);
329
+ }
330
+ }
331
+ } else if (options.addMCL ?? false) {
332
+ await model.addMCLClusters();
333
+ if (!clustersColumn && (options.useEmbeddingsClusters ?? false)) {
334
+ const mclClusterCol = model._mclCols
335
+ .find(
336
+ (col) => model?.df.col(col) && col.toLowerCase().startsWith('cluster') && !col.toLowerCase().includes('size'),
337
+ );
338
+ if (mclClusterCol) {
339
+ const lstProps: ILogoSummaryTable = {
340
+ clustersColumnName: mclClusterCol, sequenceColumnName: peptidesCol.name, activityScaling: scaling,
341
+ activityColumnName: activityColumn.name,
342
+ };
343
+ await model.addLogoSummaryTable(lstProps);
344
+ }
349
345
  }
350
346
  }
351
- }
352
347
 
353
- const selectionGrid = model.df.plot.grid({
354
- rowSource: DG.RowSet.Selected,
355
- selectedRowsColor: DG.Color.fromHtml('#ffffff'),
356
- title: 'Selection',
357
- });
348
+ const selectionGrid = model.df.plot.grid({
349
+ rowSource: DG.RowSet.Selected,
350
+ selectedRowsColor: DG.Color.fromHtml('#ffffff'),
351
+ title: 'Selection',
352
+ });
358
353
 
359
- const logoViewerNode = (model?.findViewerNode(VIEWER_TYPE.LOGO_SUMMARY_TABLE));
360
- if (logoViewerNode)
361
- model.analysisView.dockManager.dock(selectionGrid, DG.DOCK_TYPE.DOWN, logoViewerNode, 'Selection', 0.4);
354
+ const logoViewerNode = (model?.findViewerNode(VIEWER_TYPE.LOGO_SUMMARY_TABLE));
355
+ selectionGrid.root.setAttribute('name', 'viewer-Selection');
356
+ if (logoViewerNode)
357
+ model.analysisView.dockManager.dock(selectionGrid, DG.DOCK_TYPE.DOWN, logoViewerNode, 'Selection', 0.4);
362
358
 
363
- progress.close();
364
- return model;
359
+ // Adding and hiding columns during analysis can retain an offset into the old layout.
360
+ model.analysisView.grid.scrollToCell(C.COLUMNS_NAMES.ACTIVITY, 0);
361
+ grok.events.fireCustomEvent('peptides-sar-ready', {table: model.df.name});
362
+ return model;
363
+ } finally {
364
+ progress.close();
365
+ }
365
366
  }
@@ -119,7 +119,7 @@ export function getSelectionWidget(table: DG.DataFrame, options: SelectionWidget
119
119
  const tooltipOptions: TooltipOptions = {x: 0, y: 0, monomerPosition: {} as SelectionItem, mpStats};
120
120
 
121
121
  if (options.isAnalysis) {
122
- setWebLogoRenderer(grid, mpStats, options.positionColumns, options.activityColumn, cellRendererOptions,
122
+ setWebLogoRenderer(grid, () => mpStats, options.positionColumns, options.activityColumn, cellRendererOptions,
123
123
  tooltipOptions);
124
124
  }
125
125
 
@@ -5,10 +5,10 @@ import * as DG from 'datagrok-api/dg';
5
5
 
6
6
  import * as type from '../utils/types';
7
7
  import * as C from '../utils/constants';
8
- import {PeptidesModel, VIEWER_TYPE} from '../model';
8
+ import {PeptidesModel} from '../model';
9
+ import {VIEWER_TYPE} from '../utils/constants';
9
10
 
10
11
  import $ from 'cash-dom';
11
- import wu from 'wu';
12
12
  import {getTreeHelperInstance} from '../package';
13
13
  import {
14
14
  MmDistanceFunctionsNames,
@@ -31,9 +31,7 @@ export enum GENERAL_INPUTS {
31
31
  ACTIVITY_SCALING = 'Activity scaling',
32
32
  }
33
33
 
34
- export enum VIEWERS_INPUTS {
35
- DENDROGRAM = VIEWER_TYPE.DENDROGRAM,
36
- }
34
+ export const VIEWERS_INPUTS = {DENDROGRAM: VIEWER_TYPE.DENDROGRAM} as const;
37
35
 
38
36
  export enum COLUMNS_INPUTS {
39
37
  IS_INCLUDED = '',
@@ -115,8 +113,8 @@ export function getSettingsDialog(model: PeptidesModel): SettingsElements {
115
113
  onValueChanged: (value) => result.showLogoSummaryTable = value});
116
114
  logoSummaryTable.enabled = typeof settings.clustersColumnName !== 'undefined';
117
115
  */
118
- const isDendrogramEnabled = wu(model.analysisView.viewers).some((v) => v.type === VIEWER_TYPE.DENDROGRAM);
119
- const dendrogram = ui.input.bool(VIEWER_TYPE.DENDROGRAM, {value: isDendrogramEnabled ?? false,
116
+ const isDendrogramEnabled = model.dendrogramCloseButton !== null;
117
+ const dendrogram = ui.input.bool(VIEWER_TYPE.DENDROGRAM, {value: isDendrogramEnabled,
120
118
  onValueChanged: (value) => result.showDendrogram = value}) as DG.InputBase<boolean>;
121
119
  const clusterMaxActivity = ui.input.bool(VIEWER_TYPE.CLUSTER_MAX_ACTIVITY, {value: !!settings?.showClusterMaxActivity,
122
120
  onValueChanged: (value) => {result.showClusterMaxActivity = value ?? undefined;}});
@@ -328,8 +326,12 @@ export function getSettingsDialog(model: PeptidesModel): SettingsElements {
328
326
  showSeqSpace.fireChanged();
329
327
  const dialog = ui.dialog('Peptides settings').add(accordion);
330
328
  dialog.root.style.width = '400px';
331
- dialog.onOK(() => {
332
- model.settings = result;
329
+ dialog.onOK(async () => {
330
+ try {
331
+ await model.applySettings(result);
332
+ } catch (error) {
333
+ grok.shell.error(String(error));
334
+ }
333
335
  });
334
336
  dialog.show();
335
337
 
@@ -0,0 +1,73 @@
1
+ {
2
+ "config": {
3
+ "argv": [
4
+ "/usr/local/bin/node",
5
+ "/Users/davitrizhinashvili/Desktop/grok/datagrok/public/packages/Peptides/node_modules/@playwright/test/cli.js",
6
+ "test",
7
+ "--config=/Users/davitrizhinashvili/Desktop/grok/datagrok/public/packages/Peptides/playwright/playwright.config.ts",
8
+ "--reporter=json",
9
+ "--grep=WebLogo aggregation on a filtered table"
10
+ ],
11
+ "configFile": "/Users/davitrizhinashvili/Desktop/grok/datagrok/public/packages/Peptides/playwright/playwright.config.ts",
12
+ "rootDir": "/Users/davitrizhinashvili/Desktop/grok/datagrok/public/packages/Peptides/playwright",
13
+ "failOnFlakyTests": false,
14
+ "forbidOnly": false,
15
+ "fullyParallel": false,
16
+ "globalSetup": "/Users/davitrizhinashvili/Desktop/grok/datagrok/public/libraries/test/dist/src/playwright/global-setup.js",
17
+ "globalTeardown": null,
18
+ "globalTimeout": 0,
19
+ "grep": {},
20
+ "grepInvert": null,
21
+ "maxFailures": 0,
22
+ "metadata": {},
23
+ "preserveOutput": "always",
24
+ "projects": [
25
+ {
26
+ "outputDir": "/Users/davitrizhinashvili/Desktop/grok/datagrok/public/packages/Peptides/playwright/test-output",
27
+ "repeatEach": 1,
28
+ "retries": 0,
29
+ "metadata": {},
30
+ "id": "chromium",
31
+ "name": "chromium",
32
+ "testDir": "/Users/davitrizhinashvili/Desktop/grok/datagrok/public/packages/Peptides/playwright",
33
+ "testIgnore": [],
34
+ "testMatch": [
35
+ "**/*.test.ts"
36
+ ],
37
+ "timeout": 120000
38
+ }
39
+ ],
40
+ "quiet": false,
41
+ "reporter": [
42
+ [
43
+ "json"
44
+ ]
45
+ ],
46
+ "reportSlowTests": {
47
+ "max": 5,
48
+ "threshold": 300000
49
+ },
50
+ "shard": null,
51
+ "tags": [],
52
+ "updateSnapshots": "missing",
53
+ "updateSourceMethod": "patch",
54
+ "version": "1.63.0",
55
+ "workers": 4,
56
+ "webServer": null
57
+ },
58
+ "suites": [],
59
+ "errors": [
60
+ {
61
+ "message": "Error: No tests found",
62
+ "stack": "Error: No tests found"
63
+ }
64
+ ],
65
+ "stats": {
66
+ "startTime": "2026-11-28T21:24:00.904Z",
67
+ "duration": 1761.97,
68
+ "expected": 0,
69
+ "skipped": 0,
70
+ "unexpected": 0,
71
+ "flaky": 0
72
+ }
73
+ }
@@ -0,0 +1,2 @@
1
+ date,category,name,success,ms,skipped,owner,package,flaking,result,logs,widgetsDifference
2
+ 2026-11-28T21:24:02.678Z,playwright,Playwright suite,false,0,false,,Peptides,false,the run produced a report with no specs — check the spec imports and testMatch,,
package/tsconfig.json CHANGED
@@ -1,72 +1,18 @@
1
1
  {
2
+ "extends": "@datagrok/build-config/tsconfig.base.json",
3
+ "include": [
4
+ "src"
5
+ ],
6
+ "exclude": [
7
+ "node_modules",
8
+ "playwright",
9
+ "bdd"
10
+ ],
2
11
  "compilerOptions": {
3
- /* Visit https://aka.ms/tsconfig.json to read more about this file */
4
-
5
- /* Basic Options */
6
- // "incremental": true, /* Enable incremental compilation */
7
- "target": "ES6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
8
- "module": "es2020", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
9
- "lib": ["ES2022", "dom"], /* Specify library files to be included in the compilation. */
10
- // "allowJs": true, /* Allow javascript files to be compiled. */
11
- // "checkJs": true, /* Report errors in .js files. */
12
- // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */
13
- // "declaration": true, /* Generates corresponding '.d.ts' file. */
14
- // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
15
- "sourceMap": true, /* Generates corresponding '.map' file. */
16
- // "outFile": "./", /* Concatenate and emit output to single file. */
17
- // "outDir": "./", /* Redirect output structure to the directory. */
18
- // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
19
- // "composite": true, /* Enable project compilation */
20
- // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
21
- // "removeComments": true, /* Do not emit comments to output. */
22
- // "noEmit": true, /* Do not emit outputs. */
23
- // "importHelpers": true, /* Import emit helpers from 'tslib'. */
24
- // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
25
- // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
26
-
27
- /* Strict Type-Checking Options */
28
- "strict": true, /* Enable all strict type-checking options. */
29
- // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
30
- // "strictNullChecks": true, /* Enable strict null checks. */
31
- // "strictFunctionTypes": true, /* Enable strict checking of function types. */
32
- // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
33
- // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
34
- // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
35
- // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
36
-
37
- /* Additional Checks */
38
- // "noUnusedLocals": true, /* Report errors on unused locals. */
39
- // "noUnusedParameters": true, /* Report errors on unused parameters. */
40
- // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
41
- // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
42
- // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
43
- // "noPropertyAccessFromIndexSignature": true, /* Require undeclared properties from index signatures to use element accesses. */
44
-
45
- /* Module Resolution Options */
46
- "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
47
- // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
48
- // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
49
- // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
50
- "typeRoots": ["./node_modules/@webgpu/types", "./node_modules/@types"], /* List of folders to include type definitions from. */
51
- // "types": [], /* Type declaration files to be included in compilation. */
52
- // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
53
- "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
54
- // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
55
- // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
56
-
57
- /* Source Map Options */
58
- "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
59
- "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
60
- // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
61
- // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
62
-
63
- /* Experimental Options */
64
- "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
65
- "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
66
-
67
- /* Advanced Options */
68
- "skipLibCheck": true, /* Skip type checking of declaration files. */
69
- "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
70
- },
71
- "exclude": ["node_modules", "playwright"]
12
+ "types": [
13
+ "node",
14
+ "@datagrok/build-config/css",
15
+ "@webgpu/types"
16
+ ]
17
+ }
72
18
  }
package/.eslintrc.json DELETED
@@ -1,53 +0,0 @@
1
- {
2
- "env": {
3
- "browser": true,
4
- "es2022": true
5
- },
6
- "extends": [
7
- "google"
8
- ],
9
- "parser": "@typescript-eslint/parser",
10
- "parserOptions": {
11
- "ecmaVersion": 12,
12
- "sourceType": "module",
13
- "project" : "./packages/Peptides/tsconfig.json"
14
- },
15
- "plugins": [
16
- "@typescript-eslint"
17
- ],
18
- "rules": {
19
- "require-jsdoc": "off",
20
- "valid-jsdoc": "off",
21
- "indent": [
22
- "error",
23
- 2
24
- ],
25
- "max-len": [
26
- "error",
27
- 120
28
- ],
29
- "no-unused-vars": "off",
30
- "@typescript-eslint/no-unused-vars": [
31
- "warn",
32
- {
33
- "varsIgnorePattern": "^_",
34
- "argsIgnorePattern": "^_"
35
- }
36
- ],
37
- "spaced-comment": "off",
38
- "linebreak-style": "off",
39
- "curly": [
40
- "error",
41
- "multi-or-nest"
42
- ],
43
- "brace-style": [
44
- "error",
45
- "1tbs",
46
- {
47
- "allowSingleLine": true
48
- }
49
- ],
50
- "block-spacing": 2,
51
- "@typescript-eslint/no-unsafe-return": "error"
52
- }
53
- }
package/dist/216.js DELETED
@@ -1,2 +0,0 @@
1
- var peptides;(()=>{"use strict";var t={2216(t,e,r){var n=r(8774);onmessage=t=>{return e=void 0,r=void 0,i=function*(){const{startIdx:e,endIdx:r,activityArray:o,monomerInfoArray:i,settings:s}=t.data,a=s.filter,c=s.singlePosition,l=c?c.position:-1,p=a?new n.A(a,32*a.length):null,f=[],u=[],h=[],g=r-e;let d=0;const v=o.length-2-Math.floor(Math.sqrt(-8*e+4*o.length*(o.length-1)-7)/2-.5);let y=v,b=e-o.length*v+Math.floor((v+1)*(v+2)/2);const m=new Array(i.length);for(;d<g;){if(!p||p.getBit(y)&&p.getBit(b)){let t=0;const e=o[y]-o[b];if(Math.abs(e)>=s.minActivityDelta){let e=!1,r=0;for(let n=0;n<i.length;n++){const o=i[n];if(o.rawData[y]!==o.rawData[b]){if(t++,e=t>s.maxMutations||-1!==l&&n!==l,e)break;m[r++]={pos:o.name,seq1Idx:y,seq2Idx:b}}}if(!e&&0!==t)for(let t=0;t<r;t++){const e=m[t].pos;f.push(e),u.push(y),h.push(b)}}}d++,b++,b===o.length&&(y++,b=y+1)}postMessage({pos:f,seq1Idxs:new Uint32Array(u),seq2Idxs:new Uint32Array(h)})},new((o=void 0)||(o=Promise))(function(t,n){function s(t){try{c(i.next(t))}catch(t){n(t)}}function a(t){try{c(i.throw(t))}catch(t){n(t)}}function c(e){var r;e.done?t(e.value):(r=e.value,r instanceof o?r:new o(function(t){t(r)})).then(s,a)}c((i=i.apply(e,r||[])).next())});var e,r,o,i}}};const e={};function r(n){const o=e[n];if(void 0!==o)return o.exports;const i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.m=t,r.x=()=>{let t=r.O(void 0,[774],()=>r(2216));return t=r.O(t),t},(()=>{const t=[];r.O=(e,n,o,i)=>{if(n){i=i||0;for(var s=t.length;s>0&&t[s-1][2]>i;s--)t[s]=t[s-1];return void(t[s]=[n,o,i])}let a=1/0;for(s=0;s<t.length;s++){let[n,o,i]=t[s],l=!0;for(var c=0;c<n.length;c++)(!1&i||a>=i)&&Object.keys(r.O).every(t=>r.O[t](n[c]))?n.splice(c--,1):(l=!1,i<a&&(a=i));if(l){t.splice(s--,1);const r=o();void 0!==r&&(e=r)}}return e}})(),r.d=(t,e)=>{if(Array.isArray(e))for(var n=0;n<e.length;){var o=e[n++],i=e[n++];r.o(t,o)?0===i&&n++:0===i?Object.defineProperty(t,o,{enumerable:!0,value:e[n++]}):Object.defineProperty(t,o,{enumerable:!0,get:i})}else for(var o in e)r.o(e,o)&&!r.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},r.f={},r.e=t=>Promise.all(Object.keys(r.f).reduce((e,n)=>(r.f[n](t,e),e),[])),r.u=t=>t+".js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{let t;r.g.importScripts&&(t=r.g.location+"");const e=r.g.document;if(!t&&e&&("SCRIPT"===e.currentScript?.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){const r=e.getElementsByTagName("script");if(r.length){let e=r.length-1;for(;e>-1&&(!t||!/^http(s?):/.test(t));)t=r[e--].src}}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t})(),(()=>{var t={216:1};r.f.i=(e,n)=>{t[e]||importScripts(r.p+r.u(e))};var e=self.webpackChunkpeptides=self.webpackChunkpeptides||[],n=e.push.bind(e);e.push=e=>{let[o,i,s]=e;for(var a in i)r.o(i,a)&&(r.m[a]=i[a]);for(s&&s(r);o.length;)t[o.pop()]=1;n(e)}})(),(()=>{const t=r.x;r.x=()=>r.e(774).then(t)})();var n=r.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":["webpack://peptides/./src/workers/mutation-cliffs-worker.ts","webpack://peptides/webpack/bootstrap","webpack://peptides/webpack/runtime/chunk loaded","webpack://peptides/webpack/runtime/define property getters","webpack://peptides/webpack/runtime/ensure chunk","webpack://peptides/webpack/runtime/get javascript chunk filename","webpack://peptides/webpack/runtime/global","webpack://peptides/webpack/runtime/hasOwnProperty shorthand","webpack://peptides/webpack/runtime/publicPath","webpack://peptides/webpack/runtime/importScripts chunk loading","webpack://peptides/webpack/runtime/startup chunk dependencies","webpack://peptides/webpack/startup"],"sourcesContent":["/* eslint-disable max-len */\nimport BitArray from '@datagrok-libraries/utils/src/bit-array';\n\nonmessage = async (event): Promise<void> => {\n const {startIdx, endIdx, activityArray, monomerInfoArray, settings} = event.data;\n const filterArray: Uint32Array = settings.filter;\n const singlePosition: {position: number} | undefined = settings.singlePosition;\n const singlePositionIndex = singlePosition ? singlePosition.position : -1;\n const filter = filterArray ? new BitArray(filterArray, filterArray.length * 32) : null;\n\n const pos: string[] = [];\n const seq1Idxs: number[] = [];\n const seq2Idxs: number[] = [];\n const chunkSize = endIdx - startIdx;\n let cnt = 0;\n const startRow = activityArray.length - 2 - Math.floor(\n Math.sqrt(-8 * startIdx + 4 * activityArray.length * (activityArray.length - 1) - 7) / 2 - 0.5);\n const startCol = startIdx - activityArray.length * startRow + Math.floor((startRow + 1) * (startRow + 2) / 2);\n let seq1Idx = startRow;\n let seq2Idx = startCol;\n const tempData = new Array(monomerInfoArray.length);\n while (cnt < chunkSize) {\n if (!filter || (filter.getBit(seq1Idx) && filter.getBit(seq2Idx))) {\n let substCounter = 0;\n const activityValSeq1 = activityArray[seq1Idx];\n const activityValSeq2 = activityArray[seq2Idx];\n const delta = activityValSeq1 - activityValSeq2;\n if (Math.abs(delta) >= settings.minActivityDelta) {\n let substCounterFlag = false;\n let tempDataIdx = 0;\n for (let positionIndex = 0; positionIndex < monomerInfoArray.length; positionIndex++) {\n const monomerInfo = monomerInfoArray[positionIndex];\n const seq1categoryIdx = monomerInfo.rawData[seq1Idx];\n const seq2categoryIdx = monomerInfo.rawData[seq2Idx];\n if (seq1categoryIdx === seq2categoryIdx)\n continue;\n\n substCounter++;\n substCounterFlag = substCounter > settings.maxMutations || (singlePositionIndex !== -1 && positionIndex !== singlePositionIndex);\n if (substCounterFlag)\n break;\n\n tempData[tempDataIdx++] = {\n pos: monomerInfo.name,\n seq1Idx: seq1Idx,\n seq2Idx: seq2Idx,\n };\n }\n if (!(substCounterFlag || substCounter === 0)) {\n for (let i = 0; i < tempDataIdx; i++) {\n const tempDataElement = tempData[i];\n const position = tempDataElement.pos;\n pos.push(position);\n seq1Idxs.push(seq1Idx);\n seq2Idxs.push(seq2Idx);\n }\n }\n }\n }\n cnt++;\n seq2Idx++;\n if (seq2Idx === activityArray.length) {\n seq1Idx++;\n seq2Idx = seq1Idx + 1;\n }\n }\n postMessage({\n pos: pos,\n seq1Idxs: new Uint32Array(seq1Idxs),\n seq2Idxs: new Uint32Array(seq2Idxs),\n });\n};\n","// The module cache\nconst __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tconst cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tconst module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n// the startup function\n__webpack_require__.x = () => {\n\t// Load entry module and return exports\n\t// This entry module depends on other loaded chunks and execution need to be delayed\n\tlet __webpack_exports__ = __webpack_require__.O(undefined, [774], () => (__webpack_require__(2216)))\n\t__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n\treturn __webpack_exports__;\n};\n\n","const deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tlet notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tlet [chunkIds, fn, priority] = deferred[i];\n\t\tlet fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tconst r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// define getter/value functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tif(Array.isArray(definition)) {\n\t\tvar i = 0;\n\t\twhile(i < definition.length) {\n\t\t\tvar key = definition[i++];\n\t\t\tvar binding = definition[i++];\n\t\t\tif(!__webpack_require__.o(exports, key)) {\n\t\t\t\tif(binding === 0) {\n\t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, value: definition[i++] });\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: binding });\n\t\t\t\t}\n\t\t\t} else if(binding === 0) { i++; }\n\t\t}\n\t} else {\n\t\tfor(var key in definition) {\n\t\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t\t}\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks and chunks that the entrypoint depends on\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","let scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nconst document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript?.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tconst scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tlet i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/^blob:/, \"\").replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","// no baseURI\n\n// object to store loaded chunks\n// \"1\" means \"already loaded\"\nvar installedChunks = {\n\t216: 1\n};\n\n// importScripts chunk loading\nvar installChunk = (data) => {\n\tlet [chunkIds, moreModules, runtime] = data;\n\tfor(var moduleId in moreModules) {\n\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t}\n\t}\n\tif(runtime) runtime(__webpack_require__);\n\twhile(chunkIds.length)\n\t\tinstalledChunks[chunkIds.pop()] = 1;\n\tparentChunkLoadingFunction(data);\n};\n__webpack_require__.f.i = (chunkId, promises) => {\n\t// \"1\" is the signal for \"already loaded\"\n\tif(!installedChunks[chunkId]) {\n\t\tif(true) { // all chunks have JS\n\t\t\timportScripts(__webpack_require__.p + __webpack_require__.u(chunkId));\n\t\t}\n\t}\n};\n\nvar chunkLoadingGlobal = self[\"webpackChunkpeptides\"] = self[\"webpackChunkpeptides\"] || [];\nvar parentChunkLoadingFunction = chunkLoadingGlobal.push.bind(chunkLoadingGlobal);\nchunkLoadingGlobal.push = installChunk;\n\n// no HMR\n\n// no HMR manifest","const next = __webpack_require__.x;\n__webpack_require__.x = () => {\n\treturn __webpack_require__.e(774).then(next);\n};","// run startup\nvar __webpack_exports__ = __webpack_require__.x();\n"],"names":["onmessage","event","__awaiter","startIdx","endIdx","activityArray","monomerInfoArray","settings","data","filterArray","filter","singlePosition","singlePositionIndex","position","_datagrok_libraries_utils_src_bit_array__WEBPACK_IMPORTED_MODULE_0__","A","length","pos","seq1Idxs","seq2Idxs","chunkSize","cnt","startRow","Math","floor","sqrt","seq1Idx","seq2Idx","tempData","Array","getBit","substCounter","delta","abs","minActivityDelta","substCounterFlag","tempDataIdx","positionIndex","monomerInfo","rawData","maxMutations","name","i","push","postMessage","Uint32Array","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","m","x","__webpack_exports__","O","deferred","result","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","j","Object","keys","every","key","splice","r","d","definition","isArray","binding","o","defineProperty","enumerable","value","get","f","e","chunkId","Promise","all","reduce","promises","u","g","globalThis","this","Function","window","obj","prop","prototype","hasOwnProperty","call","scriptUrl","importScripts","location","document","currentScript","tagName","toUpperCase","src","scripts","getElementsByTagName","test","Error","replace","p","installedChunks","chunkLoadingGlobal","self","parentChunkLoadingFunction","bind","moreModules","runtime","pop","next","then"],"sourceRoot":""}