@datagrok/peptides 1.18.5 → 1.18.7

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@datagrok/peptides",
3
3
  "friendlyName": "Peptides",
4
- "version": "1.18.5",
4
+ "version": "1.18.7",
5
5
  "author": {
6
6
  "name": "Davit Rizhinashvili",
7
7
  "email": "drizhinashvili@datagrok.ai"
@@ -14,18 +14,18 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "@datagrok-libraries/bio": "^5.44.5",
17
- "@datagrok-libraries/math": "^1.2.0",
18
- "@datagrok-libraries/ml": "^6.7.1",
17
+ "@datagrok-libraries/math": "^1.2.3",
18
+ "@datagrok-libraries/ml": "^6.7.4",
19
19
  "@datagrok-libraries/statistics": "^1.2.12",
20
20
  "@datagrok-libraries/tutorials": "^1.4.2",
21
21
  "@datagrok-libraries/utils": "^4.3.0",
22
22
  "datagrok-api": "^1.21.1",
23
23
  "@webgpu/types": "^0.1.40",
24
- "cash-dom": "latest",
25
- "file-loader": "latest",
24
+ "cash-dom": "^8.1.5",
25
+ "file-loader": "^6.2.0",
26
26
  "rxjs": "^6.5.5",
27
- "uuid": "latest",
28
- "wu": "latest"
27
+ "uuid": "^10.0.0",
28
+ "wu": "^2.1.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@datagrok-libraries/helm-web-editor": "^1.1.7",
@@ -34,18 +34,18 @@
34
34
  "@datagrok/chem": "^1.12.0",
35
35
  "@datagrok/dendrogram": "^1.2.33",
36
36
  "@datagrok/helm": "^2.5.0",
37
- "@types/uuid": "latest",
38
- "@types/wu": "latest",
39
- "@typescript-eslint/eslint-plugin": "latest",
40
- "@typescript-eslint/parser": "latest",
41
- "css-loader": "latest",
42
- "eslint": "latest",
43
- "eslint-config-google": "latest",
44
- "style-loader": "latest",
45
- "ts-loader": "latest",
46
- "typescript": "latest",
47
- "webpack": "latest",
48
- "webpack-cli": "latest"
37
+ "@types/uuid": "^10.0.0",
38
+ "@types/wu": "^2.1.44",
39
+ "@typescript-eslint/eslint-plugin": "^8.8.1",
40
+ "@typescript-eslint/parser": "^8.8.1",
41
+ "css-loader": "^7.1.2",
42
+ "eslint": "^8.57.1",
43
+ "eslint-config-google": "^0.14.0",
44
+ "style-loader": "^4.0.0",
45
+ "ts-loader": "^9.5.1",
46
+ "typescript": "^5.6.3",
47
+ "webpack": "^5.95.0",
48
+ "webpack-cli": "^5.1.4"
49
49
  },
50
50
  "scripts": {
51
51
  "link-api": "npm link datagrok-api",
@@ -79,4 +79,4 @@
79
79
  "All users"
80
80
  ],
81
81
  "category": "Bioinformatics"
82
- }
82
+ }
@@ -0,0 +1,13 @@
1
+ import * as grokNamespace from 'datagrok-api/grok';
2
+ import * as uiNamespace from 'datagrok-api/ui';
3
+ import * as DGNamespace from 'datagrok-api/dg';
4
+ import * as rxjsNamespace from 'rxjs';
5
+ import $Namespace from 'cash-dom';
6
+
7
+ declare global {
8
+ const grok: typeof grokNamespace;
9
+ const ui: typeof uiNamespace;
10
+ const DG: typeof DGNamespace;
11
+ const rjxs: typeof rxjsNamespace;
12
+ const $: typeof $Namespace;
13
+ }
package/src/package.ts CHANGED
@@ -85,7 +85,11 @@ export function Peptides(): DG.View {
85
85
 
86
86
  //top-menu: Bio | Analyze | SAR...
87
87
  //name: Bio Peptides
88
- export function peptidesDialog(): DG.Dialog {
88
+ export function peptidesDialog(): DG.Dialog | null {
89
+ if (!grok.shell.t || !grok.shell.t.columns.bySemType('Macromolecule')?.length) {
90
+ grok.shell.warning('SAR Analysis requires an active table with Macromolecule column');
91
+ return null;
92
+ }
89
93
  const analyzeObject = analyzePeptidesUI(grok.shell.t);
90
94
  const dialog = ui.dialog('Analyze Peptides').add(analyzeObject.host).onOK(async () => {
91
95
  const startSuccess = analyzeObject.callback();
@@ -269,7 +269,8 @@ export class LogoSummaryTable extends DG.JsViewer implements ILogoSummaryTable {
269
269
  this._scaledActivityColumn ??= scaleActivity(this.dataFrame.getCol(this.activityColumnName),
270
270
  this.activityScaling);
271
271
  if (isFiltered) {
272
- return DG.DataFrame.fromColumns([this._scaledActivityColumn]).clone(this.dataFrame.filter)
272
+ return DG.DataFrame.fromColumns([this._scaledActivityColumn])
273
+ .clone(this.dataFrame.rowCount === this._scaledActivityColumn.length ? this.dataFrame.filter : null)
273
274
  .getCol(this._scaledActivityColumn.name) as DG.Column<number>;
274
275
  }
275
276
  return this._scaledActivityColumn as DG.Column<number>;