@datagrok/sequence-translator 0.0.4 → 0.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.
package/.eslintrc.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "env": {
3
+ "browser": true,
4
+ "es2021": true
5
+ },
6
+ "extends": [
7
+ "google"
8
+ ],
9
+ "parser": "@typescript-eslint/parser",
10
+ "parserOptions": {
11
+ "ecmaVersion": 12,
12
+ "sourceType": "module"
13
+ },
14
+ "plugins": [
15
+ "@typescript-eslint"
16
+ ],
17
+ "rules": {
18
+ "indent": [
19
+ "error",
20
+ 2
21
+ ],
22
+ "max-len": [
23
+ "error",
24
+ 120
25
+ ],
26
+ "require-jsdoc": "off",
27
+ "spaced-comment": "off",
28
+ "linebreak-style": "off",
29
+ "curly": [
30
+ "error",
31
+ "multi-or-nest"
32
+ ],
33
+ "brace-style": [
34
+ "error",
35
+ "1tbs",
36
+ { "allowSingleLine": true }
37
+ ]
38
+ }
39
+ }
package/detectors.js CHANGED
@@ -1,14 +1,4 @@
1
1
  class SequenceTranslatorPackageDetectors extends DG.Package {
2
- isDnaNucleotides(sequence) {return /^[ATGC]{6,}$/.test(sequence);}
3
- isRnaNucleotides(sequence) {return /^[AUGC]{6,}$/.test(sequence);}
4
- isAsoGapmerBioSpring(sequence) {return /^[*56789ATGC]{6,}$/.test(sequence);}
5
- isAsoGapmerGcrs(sequence) {return /^(?=.*moe)(?=.*5mC)(?=.*ps){6,}/.test(sequence);}
6
- isSiRnaBioSpring(sequence) {return /^[*1-8]{6,}$/.test(sequence);}
7
- isSiRnaAxolabs(sequence) {return /^[fsACGUacgu]{6,}$/.test(sequence);}
8
- isSiRnaGcrs(sequence) {return /^[fmpsACGU]{6,}$/.test(sequence);} // TODO: insert into detectNucleotides
9
- isGcrs(sequence) {return /^[fmpsACGU]{6,}$/.test(sequence);}
10
- isMermade12(sequence) {return /^[IiJjKkLlEeFfGgHhQq]{6,}$/.test(sequence);}
11
-
12
2
  //tags: semTypeDetector
13
3
  //input: column col
14
4
  //output: string semType
@@ -25,11 +15,11 @@ class SequenceTranslatorPackageDetectors extends DG.Package {
25
15
  if (DG.Detector.sampleCategories(col, (s) => isSiRnaBioSpring(s)))
26
16
  return 'BioSpring / siRNA';
27
17
  if (DG.Detector.sampleCategories(col, (s) => isSiRnaAxolabs(s)))
28
- return 'Axolabs / siRNA';
18
+ return 'Axolabs / siRNA';
29
19
  if (DG.Detector.sampleCategories(col, (s) => isGcrs(s)))
30
20
  return 'GCRS';
31
21
  if (DG.Detector.sampleCategories(col, (s) => isMermade12(s)))
32
22
  return 'Mermade 12 / siRNA';
33
23
  }
34
24
  }
35
- }
25
+ }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@datagrok/sequence-translator",
3
3
  "friendlyName": "SequenceTranslator",
4
- "version": "0.0.4",
4
+ "version": "0.0.8",
5
5
  "description": "",
6
6
  "dependencies": {
7
- "@datagrok-libraries/utils": "^0.0.23",
7
+ "@datagrok-libraries/utils": "^0.1.0",
8
8
  "@types/react": "latest",
9
9
  "datagrok-api": ">0.94.10",
10
10
  "datagrok-tools": "^4.1.2",
@@ -26,8 +26,12 @@
26
26
  "release-sequencetranslator-local": "grok publish local --rebuild --release"
27
27
  },
28
28
  "devDependencies": {
29
+ "@typescript-eslint/eslint-plugin": "^4.29.1",
30
+ "@typescript-eslint/parser": "^4.29.1",
29
31
  "cash-dom": "^8.1.0",
32
+ "eslint": "^7.32.0",
33
+ "eslint-config-google": "^0.14.0",
30
34
  "webpack": "^5.31.0",
31
35
  "webpack-cli": "^4.6.0"
32
36
  }
33
- }
37
+ }
package/src/axolabsMap.ts CHANGED
@@ -1,99 +1,101 @@
1
- const rnaColor = "rgb(255,230,153)";
2
- const invAbasicColor = "rgb(255,230,153)";
3
- export const axolabsMap: {[index: string]: {fullName: string, symbols: [string, string, string, string], color: string}} = {
4
- "RNA": {
5
- fullName: "RNA nucleotides",
6
- symbols: ["A", "C", "G", "U"],
7
- color: rnaColor
8
- },
9
- "DNA": {
10
- fullName: "DNA nucleotides",
11
- symbols: ["dA", "dC", "dG", "dT"],
12
- color: "rgb(197,224,180)"
13
- },
14
- "2'-Fluoro": {
15
- fullName: "2'-Fluoro nucleotides",
16
- symbols: ["Af", "Cf", "Gf", "Uf"],
17
- color: "rgb(68,114,196)"
18
- },
19
- "2'-O-Methyl": {
20
- fullName: "2'-O-Methyl nucleotides",
21
- symbols: ["a", "c", "g", "u"],
22
- color: "rgb(166,166,166)"
23
- },
24
- "2'-O-MOE": {
25
- fullName: "2'-O-MOE nucleotides (including 5-Methyl C)",
26
- symbols: ["Am", "Cm", "Gm", "Tm"],
27
- color: "rgb(112,48,160)"
28
- },
29
- "GNA": {
30
- fullName: "Glycol nucleic acid",
31
- symbols: ["(GNA-A)", "(GNA-C)", "(GNA-G)", "(GNA-T)"],
32
- color: "rgb(255,192,0)"
33
- },
34
- "LNA": {
35
- fullName: "Locked nucleic acid (including 5-Methyl C)",
36
- symbols: ["Ab", "Cb", "Gb", "Tb"],
37
- color: "rgb(54,229,238)"
38
- },
39
- "UNA": {
40
- fullName: "Unlocked nucleotides",
41
- symbols: ["Ao", "Co", "Go", "Uo"],
42
- color: "rgb(255,192,0)"
43
- },
44
- "A": {
45
- fullName: "Adenine",
46
- symbols: ["a", "a", "a", "a"],
47
- color: rnaColor
48
- },
49
- "C": {
50
- fullName: "Cytosine",
51
- symbols: ["c", "c", "c", "c"],
52
- color: rnaColor
53
- },
54
- "G": {
55
- fullName: "Guanine",
56
- symbols: ["g", "g", "g", "g"],
57
- color: rnaColor
58
- },
59
- "U": {
60
- fullName: "Uracil",
61
- symbols: ["u", "u", "u", "u"],
62
- color: rnaColor
63
- },
64
- "X-New": {
65
- fullName: "",
66
- symbols: ["X", "X", "X", "X"],
67
- color: "rgb(108,0,0)"
68
- },
69
- "Y-New": {
70
- fullName: "",
71
- symbols: ["Y", "Y", "Y", "Y"],
72
- color: "rgb(210,146,146)"
73
- },
74
- "Z-New": {
75
- fullName: "",
76
- symbols: ["Z", "Z", "Z", "Z"],
77
- color: "rgb(155,108,132)"
78
- },
79
- "InvAbasic": {
80
- fullName: "Inverted abasic capped",
81
- symbols: ["(invabasic)", "(invabasic)", "(invabasic)", "(invabasic)"],
82
- color: invAbasicColor
83
- },
84
- "5'-vinylps": {
85
- fullName: "5'-vinylphosphonate-2'-OMe-uridine",
86
- symbols: ["(vinu)", "(vinu)", "(vinu)", "(vinu)"],
87
- color: "rgb(0,0,139)"
88
- },
89
- "InvAbasic(o)": {
90
- fullName: "Inverted abasic capped (overhang)",
91
- symbols: ["(invabasic)", "(invabasic)", "(invabasic)", "(invabasic)"],
92
- color: invAbasicColor
93
- },
94
- "2'-OMe-U(o)": {
95
- fullName: "Nucleotide Uridine with 2’O-Methyl protection (overhang)",
96
- symbols: ["mU", "mU", "mU", "mU"],
97
- color: "rgb(65,233,80)"
98
- }
99
- };
1
+ const rnaColor = 'rgb(255,230,153)';
2
+ const invAbasicColor = 'rgb(255,230,153)';
3
+ export const axolabsMap:
4
+ {[index: string]: {fullName: string, symbols: [string, string, string, string], color: string}} =
5
+ {
6
+ 'RNA': {
7
+ fullName: 'RNA nucleotides',
8
+ symbols: ['A', 'C', 'G', 'U'],
9
+ color: rnaColor,
10
+ },
11
+ 'DNA': {
12
+ fullName: 'DNA nucleotides',
13
+ symbols: ['dA', 'dC', 'dG', 'dT'],
14
+ color: 'rgb(197,224,180)',
15
+ },
16
+ '2\'-Fluoro': {
17
+ fullName: '2\'-Fluoro nucleotides',
18
+ symbols: ['Af', 'Cf', 'Gf', 'Uf'],
19
+ color: 'rgb(68,114,196)',
20
+ },
21
+ '2\'-O-Methyl': {
22
+ fullName: '2\'-O-Methyl nucleotides',
23
+ symbols: ['a', 'c', 'g', 'u'],
24
+ color: 'rgb(166,166,166)',
25
+ },
26
+ '2\'-O-MOE': {
27
+ fullName: '2\'-O-MOE nucleotides (including 5-Methyl C)',
28
+ symbols: ['Am', 'Cm', 'Gm', 'Tm'],
29
+ color: 'rgb(112,48,160)',
30
+ },
31
+ 'GNA': {
32
+ fullName: 'Glycol nucleic acid',
33
+ symbols: ['(GNA-A)', '(GNA-C)', '(GNA-G)', '(GNA-T)'],
34
+ color: 'rgb(255,192,0)',
35
+ },
36
+ 'LNA': {
37
+ fullName: 'Locked nucleic acid (including 5-Methyl C)',
38
+ symbols: ['Ab', 'Cb', 'Gb', 'Tb'],
39
+ color: 'rgb(54,229,238)',
40
+ },
41
+ 'UNA': {
42
+ fullName: 'Unlocked nucleotides',
43
+ symbols: ['Ao', 'Co', 'Go', 'Uo'],
44
+ color: 'rgb(255,192,0)',
45
+ },
46
+ 'A': {
47
+ fullName: 'Adenine',
48
+ symbols: ['a', 'a', 'a', 'a'],
49
+ color: rnaColor,
50
+ },
51
+ 'C': {
52
+ fullName: 'Cytosine',
53
+ symbols: ['c', 'c', 'c', 'c'],
54
+ color: rnaColor,
55
+ },
56
+ 'G': {
57
+ fullName: 'Guanine',
58
+ symbols: ['g', 'g', 'g', 'g'],
59
+ color: rnaColor,
60
+ },
61
+ 'U': {
62
+ fullName: 'Uracil',
63
+ symbols: ['u', 'u', 'u', 'u'],
64
+ color: rnaColor,
65
+ },
66
+ 'X-New': {
67
+ fullName: '',
68
+ symbols: ['X', 'X', 'X', 'X'],
69
+ color: 'rgb(108,0,0)',
70
+ },
71
+ 'Y-New': {
72
+ fullName: '',
73
+ symbols: ['Y', 'Y', 'Y', 'Y'],
74
+ color: 'rgb(210,146,146)',
75
+ },
76
+ 'Z-New': {
77
+ fullName: '',
78
+ symbols: ['Z', 'Z', 'Z', 'Z'],
79
+ color: 'rgb(155,108,132)',
80
+ },
81
+ 'InvAbasic': {
82
+ fullName: 'Inverted abasic capped',
83
+ symbols: ['(invabasic)', '(invabasic)', '(invabasic)', '(invabasic)'],
84
+ color: invAbasicColor,
85
+ },
86
+ '5\'-vinylps': {
87
+ fullName: '5\'-vinylphosphonate-2\'-OMe-uridine',
88
+ symbols: ['(vinu)', '(vinu)', '(vinu)', '(vinu)'],
89
+ color: 'rgb(0,0,139)',
90
+ },
91
+ 'InvAbasic(o)': {
92
+ fullName: 'Inverted abasic capped (overhang)',
93
+ symbols: ['(invabasic)', '(invabasic)', '(invabasic)', '(invabasic)'],
94
+ color: invAbasicColor,
95
+ },
96
+ '2\'-OMe-U(o)': {
97
+ fullName: 'Nucleotide Uridine with 2’O-Methyl protection (overhang)',
98
+ symbols: ['mU', 'mU', 'mU', 'mU'],
99
+ color: 'rgb(65,233,80)',
100
+ },
101
+ };