@datagrok/peptides 1.12.0 → 1.13.0

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@datagrok/peptides",
3
3
  "friendlyName": "Peptides",
4
- "version": "1.12.0",
4
+ "version": "1.13.0",
5
5
  "author": {
6
6
  "name": "Volodymyr Dyma",
7
7
  "email": "vdyma@datagrok.ai"
@@ -13,13 +13,13 @@
13
13
  "directory": "packages/Peptides"
14
14
  },
15
15
  "dependencies": {
16
- "@datagrok-libraries/bio": "^5.37.0",
17
- "@datagrok-libraries/ml": "^6.3.39",
18
- "@datagrok-libraries/statistics": "^1.2.2",
19
- "@datagrok-libraries/utils": "^4.1.4",
20
- "@datagrok-libraries/tutorials": "^1.3.6",
16
+ "@datagrok-libraries/bio": "^5.38.2",
17
+ "@datagrok-libraries/ml": "^6.3.40",
18
+ "@datagrok-libraries/statistics": "^1.2.7",
19
+ "@datagrok-libraries/utils": "^4.1.13",
20
+ "@datagrok-libraries/tutorials": "^1.3.7",
21
21
  "cash-dom": "^8.1.5",
22
- "datagrok-api": "^1.16.1",
22
+ "datagrok-api": "^1.16.5",
23
23
  "file-loader": "^6.2.0",
24
24
  "rxjs": "^6.5.5",
25
25
  "wu": "latest",
package/src/demo/fasta.ts CHANGED
@@ -6,11 +6,10 @@ import {startAnalysis} from '../widgets/peptides';
6
6
  import * as C from '../utils/constants';
7
7
  import {scaleActivity} from '../utils/misc';
8
8
  import {ALIGNMENT, ALPHABET, NOTATION, TAGS as bioTAGS} from '@datagrok-libraries/bio/src/utils/macromolecule';
9
- import {DemoScript} from '@datagrok-libraries/tutorials/src/demo-script';
10
9
  import {PeptidesModel} from '../model';
11
10
 
12
11
  export async function macromoleculeSarFastaDemoUI(): Promise<void> {
13
- const demo = new DemoScript('Macromolecule SAR analysis', '');
12
+ grok.shell.windows.showContextPanel = true;
14
13
  const alignedSequenceCol = 'AlignedSequence';
15
14
  const simpleActivityColName = 'IC50';
16
15
  const simpleTable = DG.DataFrame.fromCsv(await _package.files.readAsText('aligned.csv'));
@@ -21,27 +20,9 @@ export async function macromoleculeSarFastaDemoUI(): Promise<void> {
21
20
  simpleAlignedSeqCol.setTag(DG.TAGS.UNITS, NOTATION.FASTA);
22
21
  simpleAlignedSeqCol.setTag(bioTAGS.aligned, ALIGNMENT.SEQ_MSA);
23
22
  const simpleScaledCol = scaleActivity(simpleActivityCol, C.SCALING_METHODS.MINUS_LG);
24
-
25
- demo.step('Load data', async () => {grok.shell.addTableView(simpleTable);},
26
- {description: 'Load the dataset containing macromolecule sequences. Notice how Datagrok detects macromolecules ' +
27
- 'and applies renderer for better visual understanding of the data', delay: 2000});
28
-
29
- let alignedCol: DG.Column<string>;
30
- demo.step('Align sequences', async () => {
31
- const clustersCol = DG.Column.string('Cluster', simpleTable.rowCount).init('0');
32
- alignedCol = await grok.functions.call('Bio:alignSequences', {sequenceCol: simpleAlignedSeqCol, clustersCol});
33
- }, {description: 'Align sequences with our Multiple Sequence Alignment tool. This tool can be found in the top ' +
34
- 'menu Bio -> Alignment -> MSA... New msa column will be added to the table', delay: 2000});
35
-
36
- let model: PeptidesModel;
37
- demo.step('Run SAR analysis', async () => {
38
- model = await startAnalysis(simpleActivityCol, alignedCol, null, simpleTable, simpleScaledCol,
39
- C.SCALING_METHODS.MINUS_LG) as PeptidesModel;
40
- model.analysisView.addViewer('WebLogo');
41
- }, {description: 'Run SAR analysis on aligned sequences from top menu: Bio -> SAR -> Peptides...', delay: 2000});
42
-
43
- demo.step('Browse Mutation Cliffs', async () => {model.modifyMonomerPositionSelection('D', '13', false);},
44
- {description: 'Browse Mutation Cliffs by selecting corresponding cells in Mutation Cliffs viewer in the bottom',
45
- delay: 2000});
46
- await demo.start();
23
+ const clustersCol = DG.Column.string('Cluster', simpleTable.rowCount).init('0');
24
+ const alignedCol: DG.Column<string> = await grok.functions.call('Bio:alignSequences', {sequenceCol: simpleAlignedSeqCol, clustersCol});
25
+ const model: PeptidesModel = await startAnalysis(simpleActivityCol, alignedCol, null, simpleTable, simpleScaledCol,
26
+ C.SCALING_METHODS.MINUS_LG) as PeptidesModel;
27
+ model.modifyMutationCliffsSelection({monomerOrCluster: 'D', positionOrClusterType: '13'});
47
28
  }