@datagrok/bio 2.0.25 → 2.0.27

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/detectors.js CHANGED
@@ -22,6 +22,11 @@ const ALPHABET = {
22
22
  UN: 'UN',
23
23
  };
24
24
 
25
+ const ALIGNMENT = {
26
+ SEQ_MSA: 'SEQ.MSA',
27
+ SEQ: 'SEQ',
28
+ };
29
+
25
30
  /** Class for handling notation units in Macromolecule columns */
26
31
  class UnitsHandler {
27
32
  static TAGS = {
@@ -128,7 +133,7 @@ class BioPackageDetectors extends DG.Package {
128
133
 
129
134
  const units = NOTATION.FASTA;
130
135
  col.setTag(DG.TAGS.UNITS, units);
131
- col.setTag(UnitsHandler.TAGS.aligned, 'SEQ.MSA');
136
+ col.setTag(UnitsHandler.TAGS.aligned, ALIGNMENT.SEQ_MSA);
132
137
  col.setTag(UnitsHandler.TAGS.alphabet, alphabet);
133
138
  return DG.SEMTYPE.MACROMOLECULE;
134
139
  }
@@ -145,7 +150,7 @@ class BioPackageDetectors extends DG.Package {
145
150
  if (separator && BioPackageDetectors.checkForbiddenWithSeparators(stats.freq)) return null;
146
151
 
147
152
  const format = separator ? NOTATION.SEPARATOR : NOTATION.FASTA;
148
- const aligned = stats.sameLength ? 'SEQ.MSA' : 'SEQ';
153
+ const aligned = stats.sameLength ? ALIGNMENT.SEQ_MSA : ALIGNMENT.SEQ;
149
154
 
150
155
  // TODO: If separator detected, then extra efforts to detect alphabet are allowed.
151
156
  const alphabet = BioPackageDetectors.detectAlphabet(stats.freq, candidateAlphabets, gapSymbol);