@datagrok/peptides 1.18.3 → 1.18.5
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/CHANGELOG.md +8 -0
- package/dist/package-test.js +1 -1
- package/dist/package-test.js.map +1 -1
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/package.json +3 -3
- package/src/model.ts +0 -3
- package/src/tests/table-view.ts +0 -6
- package/src/utils/tooltips.ts +1 -31
- package/src/viewers/sar-viewer.ts +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datagrok/peptides",
|
|
3
3
|
"friendlyName": "Peptides",
|
|
4
|
-
"version": "1.18.
|
|
4
|
+
"version": "1.18.5",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Davit Rizhinashvili",
|
|
7
7
|
"email": "drizhinashvili@datagrok.ai"
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
"directory": "packages/Peptides"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@datagrok-libraries/bio": "^5.
|
|
16
|
+
"@datagrok-libraries/bio": "^5.44.5",
|
|
17
17
|
"@datagrok-libraries/math": "^1.2.0",
|
|
18
18
|
"@datagrok-libraries/ml": "^6.7.1",
|
|
19
19
|
"@datagrok-libraries/statistics": "^1.2.12",
|
|
20
|
-
"@datagrok-libraries/tutorials": "^1.4.
|
|
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",
|
package/src/model.ts
CHANGED
|
@@ -47,7 +47,6 @@ import {MmDistanceFunctionsNames}
|
|
|
47
47
|
import {ITSNEOptions, IUMAPOptions}
|
|
48
48
|
from '@datagrok-libraries/ml/src/multi-column-dimensionality-reduction/multi-column-dim-reducer';
|
|
49
49
|
import {DimReductionMethods} from '@datagrok-libraries/ml/src/multi-column-dimensionality-reduction/types';
|
|
50
|
-
import {showMonomerTooltip} from './utils/tooltips';
|
|
51
50
|
import {AggregationColumns, MonomerPositionStats} from './utils/statistics';
|
|
52
51
|
import {splitAlignedSequences} from '@datagrok-libraries/bio/src/utils/splitter';
|
|
53
52
|
import {getDbscanWorker} from '@datagrok-libraries/math';
|
|
@@ -743,8 +742,6 @@ export class PeptidesModel {
|
|
|
743
742
|
if (!(cell.isTableCell && cell.tableColumn?.semType === C.SEM_TYPES.MONOMER))
|
|
744
743
|
return false;
|
|
745
744
|
|
|
746
|
-
|
|
747
|
-
showMonomerTooltip(cell.cell.value, x, y);
|
|
748
745
|
return true;
|
|
749
746
|
});
|
|
750
747
|
}
|
package/src/tests/table-view.ts
CHANGED
|
@@ -8,7 +8,6 @@ import {initSelection, scaleActivity} from '../utils/misc';
|
|
|
8
8
|
import {NOTATION} from '@datagrok-libraries/bio/src/utils/macromolecule';
|
|
9
9
|
import {COLUMNS_NAMES, SCALING_METHODS} from '../utils/constants';
|
|
10
10
|
import {TEST_COLUMN_NAMES} from './utils';
|
|
11
|
-
import {showMonomerTooltip} from '../utils/tooltips';
|
|
12
11
|
import {CLUSTER_TYPE, LogoSummaryTable} from '../viewers/logo-summary';
|
|
13
12
|
import {MonomerPosition} from '../viewers/sar-viewer';
|
|
14
13
|
|
|
@@ -44,11 +43,6 @@ category('Table view', () => {
|
|
|
44
43
|
|
|
45
44
|
after(async () => await delay(3000));
|
|
46
45
|
|
|
47
|
-
test('Tooltip', async () => {
|
|
48
|
-
expect(showMonomerTooltip(firstPair.monomerOrCluster, 0, 0), true,
|
|
49
|
-
`Couldn't structure for monomer ${firstPair.monomerOrCluster}`);
|
|
50
|
-
}, {skipReason: 'Need to find a way to replace _package variable to call for Bio function with tests'});
|
|
51
|
-
|
|
52
46
|
test('Visible columns', async () => {
|
|
53
47
|
const gridCols = model.analysisView.grid.columns;
|
|
54
48
|
const posCols = model.positionColumns!.map((col) => col.name);
|
package/src/utils/tooltips.ts
CHANGED
|
@@ -7,7 +7,6 @@ import * as C from '../utils/constants';
|
|
|
7
7
|
|
|
8
8
|
import {getActivityDistribution, getStatsTableMap} from '../widgets/distribution';
|
|
9
9
|
import {getDistributionPanel, getDistributionTable} from './misc';
|
|
10
|
-
import {getMonomerWorksInstance} from '../package';
|
|
11
10
|
import {getAggregatedColumnValues, MonomerPositionStats} from './statistics';
|
|
12
11
|
import {StringDictionary} from '@datagrok-libraries/utils/src/type-declarations';
|
|
13
12
|
|
|
@@ -17,33 +16,6 @@ export type TooltipOptions = {
|
|
|
17
16
|
isMostPotentResidues?: boolean, cliffStats?: type.MutationCliffStats['stats']
|
|
18
17
|
};
|
|
19
18
|
|
|
20
|
-
/**
|
|
21
|
-
* Shows monomer tooltip at the given coordinates.
|
|
22
|
-
* @param monomer - Monomer symbol.
|
|
23
|
-
* @param x - X coordinate.
|
|
24
|
-
* @param y - Y coordinate.
|
|
25
|
-
* @return - Flag if the tooltip is shown.
|
|
26
|
-
*/
|
|
27
|
-
export function showMonomerTooltip(monomer: string, x: number, y: number): boolean {
|
|
28
|
-
const tooltipElements: HTMLDivElement[] = [];
|
|
29
|
-
const monomerName = monomer.toLowerCase();
|
|
30
|
-
const mw = getMonomerWorksInstance();
|
|
31
|
-
const mol = mw?.getCappedRotatedMonomer('PEPTIDE', monomer);
|
|
32
|
-
|
|
33
|
-
if (mol) {
|
|
34
|
-
tooltipElements.push(ui.div(monomerName));
|
|
35
|
-
const options = {autoCrop: true, autoCropMargin: 0, suppressChiralText: true};
|
|
36
|
-
tooltipElements.push(grok.chem.svgMol(mol, undefined, undefined, options));
|
|
37
|
-
} else if (monomer !== '')
|
|
38
|
-
tooltipElements.push(ui.div(monomer));
|
|
39
|
-
else
|
|
40
|
-
return true;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
ui.tooltip.show(ui.divV(tooltipElements), x, y);
|
|
44
|
-
return true;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
19
|
/**
|
|
48
20
|
* Shows tooltip at the given coordinates.
|
|
49
21
|
* @param df - Dataframe to show tooltip at.
|
|
@@ -57,9 +29,7 @@ export function showTooltip(df: DG.DataFrame, activityCol: DG.Column<number>, co
|
|
|
57
29
|
options.fromViewer ??= false;
|
|
58
30
|
options.isMutationCliffs ??= false;
|
|
59
31
|
options.isMostPotentResidues ??= false;
|
|
60
|
-
if (options.monomerPosition.positionOrClusterType
|
|
61
|
-
showMonomerTooltip(options.monomerPosition.monomerOrCluster, options.x, options.y);
|
|
62
|
-
else
|
|
32
|
+
if (options.monomerPosition.positionOrClusterType !== C.COLUMNS_NAMES.MONOMER)
|
|
63
33
|
showTooltipAt(df, activityCol, columns, options);
|
|
64
34
|
|
|
65
35
|
|