@datagrok/peptides 1.17.1 → 1.17.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,24 +0,0 @@
1
- import {DimensionalityReducer, KnownMethods} from '@datagrok-libraries/ml/src/reduce-dimensionality';
2
- import {KnownMetrics} from '@datagrok-libraries/ml/src/typed-metrics';
3
-
4
- /**
5
- * Worker thread receiving data function.
6
- * @param columnData Samples to process.
7
- * @param method Embedding method.
8
- * @param measure Distance metric.
9
- * @param options Options to pass to algorithm.
10
- * @return Embedding (and distance matrix where applicable).
11
- */
12
- function onMessage(columnData: any[], method: KnownMethods, measure: KnownMetrics, options: any): any {
13
- const reducer = new DimensionalityReducer(columnData, method, measure, options);
14
- return reducer.transform(true);
15
- }
16
-
17
- self.onmessage = ({data: {columnData, method, measure, options}}): void => {
18
- const embedding = onMessage(columnData, method, measure, options);
19
- self.postMessage({
20
- distance: embedding.distance,
21
- embedding: embedding.embedding,
22
- });
23
- };
24
-