@datagrok/bio 2.20.1 → 2.20.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Bio changelog
2
2
 
3
+ ## 2.20.2 (2025-03-31)
4
+
5
+ * Detectors: more sensitive for very likely column names
6
+ * Add to atomic level panel widget
7
+
3
8
  ## 2.20.1 (2025-03-29)
4
9
 
5
10
  * Improve Activity cliffs demo
package/detectors.js CHANGED
@@ -88,7 +88,9 @@ class BioPackageDetectors extends DG.Package {
88
88
  }
89
89
 
90
90
  /** Parts of the column name required in the column's name under the detector. It must be in lowercase. */
91
- likelyColNamePartList = ['seq', 'msa', 'dna', 'rna', 'fasta', 'helm', 'sense', 'protein'];
91
+ likelyColNamePartList = ['seq', 'msa', 'dna', 'rna', 'fasta', 'helm', 'sense', 'protein', 'pep', 'enumerated'];
92
+
93
+ veryLikelyColNamePartList = ['peptide', 'oligo', 'sequence', 'enumerated'];
92
94
 
93
95
  peptideFastaAlphabet = new Set([
94
96
  'G', 'L', 'Y', 'S', 'E', 'Q', 'D', 'N', 'F', 'A',
@@ -152,7 +154,9 @@ class BioPackageDetectors extends DG.Package {
152
154
  const colName = col.name;
153
155
  const colNameLikely = this.likelyColNamePartList.some(
154
156
  (requiredColNamePart) => colName.toLowerCase().includes(requiredColNamePart));
155
- const seqMinLength = colNameLikely ? 7 : 10;
157
+ const colNameVeryLikely = this.veryLikelyColNamePartList.some(
158
+ (requiredColNamePart) => colName.toLowerCase().includes(requiredColNamePart));
159
+ const seqMinLength = colNameVeryLikely ? 3 : colNameLikely ? 7 : 10;
156
160
  const maxBadRatio = colNameLikely ? 0.05 : 0.005;
157
161
 
158
162
  // Fail early
@@ -188,11 +192,11 @@ class BioPackageDetectors extends DG.Package {
188
192
  col.setTag(DG.TAGS.CELL_RENDERER, 'helm');
189
193
  return DG.SEMTYPE.MACROMOLECULE;
190
194
  }
191
-
195
+ const multiplier = colNameVeryLikely ? 1.4 : colNameLikely ? 1.2 : 1.0;
192
196
  const decoyAlphabets = [
193
- ['NUMBERS', this.numbersRawAlphabet, 0.25, undefined],
194
- ['SMILES', this.smilesRawAlphabet, 0.25, (seq) => seq.replaceAll()],
195
- ['SMARTS', this.smartsRawAlphabet, 0.45, undefined],
197
+ ['NUMBERS', this.numbersRawAlphabet, 0.25 * multiplier, undefined],
198
+ ['SMILES', this.smilesRawAlphabet, 0.25 * multiplier, (seq) => seq.replaceAll()],
199
+ ['SMARTS', this.smartsRawAlphabet, 0.45 * multiplier, undefined],
196
200
  ];
197
201
 
198
202
  const candidateAlphabets = [