@datagrok/bio 1.5.1 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package-test.js +24 -13
- package/dist/package.js +24 -13
- package/package.json +1 -1
- package/setup.cmd +10 -1
- package/src/package.ts +2 -2
- package/src/utils/sequence-activity-cliffs.ts +8 -2
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@datagrok/bio",
|
|
3
3
|
"beta": false,
|
|
4
4
|
"friendlyName": "Bio",
|
|
5
|
-
"version": "1.5.
|
|
5
|
+
"version": "1.5.2",
|
|
6
6
|
"description": "Bio is a [package](https://datagrok.ai/help/develop/develop#packages) for the [Datagrok](https://datagrok.ai) platform",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
package/setup.cmd
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
cd ../../js-api
|
|
2
2
|
call npm install
|
|
3
3
|
call npm link
|
|
4
|
+
cd ../libraries/utils
|
|
5
|
+
call npm install
|
|
6
|
+
call npm link
|
|
7
|
+
call npm link datagrok-api
|
|
8
|
+
cd ../libraries/ml
|
|
9
|
+
call npm install
|
|
10
|
+
call npm link
|
|
11
|
+
call npm link @datagrok-libraries/utils
|
|
4
12
|
cd ../libraries/bio
|
|
5
13
|
call npm install
|
|
6
14
|
call npm link
|
|
15
|
+
call npm link @datagrok-libraries/utils
|
|
7
16
|
cd ../../packages/Bio
|
|
8
17
|
call npm install
|
|
9
|
-
call npm link datagrok-api @datagrok-libraries/bio
|
|
18
|
+
call npm link datagrok-api @datagrok-libraries/bio @datagrok-libraries/utils @datagrok-libraries/ml
|
|
10
19
|
webpack
|
package/src/package.ts
CHANGED
|
@@ -48,8 +48,8 @@ export function vdRegionViewer() {
|
|
|
48
48
|
return new VdRegionsViewer();
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
//top-menu: Bio | Activity Cliffs...
|
|
52
|
-
//name: Activity Cliffs
|
|
51
|
+
//top-menu: Bio | Sequence Activity Cliffs...
|
|
52
|
+
//name: Sequence Activity Cliffs
|
|
53
53
|
//description: detect activity cliffs
|
|
54
54
|
//input: dataframe df [Input data table]
|
|
55
55
|
//input: column sequence {semType: Macromolecule}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import {IDrawTooltipParams} from '@datagrok-libraries/ml/src/viewers/activity-cliffs';
|
|
2
2
|
import * as DG from 'datagrok-api/dg';
|
|
3
3
|
import * as ui from 'datagrok-api/ui';
|
|
4
|
+
import {getSimilarityFromDistance} from '@datagrok-libraries/utils/src/similarity-metrics';
|
|
5
|
+
import { AvailableMetrics } from '@datagrok-libraries/ml/src/typed-metrics';
|
|
4
6
|
|
|
5
|
-
export async function sequenceGetSimilarities(col: DG.Column, seq: string): Promise<DG.Column | null>
|
|
6
|
-
|
|
7
|
+
export async function sequenceGetSimilarities(col: DG.Column, seq: string): Promise<DG.Column | null>{
|
|
8
|
+
const stringArray = col.toList();
|
|
9
|
+
const distances = new Array(stringArray.length).fill(0.0);
|
|
10
|
+
for (let i = 0; i < stringArray.length; ++i)
|
|
11
|
+
distances[i] = getSimilarityFromDistance(AvailableMetrics['String']['Levenshtein'](stringArray[i], seq));
|
|
12
|
+
return DG.Column.fromList(DG.COLUMN_TYPE.FLOAT, 'distances', distances);
|
|
7
13
|
}
|
|
8
14
|
|
|
9
15
|
export function drawTooltip(params: IDrawTooltipParams) {
|