@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/CHANGELOG.md +16 -0
- package/dist/535.js +2 -2
- package/dist/package-test.js +2 -2
- package/dist/package.js +2 -2
- package/package.json +7 -7
- package/src/demo/fasta.ts +6 -25
- package/src/model.ts +275 -296
- package/src/package.ts +1 -1
- package/src/tests/core.ts +2 -10
- package/src/tests/table-view.ts +48 -48
- package/src/tests/viewers.ts +15 -13
- package/src/tests/widgets.ts +3 -4
- package/src/utils/cell-renderer.ts +33 -39
- package/src/utils/constants.ts +1 -0
- package/src/utils/misc.ts +2 -5
- package/src/utils/statistics.ts +22 -3
- package/src/utils/types.ts +6 -5
- package/src/viewers/logo-summary.ts +55 -42
- package/src/viewers/sar-viewer.ts +161 -107
- package/src/widgets/distribution.ts +60 -59
- package/src/widgets/mutation-cliffs.ts +2 -2
- package/src/widgets/peptides.ts +18 -11
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datagrok/peptides",
|
|
3
3
|
"friendlyName": "Peptides",
|
|
4
|
-
"version": "1.
|
|
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.
|
|
17
|
-
"@datagrok-libraries/ml": "^6.3.
|
|
18
|
-
"@datagrok-libraries/statistics": "^1.2.
|
|
19
|
-
"@datagrok-libraries/utils": "^4.1.
|
|
20
|
-
"@datagrok-libraries/tutorials": "^1.3.
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
}
|