@datagrok/peptides 1.23.1 → 1.23.3
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 +1 -1
- package/src/widgets/mutation-cliffs.ts +6 -0
- package/src/widgets/selection.ts +9 -3
- package/test-console-output-1.log +58 -58
- package/test-record-1.mp4 +0 -0
package/package.json
CHANGED
|
@@ -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>[],
|
|
@@ -29,7 +30,6 @@ export function getSelectionWidget(table: DG.DataFrame, options: SelectionWidget
|
|
|
29
30
|
const newTable = DG.DataFrame.create(table.rowCount);
|
|
30
31
|
newTable.name = 'Selected compounds';
|
|
31
32
|
newTable.filter.copyFrom(options.tableSelection);
|
|
32
|
-
const numericalCols = wu(table.columns.numerical);
|
|
33
33
|
let gridSortOrder: {cols: DG.Column[], types: boolean[]} | null = null;
|
|
34
34
|
for (let gridColIdx = 1; gridColIdx < options.gridColumns.length; gridColIdx++) {
|
|
35
35
|
const gridCol = options.gridColumns.byIndex(gridColIdx)!;
|
|
@@ -58,8 +58,7 @@ export function getSelectionWidget(table: DG.DataFrame, options: SelectionWidget
|
|
|
58
58
|
}
|
|
59
59
|
const getValue = !sourceColRawData || !sourceColCategories ?
|
|
60
60
|
(i: number): any => sourceCol.get(i) :
|
|
61
|
-
|
|
62
|
-
.some((col) => col.name === sourceCol.name) ? (i: number): number => sourceColRawData[i] :
|
|
61
|
+
sourceCol.isNumerical ? (i: number): number => sourceColRawData[i] :
|
|
63
62
|
(i: number): string => sourceColCategories[sourceColRawData[i]];
|
|
64
63
|
const col = sourceCol.name === options.activityColumn.name ?
|
|
65
64
|
newTable.columns.addNewFloat(gridCol.name).init((i) => getValue(i) as number) :
|
|
@@ -123,5 +122,12 @@ export function getSelectionWidget(table: DG.DataFrame, options: SelectionWidget
|
|
|
123
122
|
tooltipOptions);
|
|
124
123
|
}
|
|
125
124
|
|
|
125
|
+
(table.columns.bySemTypeAll(DG.SEMTYPE.MACROMOLECULE) ?? []).forEach(
|
|
126
|
+
(col) => {
|
|
127
|
+
if (newTable.col(col.name))
|
|
128
|
+
newTable.col(col.name)!.temp[SeqTemps.notationProvider] = col.temp[SeqTemps.notationProvider];
|
|
129
|
+
},
|
|
130
|
+
);
|
|
131
|
+
|
|
126
132
|
return gridHost;
|
|
127
133
|
}
|