@datagrok/sequence-translator 1.3.3 → 1.3.4
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 +6 -0
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/package.json +1 -1
- package/src/polytool/pt-conversion.ts +11 -7
package/package.json
CHANGED
|
@@ -268,8 +268,12 @@ export class Chain {
|
|
|
268
268
|
function getHelms(sequences: string[], rules: Rules): string[] {
|
|
269
269
|
const helms = new Array<string>(sequences.length);
|
|
270
270
|
for (let i = 0; i < sequences.length; i++) {
|
|
271
|
-
|
|
272
|
-
|
|
271
|
+
if (sequences[i] === undefined)
|
|
272
|
+
helms[i] = '';
|
|
273
|
+
else {
|
|
274
|
+
const chain = Chain.fromNotation(sequences[i], rules);
|
|
275
|
+
helms[i] = chain.getHelm();
|
|
276
|
+
}
|
|
273
277
|
}
|
|
274
278
|
|
|
275
279
|
return helms;
|
|
@@ -288,20 +292,20 @@ export async function addTransformedColumn(
|
|
|
288
292
|
addCommonTags(targetHelmCol);
|
|
289
293
|
targetHelmCol.setTag('units', NOTATION.HELM);
|
|
290
294
|
|
|
295
|
+
if (addHelm) {
|
|
296
|
+
targetHelmCol.setTag('cell.renderer', 'helm');
|
|
297
|
+
df.columns.add(targetHelmCol);
|
|
298
|
+
}
|
|
299
|
+
|
|
291
300
|
const molCol = await grok.functions.call('Bio:getMolFromHelm', {
|
|
292
301
|
'df': df,
|
|
293
302
|
'helmCol': targetHelmCol,
|
|
294
303
|
'chiralityEngine': chiralityEngine
|
|
295
304
|
});
|
|
296
305
|
|
|
297
|
-
|
|
298
306
|
molCol.name = df.columns.getUnusedName('molfile(' + sequencesCol.name + ')');
|
|
299
307
|
molCol.semType = DG.SEMTYPE.MOLECULE;
|
|
300
308
|
|
|
301
|
-
if (addHelm) {
|
|
302
|
-
targetHelmCol.setTag('cell.renderer', 'helm');
|
|
303
|
-
df.columns.add(targetHelmCol);
|
|
304
|
-
}
|
|
305
309
|
df.columns.add(molCol, true);
|
|
306
310
|
await grok.data.detectSemanticTypes(df);
|
|
307
311
|
}
|