@datagrok/peptides 1.23.0 → 1.23.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/CHANGELOG.md +4 -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 +2 -2
- package/src/widgets/mutation-cliffs.ts +6 -0
- package/src/widgets/selection.ts +8 -0
- package/test-console-output-1.log +915 -0
- package/test-record-1.mp4 +0 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datagrok/peptides",
|
|
3
3
|
"friendlyName": "Peptides",
|
|
4
|
-
"version": "1.23.
|
|
4
|
+
"version": "1.23.2",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Davit Rizhinashvili",
|
|
7
7
|
"email": "drizhinashvili@datagrok.ai"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@datagrok-libraries/math": "^1.2.5",
|
|
18
18
|
"@datagrok-libraries/ml": "^6.8.2",
|
|
19
19
|
"@datagrok-libraries/statistics": "^1.2.12",
|
|
20
|
-
"@datagrok-libraries/tutorials": "^1.
|
|
20
|
+
"@datagrok-libraries/tutorials": "^1.6.1",
|
|
21
21
|
"@datagrok-libraries/utils": "^4.4.0",
|
|
22
22
|
"datagrok-api": "^1.23.0",
|
|
23
23
|
"@webgpu/types": "^0.1.40",
|
|
@@ -4,6 +4,7 @@ import * as C from '../utils/constants';
|
|
|
4
4
|
import * as type from '../utils/types';
|
|
5
5
|
import {addExpandIconGen, getSeparator, setGridProps} from '../utils/misc';
|
|
6
6
|
import {renderCellSelection} from '../utils/cell-renderer';
|
|
7
|
+
import {SeqTemps} from '@datagrok-libraries/bio/src/utils/macromolecule/seq-handler';
|
|
7
8
|
|
|
8
9
|
export type MutationCliffsOptions = {
|
|
9
10
|
mutationCliffs: type.MutationCliffs, mutationCliffsSelection: type.Selection, sequenceColumnName: string,
|
|
@@ -177,6 +178,7 @@ function cliffsPairsWidgetParts(table: DG.DataFrame, options: MutationCliffsOpti
|
|
|
177
178
|
substCol.tags[C.TAGS.SEPARATOR] = getSeparator(alignedSeqCol);
|
|
178
179
|
substCol.tags[DG.TAGS.UNITS] = alignedSeqCol.tags[DG.TAGS.UNITS];
|
|
179
180
|
substCol.tags[DG.TAGS.CELL_RENDERER] = 'MacromoleculeDifference';
|
|
181
|
+
substCol.temp[SeqTemps.notationProvider] = alignedSeqCol.temp[SeqTemps.notationProvider];
|
|
180
182
|
|
|
181
183
|
let keyPress = false;
|
|
182
184
|
let lastSelectedIndex: number | null = null;
|
|
@@ -257,6 +259,10 @@ function cliffsPairsWidgetParts(table: DG.DataFrame, options: MutationCliffsOpti
|
|
|
257
259
|
uniqueSequencesTable.name = 'Unique sequences that form Mutation Cliffs pairs';
|
|
258
260
|
const seqIdxCol = uniqueSequencesTable.columns.addNewInt('~seqIdx');
|
|
259
261
|
const seqIdxColData = seqIdxCol.getRawData();
|
|
262
|
+
if (uniqueSequencesTable.col(options.sequenceColumnName)) {
|
|
263
|
+
uniqueSequencesTable.col(options.sequenceColumnName)!.temp[SeqTemps.notationProvider] =
|
|
264
|
+
alignedSeqCol.temp[SeqTemps.notationProvider];
|
|
265
|
+
}
|
|
260
266
|
const selectedIndexes = uniqueSequencesBitSet.getSelectedIndexes();
|
|
261
267
|
seqIdxCol.init((idx) => selectedIndexes[idx]);
|
|
262
268
|
const uniqueSequencesGrid = uniqueSequencesTable.plot.grid();
|
package/src/widgets/selection.ts
CHANGED
|
@@ -9,6 +9,7 @@ import {TooltipOptions} from '../utils/tooltips';
|
|
|
9
9
|
import {calculateMonomerPositionStatistics} from '../utils/algorithms';
|
|
10
10
|
import {AggregationColumns} from '../utils/statistics';
|
|
11
11
|
import {SeqPalette} from '@datagrok-libraries/bio/src/seq-palettes';
|
|
12
|
+
import {SeqTemps} from '@datagrok-libraries/bio/src/utils/macromolecule/seq-handler';
|
|
12
13
|
|
|
13
14
|
export type SelectionWidgetOptions = {
|
|
14
15
|
tableSelection: DG.BitSet, gridColumns: DG.GridColumnList, positionColumns: DG.Column<string>[],
|
|
@@ -123,5 +124,12 @@ export function getSelectionWidget(table: DG.DataFrame, options: SelectionWidget
|
|
|
123
124
|
tooltipOptions);
|
|
124
125
|
}
|
|
125
126
|
|
|
127
|
+
(table.columns.bySemTypeAll(DG.SEMTYPE.MACROMOLECULE) ?? []).forEach(
|
|
128
|
+
(col) => {
|
|
129
|
+
if (newTable.col(col.name))
|
|
130
|
+
newTable.col(col.name)!.temp[SeqTemps.notationProvider] = col.temp[SeqTemps.notationProvider];
|
|
131
|
+
},
|
|
132
|
+
);
|
|
133
|
+
|
|
126
134
|
return gridHost;
|
|
127
135
|
}
|