@datagrok/peptides 1.27.10 → 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.
- package/.auth.json +1 -0
- package/.grokignore +2 -0
- package/.turbo/turbo-build.log +26 -0
- package/.vscode/settings.json +16 -0
- package/CHANGELOG.md +28 -0
- package/CLAUDE.md +69 -5
- package/dist/659.js +2 -0
- package/dist/659.js.map +1 -0
- package/dist/806.js +2 -0
- package/dist/806.js.map +1 -0
- package/dist/package-test.js +396 -1
- package/dist/package-test.js.map +1 -1
- package/dist/package.js +361 -1
- package/dist/package.js.map +1 -1
- package/e2e/.auth.json +1 -0
- package/e2e/.auth.public.json +1 -0
- package/files/aligned_3.csv +6 -6
- package/package.json +32 -58
- package/rspack.config.js +3 -0
- package/src/demo/fasta.ts +0 -1
- package/src/model.ts +245 -131
- package/src/package-api.ts +18 -10
- package/src/package.g.ts +1 -0
- package/src/package.ts +19 -24
- package/src/tests/core.ts +6 -6
- package/src/tests/misc.ts +20 -0
- package/src/tests/model.ts +56 -6
- package/src/tests/table-view.ts +4 -4
- package/src/tests/utils.ts +56 -0
- package/src/tests/viewers.ts +270 -14
- package/src/tests/widgets.ts +13 -12
- package/src/utils/cell-renderer.ts +7 -6
- package/src/utils/constants.ts +10 -0
- package/src/utils/misc.ts +3 -3
- package/src/utils/statistics.ts +2 -2
- package/src/viewers/cluster-max-activity-viewer.ts +44 -11
- package/src/viewers/logo-summary.ts +126 -40
- package/src/viewers/mutation-cliffs-viewer.ts +56 -28
- package/src/viewers/peptide-generation-viewer.ts +7 -0
- package/src/viewers/position-statistics-viewer.ts +26 -4
- package/src/viewers/sar-viewer-status.ts +145 -0
- package/src/viewers/sar-viewer.ts +134 -42
- package/src/viewers/viewer-render-state.ts +68 -0
- package/src/widgets/distribution.ts +1 -1
- package/src/widgets/manual-alignment.ts +9 -22
- package/src/widgets/peptides.ts +101 -100
- package/src/widgets/selection.ts +1 -1
- package/src/widgets/settings.ts +11 -9
- package/test-playwright-report.json +73 -0
- package/test-report-playwright.csv +2 -0
- package/tsconfig.json +15 -69
- package/.eslintrc.json +0 -53
- package/dist/216.js +0 -2
- package/dist/216.js.map +0 -1
- package/dist/682.js +0 -2
- package/dist/682.js.map +0 -1
- package/dist/705.js +0 -2
- package/dist/705.js.map +0 -1
- package/dist/774.js +0 -2
- package/dist/774.js.map +0 -1
- package/dist/8473fcbfb6e85ca6c852.wasm +0 -0
- package/test-console-output-1.log +0 -603
- package/test-record-1.mp4 +0 -0
- package/webpack.config.js +0 -60
- /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
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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(
|
|
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'));
|
package/src/widgets/peptides.ts
CHANGED
|
@@ -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
|
|
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
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
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
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
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
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
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
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
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
|
-
|
|
360
|
-
|
|
361
|
-
|
|
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
|
-
|
|
364
|
-
|
|
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
|
}
|
package/src/widgets/selection.ts
CHANGED
|
@@ -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
|
|
package/src/widgets/settings.ts
CHANGED
|
@@ -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
|
|
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
|
|
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 =
|
|
119
|
-
const dendrogram = ui.input.bool(VIEWER_TYPE.DENDROGRAM, {value: isDendrogramEnabled
|
|
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
|
-
|
|
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
|
+
}
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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,e,r={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:a}=t.data,s=a.filter,c=a.singlePosition,p=c?c.position:-1,l=s?new n.A(s,32*s.length):null,f=[],u=[],h=[],v=r-e;let g=0;const d=o.length-2-Math.floor(Math.sqrt(-8*e+4*o.length*(o.length-1)-7)/2-.5);let w=d,y=e-o.length*d+Math.floor((d+1)*(d+2)/2);const m=new Array(i.length);for(;g<v;){if(!l||l.getBit(w)&&l.getBit(y)){let t=0;const e=o[w]-o[y];if(Math.abs(e)>=a.minActivityDelta){let e=!1,r=0;for(let n=0;n<i.length;n++){const o=i[n];if(o.rawData[w]!==o.rawData[y]){if(t++,e=t>a.maxMutations||-1!==p&&n!==p,e)break;m[r++]={pos:o.name,seq1Idx:w,seq2Idx:y}}}if(!e&&0!==t)for(let t=0;t<r;t++){const e=m[t].pos;f.push(e),u.push(w),h.push(y)}}}g++,y++,y===o.length&&(w++,y=w+1)}postMessage({pos:f,seq1Idxs:new Uint32Array(u),seq2Idxs:new Uint32Array(h)})},new((o=void 0)||(o=Promise))((function(t,n){function a(t){try{c(i.next(t))}catch(t){n(t)}}function s(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(a,s)}c((i=i.apply(e,r||[])).next())}));var e,r,o,i}}},n={};function o(t){var e=n[t];if(void 0!==e)return e.exports;var i=n[t]={exports:{}};return r[t](i,i.exports,o),i.exports}o.m=r,o.x=()=>{var t=o.O(void 0,[774],(()=>o(2216)));return o.O(t)},t=[],o.O=(e,r,n,i)=>{if(!r){var a=1/0;for(l=0;l<t.length;l++){for(var[r,n,i]=t[l],s=!0,c=0;c<r.length;c++)(!1&i||a>=i)&&Object.keys(o.O).every((t=>o.O[t](r[c])))?r.splice(c--,1):(s=!1,i<a&&(a=i));if(s){t.splice(l--,1);var p=n();void 0!==p&&(e=p)}}return e}i=i||0;for(var l=t.length;l>0&&t[l-1][2]>i;l--)t[l]=t[l-1];t[l]=[r,n,i]},o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.f={},o.e=t=>Promise.all(Object.keys(o.f).reduce(((e,r)=>(o.f[r](t,e),e)),[])),o.u=t=>t+".js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=r[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t})(),(()=>{var t={216:1};o.f.i=(e,r)=>{t[e]||importScripts(o.p+o.u(e))};var e=self.webpackChunkpeptides=self.webpackChunkpeptides||[],r=e.push.bind(e);e.push=e=>{var[n,i,a]=e;for(var s in i)o.o(i,s)&&(o.m[s]=i[s]);for(a&&a(o);n.length;)t[n.pop()]=1;r(e)}})(),e=o.x,o.x=()=>o.e(774).then(e);var i=o.x();peptides=i})();
|
|
2
|
-
//# sourceMappingURL=216.js.map
|
package/dist/216.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"216.js","mappings":"oCAAIA,ECAAC,E,gCCGJC,UAAmBC,IAAyB,O,OAAD,E,OAAA,E,EAAA,YACzC,MAAM,SAACC,EAAQ,OAAEC,EAAM,cAAEC,EAAa,iBAAEC,EAAgB,SAAEC,GAAYL,EAAMM,KACtEC,EAA2BF,EAASG,OACpCC,EAAiDJ,EAASI,eAC1DC,EAAsBD,EAAiBA,EAAeE,UAAY,EAClEH,EAASD,EAAc,IAAI,IAASA,EAAkC,GAArBA,EAAYK,QAAe,KAE5EC,EAAgB,GAChBC,EAAqB,GACrBC,EAAqB,GACrBC,EAAYd,EAASD,EAC3B,IAAIgB,EAAM,EACV,MAAMC,EAAWf,EAAcS,OAAS,EAAIO,KAAKC,MAC/CD,KAAKE,MAAM,EAAIpB,EAAW,EAAIE,EAAcS,QAAUT,EAAcS,OAAS,GAAK,GAAK,EAAI,IAE7F,IAAIU,EAAUJ,EACVK,EAFatB,EAAWE,EAAcS,OAASM,EAAWC,KAAKC,OAAOF,EAAW,IAAMA,EAAW,GAAK,GAG3G,MAAMM,EAAW,IAAIC,MAAMrB,EAAiBQ,QAC5C,KAAOK,EAAMD,GAAW,C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1G,EACvC,IAAI,IAAIsC,KAAYmE,EAChBpE,EAAoB2B,EAAEyC,EAAanE,KACrCD,EAAoBO,EAAEN,GAAYmE,EAAYnE,IAIhD,IADGoE,GAASA,EAAQrE,GACdY,EAAS3C,QACd8F,EAAgBnD,EAAS0D,OAAS,EACnCJ,EAA2BvG,EAAK,C,KTnB7BR,EAAO6C,EAAoBQ,EAC/BR,EAAoBQ,EAAI,IAChBR,EAAoBgC,EAAE,KAAKuC,KAAKpH,GUDxC,IAAIsD,EAAsBT,EAAoBQ,I","sources":["webpack://peptides/webpack/runtime/chunk loaded","webpack://peptides/webpack/runtime/startup chunk dependencies","webpack://peptides/./src/workers/mutation-cliffs-worker.ts","webpack://peptides/webpack/bootstrap","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/startup"],"sourcesContent":["var 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\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar 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\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var next = __webpack_require__.x;\n__webpack_require__.x = () => {\n\treturn __webpack_require__.e(774).then(next);\n};","/* 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\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar 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\tvar 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\tvar __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","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\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 sibling chunks for the entrypoint\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))","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar 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(/#.*$/, \"\").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\tvar [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","// run startup\nvar __webpack_exports__ = __webpack_require__.x();\n"],"names":["deferred","next","onmessage","event","startIdx","endIdx","activityArray","monomerInfoArray","settings","data","filterArray","filter","singlePosition","singlePositionIndex","position","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","result","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","j","Object","keys","every","key","splice","r","d","definition","o","defineProperty","enumerable","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","then"],"sourceRoot":""}
|