@datagrok/bio 2.4.5 → 2.4.7

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
@@ -165,7 +165,7 @@ class BioPackageDetectors extends DG.Package {
165
165
  if (statsAsChars.sameLength) {
166
166
  const stats = this.getStats(categoriesSample, seqMinLength, splitter);
167
167
  const alphabet = this.detectAlphabet(stats.freq, candidateAlphabets, '-', colNameLikely);
168
- if (alphabet === ALPHABET.UN && !colNameLikely) return null;
168
+ if (alphabet === ALPHABET.UN) return null;
169
169
 
170
170
  col.setTag(DG.TAGS.UNITS, units);
171
171
  if (separator) col.setTag(UnitsHandler.TAGS.separator, separator);
@@ -193,8 +193,7 @@ class BioPackageDetectors extends DG.Package {
193
193
 
194
194
  // TODO: If separator detected, then extra efforts to detect alphabet are allowed.
195
195
  const alphabet = this.detectAlphabet(stats.freq, candidateAlphabets, gapSymbol, colNameLikely);
196
- /* Likely column name allows detecting 'fasta' notation with 'UN' alphabet, 2023-04-13, atanas, askalkin */
197
- if (units === NOTATION.FASTA && alphabet === ALPHABET.UN && !alphabetIsMultichar && !colNameLikely) return null;
196
+ if (units === NOTATION.FASTA && alphabet === ALPHABET.UN && !alphabetIsMultichar) return null;
198
197
 
199
198
  // const forbidden = this.checkForbiddenWoSeparator(stats.freq);
200
199
  col.setTag(DG.TAGS.UNITS, units);
@@ -248,8 +247,9 @@ class BioPackageDetectors extends DG.Package {
248
247
  }
249
248
 
250
249
  checkForbiddenSeparator(separator) {
251
- // dot, comma, ampersand, space, underscore, CR, LF
252
- const forbiddenSepRe = / |\.|,|&|_|\r\n|\n/i;
250
+ // comma, ampersand, space, underscore, CRLF, CR, LF
251
+ // 2023-04-15: dot is allowed to allow Helm like separator in Helm MSA results (no Helm monomers contains dot)
252
+ const forbiddenSepRe = /,|&| |_|\r\n|\r|\n/i;
253
253
  return forbiddenSepRe.test(separator);
254
254
  }
255
255