@datagrok/peptides 1.17.21 → 1.17.23

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.
@@ -118,17 +118,18 @@ export function getActivityDistribution(
118
118
  * @param options.fractionDigits - Number of fraction digits for stats values
119
119
  * @return - Stats table map
120
120
  */
121
- export function getStatsTableMap(stats: StatsItem, options: { fractionDigits?: number } = {}): StringDictionary {
121
+ export function getStatsTableMap(stats: StatsItem,
122
+ options: { fractionDigits?: number } = {},
123
+ ): StringDictionary {
122
124
  options.fractionDigits ??= 3;
123
125
  const tableMap: StringDictionary = {
124
- 'Count': `${stats.count} (${stats.ratio.toFixed(options.fractionDigits)}%)`,
126
+ 'Count': `${stats.count} (${(stats.ratio * 100).toFixed(options.fractionDigits)}%)`,
125
127
  'Mean difference': stats.meanDifference.toFixed(options.fractionDigits),
126
128
  'Mean activity': stats.mean.toFixed(options.fractionDigits),
127
129
  };
128
- if (stats.pValue !== null)
130
+ if (stats.pValue != null)
129
131
  tableMap['p-value'] = stats.pValue < 0.01 ? '<0.01' : stats.pValue.toFixed(options.fractionDigits);
130
132
 
131
-
132
133
  return tableMap;
133
134
  }
134
135
 
@@ -243,6 +243,9 @@ function cliffsPairsWidgetParts(table: DG.DataFrame, options: MutationCliffsOpti
243
243
  pairsGrid.root.style.setProperty('width', '100%');
244
244
  uniqueSequencesGrid.root.style.removeProperty('width');
245
245
  uniqueSequencesGrid.root.style.setProperty('width', '100%');
246
+ pairsGrid.root.style.minHeight = '250px';
247
+ uniqueSequencesGrid.root.style.minHeight = '250px';
246
248
  }, 200);
249
+
247
250
  return {pairsGrid, uniqueSequencesGrid, aminoToInput};
248
251
  }
@@ -1,3 +1,4 @@
1
+ /* eslint-disable max-len */
1
2
  import * as ui from 'datagrok-api/ui';
2
3
  import * as grok from 'datagrok-api/grok';
3
4
  import * as DG from 'datagrok-api/dg';
@@ -11,7 +12,7 @@ import wu from 'wu';
11
12
  import {getTreeHelperInstance} from '../package';
12
13
  import {
13
14
  MmDistanceFunctionsNames,
14
- MmDistanceFunctionsNames as distFNames
15
+ MmDistanceFunctionsNames as distFNames,
15
16
  } from '@datagrok-libraries/ml/src/macromolecule-distance-functions';
16
17
 
17
18
  type PaneInputs = { [paneName: string]: DG.InputBase[] };
@@ -130,7 +131,7 @@ export function getSettingsDialog(model: PeptidesModel): SettingsElements {
130
131
  }
131
132
  if (result.showSequenceSpace === settings?.showSequenceSpace)
132
133
  delete result.showSequenceSpace;
133
- }});
134
+ }});
134
135
  clusterMaxActivity.setTooltip('Show cluster max activity viewer');
135
136
  dendrogram.setTooltip('Show dendrogram viewer');
136
137
  dendrogram.enabled = getTreeHelperInstance() !== null;
@@ -215,7 +216,7 @@ export function getSettingsDialog(model: PeptidesModel): SettingsElements {
215
216
  // SEQ SPACE INPUTS
216
217
  const distanceFunctionInput: DG.ChoiceInput<MmDistanceFunctionsNames> = ui.input.choice(SEQUENCE_SPACE_INPUTS.DISTANCE_FUNCTION,
217
218
  {value: seqSpaceParams.distanceF, items: [distFNames.NEEDLEMANN_WUNSCH, distFNames.HAMMING, distFNames.LEVENSHTEIN, distFNames.MONOMER_CHEMICAL_DISTANCE],
218
- onValueChanged: () => onSeqSpaceParamsChange('distanceF', distanceFunctionInput.value)}) as DG.ChoiceInput<MmDistanceFunctionsNames>
219
+ onValueChanged: () => onSeqSpaceParamsChange('distanceF', distanceFunctionInput.value)}) as DG.ChoiceInput<MmDistanceFunctionsNames>;
219
220
  distanceFunctionInput.setTooltip('Distance function for sequences');
220
221
  const gapOpenInput = ui.input.float(SEQUENCE_SPACE_INPUTS.GAP_OPEN, {value: seqSpaceParams.gapOpen,
221
222
  onValueChanged: () => onSeqSpaceParamsChange('gapOpen', gapOpenInput.value)});
@@ -276,7 +277,7 @@ export function getSettingsDialog(model: PeptidesModel): SettingsElements {
276
277
 
277
278
  const mclDistanceFunctionInput: DG.ChoiceInput<MmDistanceFunctionsNames> = ui.input.choice(MCL_INPUTS.DISTANCE_FUNCTION,
278
279
  {value: mclParams.distanceF, items: [distFNames.NEEDLEMANN_WUNSCH, distFNames.MONOMER_CHEMICAL_DISTANCE, distFNames.HAMMING, distFNames.LEVENSHTEIN],
279
- onValueChanged: () => onMCLParamsChange('distanceF', mclDistanceFunctionInput.value)}) as DG.ChoiceInput<MmDistanceFunctionsNames>;
280
+ onValueChanged: () => onMCLParamsChange('distanceF', mclDistanceFunctionInput.value)}) as DG.ChoiceInput<MmDistanceFunctionsNames>;
280
281
  const mclGapOpenInput = ui.input.float(MCL_INPUTS.GAP_OPEN, {value: mclParams.gapOpen,
281
282
  onValueChanged: () => onMCLParamsChange('gapOpen', mclGapOpenInput.value)});
282
283
  const mclGapExtendInput = ui.input.float(MCL_INPUTS.GAP_EXTEND, {value: mclParams.gapExtend,
package/tsconfig.json CHANGED
@@ -12,7 +12,7 @@
12
12
  // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */
13
13
  // "declaration": true, /* Generates corresponding '.d.ts' file. */
14
14
  // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
15
- // "sourceMap": true, /* Generates corresponding '.map' file. */
15
+ "sourceMap": true, /* Generates corresponding '.map' file. */
16
16
  // "outFile": "./", /* Concatenate and emit output to single file. */
17
17
  // "outDir": "./", /* Redirect output structure to the directory. */
18
18
  // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
@@ -57,8 +57,8 @@
57
57
  /* Source Map Options */
58
58
  "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
59
59
  "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
60
- "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
61
- "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
60
+ // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
61
+ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
62
62
 
63
63
  /* Experimental Options */
64
64
  // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
package/webpack.config.js CHANGED
@@ -34,7 +34,7 @@ module.exports = {
34
34
  resolve: {
35
35
  extensions: ['.mjs', '.ts', '.js', '.json', '.tsx'],
36
36
  },
37
- devtool: 'inline-source-map',
37
+ devtool: 'source-map',
38
38
  externals: {
39
39
  'datagrok-api/dg': 'DG',
40
40
  'datagrok-api/grok': 'grok',