@datagrok/peptides 1.22.0 → 1.22.1
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/README.md +6 -13
- 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 +1 -1
- package/src/model.ts +2 -3
- package/src/utils/cell-renderer.ts +0 -1
- package/src/utils/tooltips.ts +2 -2
- package/src/viewers/logo-summary.ts +3 -7
- package/src/viewers/sar-viewer.ts +0 -17
- package/src/widgets/distribution.ts +1 -1
- package/test-console-output-1.log +189 -126
- package/test-record-1.mp4 +0 -0
- package/files/help/logo-summary-table.md +0 -23
- package/files/help/monomer-position.md +0 -31
- package/files/help/most-potent-residues.md +0 -17
package/package.json
CHANGED
package/src/model.ts
CHANGED
|
@@ -14,7 +14,6 @@ import {DistanceMatrix} from '@datagrok-libraries/ml/src/distance-matrix';
|
|
|
14
14
|
import {BitArrayMetrics} from '@datagrok-libraries/ml/src/typed-metrics';
|
|
15
15
|
import {TAGS as _treeTAGS} from '@datagrok-libraries/bio/src/trees';
|
|
16
16
|
import BitArray from '@datagrok-libraries/utils/src/bit-array';
|
|
17
|
-
import {getSeqHelper} from '@datagrok-libraries/bio/src/utils/seq-helper';
|
|
18
17
|
import wu from 'wu';
|
|
19
18
|
import * as rxjs from 'rxjs';
|
|
20
19
|
import $ from 'cash-dom';
|
|
@@ -790,7 +789,7 @@ export class PeptidesModel {
|
|
|
790
789
|
* Sets tooltips to analysis grid
|
|
791
790
|
*/
|
|
792
791
|
setTooltips(): void {
|
|
793
|
-
this.analysisView.grid.onCellTooltip((cell,
|
|
792
|
+
this.analysisView.grid.onCellTooltip((cell, _x, _y) => {
|
|
794
793
|
if (cell.isColHeader && cell.tableColumn?.semType === C.SEM_TYPES.MONOMER)
|
|
795
794
|
return true;
|
|
796
795
|
|
|
@@ -862,7 +861,7 @@ export class PeptidesModel {
|
|
|
862
861
|
}
|
|
863
862
|
}
|
|
864
863
|
|
|
865
|
-
return DG.BitSet.fromBytes(combinedSelection.buffer.buffer, combinedSelection.length);
|
|
864
|
+
return DG.BitSet.fromBytes(combinedSelection.buffer.buffer as ArrayBuffer, combinedSelection.length);
|
|
866
865
|
}
|
|
867
866
|
|
|
868
867
|
|
|
@@ -13,7 +13,6 @@ import {MonomerPositionStats, MonomerPositionStatsCache, PositionStats} from './
|
|
|
13
13
|
import {CLUSTER_TYPE} from '../viewers/logo-summary';
|
|
14
14
|
import {MonomerPosition, MostPotentResidues, SARViewer} from '../viewers/sar-viewer';
|
|
15
15
|
import {MONOMER_RENDERER_TAGS} from '@datagrok-libraries/bio/src/utils/cell-renderer';
|
|
16
|
-
import {getMonomerLibHelper} from '@datagrok-libraries/bio/src/monomer-works/monomer-utils';
|
|
17
16
|
import {PeptideUtils} from '../peptideUtils';
|
|
18
17
|
import {HelmTypes} from '@datagrok-libraries/bio/src/helm/consts';
|
|
19
18
|
|
package/src/utils/tooltips.ts
CHANGED
|
@@ -59,7 +59,7 @@ export function showTooltipAt(df: DG.DataFrame, activityCol: DG.Column<number>,
|
|
|
59
59
|
return null;
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
const mask = DG.BitSet.fromBytes(stats.mask.buffer.buffer, activityCol.length);
|
|
62
|
+
const mask = DG.BitSet.fromBytes(stats.mask.buffer.buffer as ArrayBuffer, activityCol.length);
|
|
63
63
|
const hist = getActivityDistribution(getDistributionTable(activityCol, mask), true);
|
|
64
64
|
const tableMap = getStatsTableMap(stats);
|
|
65
65
|
if (options.fromViewer) {
|
|
@@ -82,7 +82,7 @@ export function showTooltipAt(df: DG.DataFrame, activityCol: DG.Column<number>,
|
|
|
82
82
|
;
|
|
83
83
|
if (!stats)
|
|
84
84
|
return null;
|
|
85
|
-
const mask = DG.BitSet.fromBytes(stats.mask.buffer.buffer, activityCol.length);
|
|
85
|
+
const mask = DG.BitSet.fromBytes(stats.mask.buffer.buffer as ArrayBuffer, activityCol.length);
|
|
86
86
|
const hist = getActivityDistribution(getDistributionTable(activityCol, mask), true);
|
|
87
87
|
const tableMap = getStatsTableMap(stats, {countName: 'Unique count'});
|
|
88
88
|
if (options.fromViewer) {
|
|
@@ -491,7 +491,7 @@ export class LogoSummaryTable extends DG.JsViewer implements ILogoSummaryTable {
|
|
|
491
491
|
continue;
|
|
492
492
|
|
|
493
493
|
|
|
494
|
-
const bsMask = DG.BitSet.fromBytes(bitArray.buffer.buffer, filteredDfRowCount);
|
|
494
|
+
const bsMask = DG.BitSet.fromBytes(bitArray.buffer.buffer as ArrayBuffer, filteredDfRowCount);
|
|
495
495
|
|
|
496
496
|
const stats: StatsItem = isDfFiltered ? getStats(activityColData, bitArray) :
|
|
497
497
|
this.clusterStats[CLUSTER_TYPE.CUSTOM][customClustCol.name];
|
|
@@ -552,7 +552,7 @@ export class LogoSummaryTable extends DG.JsViewer implements ILogoSummaryTable {
|
|
|
552
552
|
continue;
|
|
553
553
|
|
|
554
554
|
|
|
555
|
-
const bsMask = DG.BitSet.fromBytes(mask.buffer.buffer, filteredDfRowCount);
|
|
555
|
+
const bsMask = DG.BitSet.fromBytes(mask.buffer.buffer as ArrayBuffer, filteredDfRowCount);
|
|
556
556
|
const stats = isDfFiltered ? getStats(activityColData, mask) :
|
|
557
557
|
this.clusterStats[CLUSTER_TYPE.ORIGINAL][origLSTClustColCat[rowIdx]];
|
|
558
558
|
for (let aggColIdx = 0; aggColIdx < aggStringColNames.length; ++aggColIdx) {
|
|
@@ -777,10 +777,6 @@ export class LogoSummaryTable extends DG.JsViewer implements ILogoSummaryTable {
|
|
|
777
777
|
ctrlPressed: ev.ctrlKey,
|
|
778
778
|
});
|
|
779
779
|
grid.invalidate();
|
|
780
|
-
|
|
781
|
-
_package.files.readAsText('help/logo-summary-table.md').then((text) => {
|
|
782
|
-
grok.shell.windows.help.showHelp(ui.markdown(text));
|
|
783
|
-
}).catch((e) => grok.log.error(e));
|
|
784
780
|
});
|
|
785
781
|
grid.onCellTooltip((gridCell, x, y) => {
|
|
786
782
|
if (!gridCell.isTableCell) {
|
|
@@ -1003,7 +999,7 @@ export class LogoSummaryTable extends DG.JsViewer implements ILogoSummaryTable {
|
|
|
1003
999
|
return null;
|
|
1004
1000
|
|
|
1005
1001
|
|
|
1006
|
-
const mask = DG.BitSet.fromBytes(bitArray.buffer.buffer, rowCount);
|
|
1002
|
+
const mask = DG.BitSet.fromBytes(bitArray.buffer.buffer as ArrayBuffer, rowCount);
|
|
1007
1003
|
const distributionTable = getDistributionTable(activityCol, mask);
|
|
1008
1004
|
const hist = getActivityDistribution(distributionTable, true);
|
|
1009
1005
|
const tableMap = getStatsTableMap(stats);
|
|
@@ -572,7 +572,6 @@ export abstract class SARViewer extends DG.JsViewer implements ISARViewer {
|
|
|
572
572
|
/** Processes attached table and sets viewer properties. */
|
|
573
573
|
onTableAttached(): void {
|
|
574
574
|
super.onTableAttached();
|
|
575
|
-
this.helpUrl = 'https://datagrok.ai/help/datagrok/solutions/domains/bio/peptides-sar';
|
|
576
575
|
if (isApplicableDataframe(this.dataFrame)) {
|
|
577
576
|
this.getProperty(`${SAR_PROPERTIES.SEQUENCE}${COLUMN_NAME}`)
|
|
578
577
|
?.set(this, this.dataFrame.columns.bySemType(DG.SEMTYPE.MACROMOLECULE)!.name);
|
|
@@ -1008,8 +1007,6 @@ export class MonomerPosition extends SARViewer {
|
|
|
1008
1007
|
}
|
|
1009
1008
|
}
|
|
1010
1009
|
grid.invalidate();
|
|
1011
|
-
|
|
1012
|
-
this.showHelp();
|
|
1013
1010
|
});
|
|
1014
1011
|
|
|
1015
1012
|
setViewerGridProps(grid);
|
|
@@ -1031,13 +1028,6 @@ export class MonomerPosition extends SARViewer {
|
|
|
1031
1028
|
return grid;
|
|
1032
1029
|
}
|
|
1033
1030
|
|
|
1034
|
-
/** Shows viewer context help. */
|
|
1035
|
-
showHelp(): void {
|
|
1036
|
-
_package.files.readAsText('help/monomer-position.md').then((text) => {
|
|
1037
|
-
grok.shell.windows.help.showHelp(ui.markdown(text));
|
|
1038
|
-
}).catch((e) => grok.log.error(e));
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
1031
|
/**
|
|
1042
1032
|
* Gets monomer-position from MonomerPosition grid cell.
|
|
1043
1033
|
* @param gridCell - MonomerPosition grid cell.
|
|
@@ -1074,7 +1064,6 @@ export class MonomerPosition extends SARViewer {
|
|
|
1074
1064
|
invariantMapMode.value = false;
|
|
1075
1065
|
mutationCliffsMode.value = true;
|
|
1076
1066
|
this.mode = SELECTION_MODE.MUTATION_CLIFFS;
|
|
1077
|
-
this.showHelp();
|
|
1078
1067
|
});
|
|
1079
1068
|
mutationCliffsMode.setTooltip('Statistically significant changes in activity');
|
|
1080
1069
|
const invariantMapMode = ui.input.bool(SELECTION_MODE.INVARIANT_MAP, {value: this.mode === SELECTION_MODE.INVARIANT_MAP});
|
|
@@ -1082,7 +1071,6 @@ export class MonomerPosition extends SARViewer {
|
|
|
1082
1071
|
mutationCliffsMode.value = false;
|
|
1083
1072
|
invariantMapMode.value = true;
|
|
1084
1073
|
this.mode = SELECTION_MODE.INVARIANT_MAP;
|
|
1085
|
-
this.showHelp();
|
|
1086
1074
|
});
|
|
1087
1075
|
invariantMapMode.setTooltip('Number of sequences having monomer-position');
|
|
1088
1076
|
const setDefaultProperties = (input: DG.InputBase): void => {
|
|
@@ -1136,7 +1124,6 @@ export class MostPotentResidues extends SARViewer {
|
|
|
1136
1124
|
/** Processes attached table and sets viewer properties. */
|
|
1137
1125
|
onTableAttached(): void {
|
|
1138
1126
|
super.onTableAttached();
|
|
1139
|
-
this.helpUrl = 'https://datagrok.ai/help/datagrok/solutions/domains/bio/peptides-sar';
|
|
1140
1127
|
this.render();
|
|
1141
1128
|
}
|
|
1142
1129
|
|
|
@@ -1361,10 +1348,6 @@ export class MostPotentResidues extends SARViewer {
|
|
|
1361
1348
|
|
|
1362
1349
|
this.modifyInvariantMapSelection(monomerPosition, {shiftPressed: ev.shiftKey, ctrlPressed: ev.ctrlKey});
|
|
1363
1350
|
grid.invalidate();
|
|
1364
|
-
|
|
1365
|
-
_package.files.readAsText('help/most-potent-residues.md').then((text) => {
|
|
1366
|
-
grok.shell.windows.help.showHelp(ui.markdown(text));
|
|
1367
|
-
}).catch((e) => grok.log.error(e));
|
|
1368
1351
|
});
|
|
1369
1352
|
|
|
1370
1353
|
setViewerGridProps(grid);
|
|
@@ -146,7 +146,7 @@ function getSingleDistribution(table: DG.DataFrame, stats: StatsItem, options: D
|
|
|
146
146
|
const hist = getActivityDistribution(getDistributionTable(options.activityCol, table.selection,
|
|
147
147
|
options.peptideSelection));
|
|
148
148
|
const aggregatedColMap = getAggregatedColumnValues(table, Object.entries(options.columns),
|
|
149
|
-
{filterDf: true, mask: DG.BitSet.fromBytes(stats.mask.buffer.buffer, stats.mask.length)});
|
|
149
|
+
{filterDf: true, mask: DG.BitSet.fromBytes(stats.mask.buffer.buffer as ArrayBuffer, stats.mask.length)});
|
|
150
150
|
const tableMap = getStatsTableMap(stats);
|
|
151
151
|
const resultMap: { [key: string]: any } = {...tableMap, ...aggregatedColMap};
|
|
152
152
|
const distributionRoot = getDistributionPanel(hist, resultMap, labelMap);
|