@datagrok/helm 1.0.4 → 1.0.8
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.
|
File without changes
|
package/package.json
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
"name": "@datagrok/helm",
|
|
3
3
|
"beta": false,
|
|
4
4
|
"friendlyName": "Helm",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.8",
|
|
6
6
|
"description": "",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"datagrok-api": "^1.4.12",
|
|
9
9
|
"cash-dom": "latest",
|
|
10
10
|
"dayjs": "latest",
|
|
11
11
|
"@datagrok-libraries/utils": "latest",
|
|
12
|
-
"@datagrok-libraries/bio": "^2.8.
|
|
12
|
+
"@datagrok-libraries/bio": "^2.8.4",
|
|
13
13
|
"ts-loader": "^9.2.5",
|
|
14
14
|
"typescript": "^4.4.2"
|
|
15
15
|
},
|
package/src/package.ts
CHANGED
|
@@ -67,7 +67,7 @@ export function editMoleculeCell(cell: DG.GridCell): void {
|
|
|
67
67
|
}).show({modal: true, fullScreen: true});
|
|
68
68
|
} else if (cell.gridColumn.column.tags[DG.TAGS.UNITS] === 'fasta:SEQ:PT') {
|
|
69
69
|
const converter = new NotationConverter(cell.gridColumn.column);
|
|
70
|
-
const resStr = converter.convertStringToHelm(cell.cell.value, '-'
|
|
70
|
+
const resStr = converter.convertStringToHelm(cell.cell.value, '-');
|
|
71
71
|
setTimeout(function() {
|
|
72
72
|
app.canvas.helm.setSequence(resStr, 'HELM');
|
|
73
73
|
}, 200);
|
|
@@ -102,12 +102,8 @@ export function detailsPanel(helmString: string) {
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
|
|
105
|
-
async function loadDialog() {
|
|
106
|
-
|
|
107
|
-
let res = await grok.dapi.files.list('System:AppData/Helm/libraries', false, '');
|
|
108
|
-
//@ts-ignore
|
|
109
|
-
res = res.map((e) => e.path);
|
|
110
|
-
//@ts-ignore
|
|
105
|
+
async function loadDialog () {
|
|
106
|
+
let res = (await _package.files.list(`${LIB_PATH}`, false, '')).map(it => it.fileName);
|
|
111
107
|
let FilesList = await ui.choiceInput('Monomer Libraries', ' ', res);
|
|
112
108
|
let grid = grok.shell.tv.grid;
|
|
113
109
|
ui.dialog('Load library from file')
|
|
@@ -128,7 +124,7 @@ export async function libraryPanel(helmColumn: DG.Column) {
|
|
|
128
124
|
//@ts-ignore
|
|
129
125
|
let loadButton = ui.button('Load Library');
|
|
130
126
|
loadButton.addEventListener('click', loadDialog);
|
|
131
|
-
let list = (await
|
|
127
|
+
let list = (await _package.files.list(`${LIB_PATH}`, false, '')).map(it => it.fileName);
|
|
132
128
|
let usedLibraries = [];
|
|
133
129
|
for (let j = 0; j <= i; j++) {
|
|
134
130
|
usedLibraries.push(await grok.dapi.userDataStorage.getValue(STORAGE_NAME, j.toString(), true));
|
|
@@ -216,14 +212,13 @@ function getRS(smiles: string) {
|
|
|
216
212
|
|
|
217
213
|
async function monomerManager(value: string) {
|
|
218
214
|
let df: any[];
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
const file = await _package.files.readAsBytes(`${LIB_PATH}${libName}`);
|
|
215
|
+
if(value.endsWith('.sdf')) {
|
|
216
|
+
const file = await _package.files.readAsBytes(`${LIB_PATH}${value}`);
|
|
222
217
|
const dfSdf = await grok.functions.call('Chem:importSdf', {bytes: file});
|
|
223
218
|
df = createJsonMonomerLibFromSdf(dfSdf[0]);
|
|
224
219
|
|
|
225
220
|
} else {
|
|
226
|
-
const file = await _package.files.readAsText(`${LIB_PATH}${
|
|
221
|
+
const file = await _package.files.readAsText(`${LIB_PATH}${value}`);
|
|
227
222
|
df = JSON.parse(file);
|
|
228
223
|
}
|
|
229
224
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<html><head><meta charset="utf-8"/><title>Helm Test Report. Datagrok version datagrok/datagrok:latest SHA=34f75e5127b8. Commit
|
|
1
|
+
<html><head><meta charset="utf-8"/><title>Helm Test Report. Datagrok version datagrok/datagrok:latest SHA=34f75e5127b8. Commit d924c408.</title><style type="text/css">html,
|
|
2
2
|
body {
|
|
3
3
|
font-family: Arial, Helvetica, sans-serif;
|
|
4
4
|
font-size: 1rem;
|
|
@@ -229,7 +229,7 @@ header {
|
|
|
229
229
|
font-size: 1rem;
|
|
230
230
|
padding: 0 0.5rem;
|
|
231
231
|
}
|
|
232
|
-
</style></head><body><div id="jesthtml-content"><header><h1 id="title">Helm Test Report. Datagrok version datagrok/datagrok:latest SHA=34f75e5127b8. Commit
|
|
232
|
+
</style></head><body><div id="jesthtml-content"><header><h1 id="title">Helm Test Report. Datagrok version datagrok/datagrok:latest SHA=34f75e5127b8. Commit d924c408.</h1></header><div id="metadata-container"><div id="timestamp">Started: 2022-07-18 09:41:21</div><div id="summary"><div id="suite-summary"><div class="summary-total">Suites (1)</div><div class="summary-passed summary-empty">0 passed</div><div class="summary-failed">1 failed</div><div class="summary-pending summary-empty">0 pending</div></div><div id="test-summary"><div class="summary-total">Tests (1)</div><div class="summary-passed summary-empty">0 passed</div><div class="summary-failed">1 failed</div><div class="summary-pending summary-empty">0 pending</div></div></div></div><div id="suite-1" class="suite-container"><div class="suite-info"><div class="suite-path">/home/runner/work/public/public/packages/Helm/src/__jest__/remote.test.ts</div><div class="suite-time warn">12.95s</div></div><div class="suite-tests"><div class="test-result failed"><div class="test-info"><div class="test-suitename"> </div><div class="test-title">TEST</div><div class="test-status">failed</div><div class="test-duration">1.184s</div></div><div class="failureMessages"> <pre class="failureMsg">Error: Test result : Helm.Helm.detectMacromolecule : Error: Expected "Macromolecule", got "null"
|
|
233
233
|
Test result : Helm.Helm.detectHelm : Error: Expected "HELM", got "null"
|
|
234
234
|
|
|
235
235
|
at /home/runner/work/public/public/packages/Helm/src/__jest__/remote.test.ts:67:20
|