@datagrok/bio 2.1.10 → 2.1.11

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 CHANGED
@@ -25,6 +25,7 @@
25
25
  ],
26
26
  "no-unused-vars": "warn",
27
27
  "require-jsdoc": "off",
28
+ "valid-jsdoc": "warn",
28
29
  "spaced-comment": "off",
29
30
  "linebreak-style": "off",
30
31
  "curly": [
package/detectors.js CHANGED
@@ -139,7 +139,7 @@ class BioPackageDetectors extends DG.Package {
139
139
  const statsAsChars = this.getStats(categoriesSample, 5,
140
140
  this.getSplitterAsChars(SEQ_SAMPLE_LENGTH_LIMIT));
141
141
  // Empty statsAsShars.freq alphabet means no strings of enough length presented in the data
142
- if (Object.keys(statsAsChars.freq).length === 0) return;
142
+ if (Object.keys(statsAsChars.freq).length === 0) return null;
143
143
 
144
144
  const decoy = this.detectAlphabet(statsAsChars.freq, decoyAlphabets, null);
145
145
  if (decoy != ALPHABET.UN) return null;
@@ -150,14 +150,13 @@ class BioPackageDetectors extends DG.Package {
150
150
  const splitter = separator ? this.getSplitterWithSeparator(separator, SEQ_SAMPLE_LENGTH_LIMIT) :
151
151
  this.getSplitterAsFasta(SEQ_SAMPLE_LENGTH_LIMIT);
152
152
 
153
- col.setTag(DG.TAGS.UNITS, units);
154
- if (separator) col.setTag(UnitsHandler.TAGS.separator, separator);
155
-
156
153
  if (statsAsChars.sameLength) {
157
154
  const stats = this.getStats(categoriesSample, 5, splitter);
158
155
  const alphabet = this.detectAlphabet(stats.freq, candidateAlphabets, '-');
159
156
  if (alphabet === ALPHABET.UN) return null;
160
157
 
158
+ col.setTag(DG.TAGS.UNITS, units);
159
+ if (separator) col.setTag(UnitsHandler.TAGS.separator, separator);
161
160
  col.setTag(UnitsHandler.TAGS.aligned, ALIGNMENT.SEQ_MSA);
162
161
  col.setTag(UnitsHandler.TAGS.alphabet, alphabet);
163
162
  return DG.SEMTYPE.MACROMOLECULE;
@@ -175,6 +174,8 @@ class BioPackageDetectors extends DG.Package {
175
174
 
176
175
  // const forbidden = this.checkForbiddenWoSeparator(stats.freq);
177
176
  if (separator || alphabet != 'UN') {
177
+ col.setTag(DG.TAGS.UNITS, units);
178
+ if (separator) col.setTag(UnitsHandler.TAGS.separator, separator);
178
179
  col.setTag(UnitsHandler.TAGS.aligned, aligned);
179
180
  col.setTag(UnitsHandler.TAGS.alphabet, alphabet);
180
181
  if (alphabet === ALPHABET.UN) {