@datagrok/sequence-translator 1.0.16 → 1.1.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.
Files changed (92) hide show
  1. package/.eslintrc.json +4 -3
  2. package/CHANGELOG.md +3 -0
  3. package/detectors.js +8 -28
  4. package/dist/package-test.js +2 -72987
  5. package/dist/package-test.js.map +1 -0
  6. package/dist/package.js +2 -72192
  7. package/dist/package.js.map +1 -0
  8. package/files/axolabs-style.json +97 -0
  9. package/files/codes-to-symbols.json +66 -0
  10. package/files/formats-to-helm.json +59 -0
  11. package/files/linkers.json +22 -0
  12. package/files/monomer-lib.json +1094 -0
  13. package/link-bio +7 -0
  14. package/package.json +30 -26
  15. package/scripts/build-monomer-lib.py +391 -122
  16. package/src/demo/demo-st-ui.ts +71 -0
  17. package/src/demo/handle-error.ts +12 -0
  18. package/src/model/axolabs/axolabs-tab.ts +111 -0
  19. package/src/model/axolabs/const.ts +33 -0
  20. package/src/{axolabs → model/axolabs}/draw-svg.ts +1 -1
  21. package/src/{axolabs → model/axolabs}/helpers.ts +7 -5
  22. package/src/model/const.ts +19 -0
  23. package/src/model/data-loading-utils/const.ts +8 -0
  24. package/src/model/data-loading-utils/json-loader.ts +38 -0
  25. package/src/model/data-loading-utils/types.ts +30 -0
  26. package/src/model/format-translation/const.ts +8 -0
  27. package/src/model/format-translation/conversion-utils.ts +48 -0
  28. package/src/model/format-translation/format-converter.ts +107 -0
  29. package/src/model/helpers.ts +12 -0
  30. package/src/model/monomer-lib/const.ts +3 -0
  31. package/src/model/monomer-lib/lib-wrapper.ts +106 -0
  32. package/src/model/parsing-validation/format-detector.ts +57 -0
  33. package/src/model/parsing-validation/sequence-validator.ts +52 -0
  34. package/src/model/sequence-to-structure-utils/const.ts +1 -0
  35. package/src/{structures-works → model/sequence-to-structure-utils}/mol-transformations.ts +61 -87
  36. package/src/model/sequence-to-structure-utils/monomer-code-parser.ts +92 -0
  37. package/src/model/sequence-to-structure-utils/sdf-tab.ts +94 -0
  38. package/src/model/sequence-to-structure-utils/sequence-to-molfile.ts +409 -0
  39. package/src/package.ts +106 -77
  40. package/src/tests/const.ts +17 -0
  41. package/src/tests/smiles-tests.ts +32 -457
  42. package/src/view/const/main-tab.ts +3 -0
  43. package/src/view/const/view.ts +10 -0
  44. package/src/view/css/axolabs-tab.css +1 -0
  45. package/src/view/css/colored-text-input.css +27 -0
  46. package/src/view/css/main-tab.css +46 -0
  47. package/src/view/css/sdf-tab.css +39 -0
  48. package/src/view/monomer-lib-viewer/viewer.ts +22 -0
  49. package/src/view/tabs/axolabs.ts +720 -0
  50. package/src/view/tabs/main.ts +174 -0
  51. package/src/view/tabs/sdf.ts +173 -0
  52. package/src/view/utils/app-info-dialog.ts +18 -0
  53. package/src/view/utils/colored-input/colored-text-input.ts +56 -0
  54. package/src/view/utils/colored-input/input-painters.ts +44 -0
  55. package/src/view/utils/draw-molecule.ts +86 -0
  56. package/src/view/utils/molecule-img.ts +106 -0
  57. package/src/view/view.ts +129 -0
  58. package/tsconfig.json +12 -18
  59. package/webpack.config.js +17 -4
  60. package/README.md +0 -84
  61. package/css/style.css +0 -18
  62. package/img/Sequence Translator Axolabs.png +0 -0
  63. package/jest.config.js +0 -33
  64. package/setup-unlink-clean.cmd +0 -14
  65. package/setup.cmd +0 -14
  66. package/setup.sh +0 -37
  67. package/src/__jest__/remote.test.ts +0 -77
  68. package/src/__jest__/test-node.ts +0 -97
  69. package/src/apps/oligo-sd-file-app.ts +0 -58
  70. package/src/autostart/ICDs.ts +0 -3
  71. package/src/autostart/IDPs.ts +0 -3
  72. package/src/autostart/calculations.ts +0 -40
  73. package/src/autostart/constants.ts +0 -37
  74. package/src/autostart/registration.ts +0 -241
  75. package/src/autostart/salts.ts +0 -2
  76. package/src/autostart/sources.ts +0 -3
  77. package/src/autostart/users.ts +0 -3
  78. package/src/axolabs/constants.ts +0 -101
  79. package/src/axolabs/define-pattern.ts +0 -873
  80. package/src/helpers.ts +0 -28
  81. package/src/main/main-view.ts +0 -262
  82. package/src/structures-works/const.ts +0 -5
  83. package/src/structures-works/converters.ts +0 -323
  84. package/src/structures-works/from-monomers.ts +0 -267
  85. package/src/structures-works/map.ts +0 -720
  86. package/src/structures-works/save-sense-antisense.ts +0 -91
  87. package/src/structures-works/sequence-codes-tools.ts +0 -344
  88. package/src/utils/parse.ts +0 -27
  89. package/src/utils/sdf-add-columns.ts +0 -118
  90. package/src/utils/sdf-save-table.ts +0 -56
  91. package/test-SequenceTranslator-6288c2fbe346-cce4ac1d.html +0 -259
  92. package/vendors/openchemlib-full.js +0 -293
package/.eslintrc.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "env": {
3
3
  "browser": true,
4
- "es2021": true
4
+ "es2022": true
5
5
  },
6
6
  "extends": [
7
7
  "google"
@@ -23,7 +23,8 @@
23
23
  "error",
24
24
  120
25
25
  ],
26
- "no-unused-vars": "warn",
26
+ "no-unused-vars": "off",
27
+ "@typescript-eslint/no-unused-vars": "warn",
27
28
  "require-jsdoc": "off",
28
29
  "valid-jsdoc": "off",
29
30
  "spaced-comment": "off",
@@ -49,4 +50,4 @@
49
50
  }],
50
51
  "guard-for-in": "off"
51
52
  }
52
- }
53
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,3 @@
1
+ # Sequence Translator changelog
2
+
3
+ ## 1.0.17 (2023-07-24) (WIP)
package/detectors.js CHANGED
@@ -1,28 +1,8 @@
1
- class SequenceTranslatorPackageDetectors extends DG.Package {
2
- isDnaNucleotides(sequence) {return /(\(invabasic\)|\(GalNAc-2-JNJ\)|A|T|G|C){6,}$/.test(sequence);}
3
- isRnaNucleotides(sequence) {return /(\(invabasic\)|\(GalNAc-2-JNJ\)|A|U|G|C){6,}$/.test(sequence);}
4
- isAsoGapmerBioSpring(sequence) {return /(\(invabasic\)|\(GalNAc-2-JNJ\)|\*|5|6|7|8|9|A|T|G|C){6,}$/.test(sequence);}
5
- isAsoGapmerGcrs(sequence) {return /^(?=.*moe)(?=.*5mC)(?=.*ps){6,}/.test(sequence);}
6
- isSiRnaBioSpring(sequence) {return /(\(invabasic\)|\(GalNAc-2-JNJ\)|\*|1|2|3|4|5|6|7|8){6,}$/.test(sequence);}
7
- isSiRnaAxolabs(sequence) {return /(\(invabasic\)|\(GalNAc-2-JNJ\)|f|s|A|C|G|U|a|c|g|u){6,}$/.test(sequence);}
8
- isSiRnaGcrs(sequence) {return /(\(invabasic\)|\(GalNAc-2-JNJ\)|f|m|p|s|A|C|G|U){6,}$/.test(sequence);}
9
- isGcrs(sequence) {return /(\(invabasic\)|\(GalNAc-2-JNJ\)|f|m|p|s|A|C|G|U){6,}$/.test(sequence);}
10
- isMermade12(sequence) {
11
- return /(\(invabasic\)|\(GalNAc-2-JNJ\)|I|i|J|j|K|k|L|l|E|e|F|f|G|g|H|h|Q|q){6,}$/.test(sequence);
12
- }
13
- //tags: semTypeDetector
14
- //input: column col
15
- //output: string semType
16
- detectNucleotides(col) {
17
- if (col.type === DG.TYPE.STRING) {
18
- if (DG.Detector.sampleCategories(col, (s) => this.isDnaNucleotides(s))) return 'DNA nucleotides';
19
- if (DG.Detector.sampleCategories(col, (s) => this.isRnaNucleotides(s))) return 'RNA nucleotides';
20
- if (DG.Detector.sampleCategories(col, (s) => this.isAsoGapmerBioSpring(s))) return 'BioSpring / Gapmers';
21
- if (DG.Detector.sampleCategories(col, (s) => this.isAsoGapmerGcrs(s))) return 'GCRS / Gapmers';
22
- if (DG.Detector.sampleCategories(col, (s) => this.isSiRnaBioSpring(s))) return 'BioSpring / siRNA';
23
- if (DG.Detector.sampleCategories(col, (s) => this.isSiRnaAxolabs(s))) return 'Axolabs / siRNA';
24
- if (DG.Detector.sampleCategories(col, (s) => this.isGcrs(s))) return 'GCRS';
25
- if (DG.Detector.sampleCategories(col, (s) => this.isMermade12(s))) return 'Mermade 12 / siRNA';
26
- }
27
- }
28
- }
1
+ /**
2
+ * The class contains semantic type detectors.
3
+ * Detectors are functions tagged with `DG.FUNC_TYPES.SEM_TYPE_DETECTOR`.
4
+ * See also: https://datagrok.ai/help/develop/how-to/define-semantic-type-detectors
5
+ * The class name is comprised of <PackageName> and the `PackageDetectors` suffix.
6
+ * Follow this naming convention to ensure that your detectors are properly loaded.
7
+ */
8
+