@datagrok/sequence-translator 1.10.15 → 1.10.16
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/dist/package-test.js +1 -1
- package/dist/package-test.js.map +1 -1
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/package.json +1 -1
- package/src/oligo-renderer/tooltip.ts +5 -1
- package/src/oligo-renderer/types.ts +2 -1
- package/test-console-output-1.log +153 -152
- package/test-record-1.mp4 +0 -0
package/package.json
CHANGED
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
canonicalPhosphateSymbol, canonicalSugarSymbol,
|
|
23
23
|
ParsedNucleotide, resolveConjugate, resolvePhosphate, resolveSugar,
|
|
24
24
|
} from './types';
|
|
25
|
+
import {PolymerType} from '@datagrok-libraries/js-draw-lite/src/types/org';
|
|
25
26
|
|
|
26
27
|
const STRUCT_W = 110;
|
|
27
28
|
const STRUCT_H = 90;
|
|
@@ -117,7 +118,10 @@ function findMonomerMolfile(lib: IMonomerLib, rawSymbol: string, kind: Structure
|
|
|
117
118
|
else if (kind === 'phosphate') candidates.push(canonicalPhosphateSymbol(rawSymbol));
|
|
118
119
|
// Bases (A/C/G/U/T) and conjugates: try the symbol as-is.
|
|
119
120
|
|
|
120
|
-
|
|
121
|
+
// make sure RNA and chem come first :D
|
|
122
|
+
const polymerTypes: PolymerType[] = (lib.getPolymerTypes()
|
|
123
|
+
.filter((pt) => pt === 'RNA' || pt === 'CHEM') as PolymerType[])
|
|
124
|
+
.concat(lib.getPolymerTypes().filter((pt) => pt !== 'RNA' && pt !== 'CHEM'));
|
|
121
125
|
for (const sym of candidates) {
|
|
122
126
|
for (const pt of polymerTypes) {
|
|
123
127
|
const monomer = lib.getMonomer(pt, sym);
|
|
@@ -200,7 +200,8 @@ export function resolveConjugate(symbol: string): { color: string; meta: ModMeta
|
|
|
200
200
|
return {color: known.color, meta: known};
|
|
201
201
|
return {
|
|
202
202
|
color: hashColor(symbol),
|
|
203
|
-
meta: {name: symbol, short: symbol.length > 6 ? symbol.slice(0, 6) : symbol,
|
|
203
|
+
meta: {name: symbol, short: symbol.length > 6 ? symbol.slice(0, 6) : symbol,
|
|
204
|
+
color: hashColor(symbol), category: 'conjugate'},
|
|
204
205
|
};
|
|
205
206
|
}
|
|
206
207
|
|