@datagrok/bio 2.4.2 → 2.4.5

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.
@@ -6,18 +6,21 @@ import * as C from './constants';
6
6
 
7
7
  export const pepseaMethods = ['mafft --auto', 'mafft', 'linsi', 'ginsi', 'einsi', 'fftns', 'fftnsi', 'nwns', 'nwnsi'];
8
8
  const alignmentObjectMetaKeys = ['AlignedSeq', 'AlignedSubpeptide', 'HELM', 'ID', 'PolymerID'];
9
- type PepseaRepsonse = {
9
+ type PepseaResponse = {
10
10
  Alignment: {
11
11
  PolymerID: string, AlignedSubpeptide: string, HELM: string, ID: string, AlignedSeq: string, [key: string]: string,
12
12
  }[],
13
- AlignmentScore: {[key: string]: number | null},
13
+ AlignmentScore: { [key: string]: number | null },
14
14
  };
15
- type PepseaBodyUnit = {ID: string, HELM: string};
15
+ type PepseaBodyUnit = { ID: string, HELM: string };
16
16
 
17
+ /** Gets the column containing MSA sequences produced by the 'PepSeA' tool from the {@link srcCol} column.
18
+ * Does not add the result column to the dataframe of {@link srcCol}.
19
+ */
17
20
  export async function runPepsea(srcCol: DG.Column<string>, unUsedName: string,
18
21
  method: typeof pepseaMethods[number] = 'ginsi', gapOpen: number = 1.53, gapExtend: number = 0.0,
19
22
  clustersCol: DG.Column<string | number> | null = null,
20
- ): Promise<DG.Column<string>> {
23
+ ): Promise<DG.Column<string>> {
21
24
  const peptideCount = srcCol.length;
22
25
  clustersCol ??= DG.Column.int('Clusters', peptideCount).init(0);
23
26
  if (clustersCol.type != DG.COLUMN_TYPE.STRING)
@@ -58,13 +61,14 @@ export async function runPepsea(srcCol: DG.Column<string>, unUsedName: string,
58
61
  alignedSequencesCol.setTag(bioTAGS.separator, C.PEPSEA.SEPARATOR);
59
62
  alignedSequencesCol.setTag(bioTAGS.aligned, ALIGNMENT.SEQ_MSA);
60
63
  alignedSequencesCol.setTag(bioTAGS.alphabet, ALPHABET.UN);
64
+ alignedSequencesCol.setTag(bioTAGS.alphabetIsMultichar, 'true');
61
65
  alignedSequencesCol.semType = DG.SEMTYPE.MACROMOLECULE;
62
66
 
63
67
  return alignedSequencesCol;
64
68
  }
65
69
 
66
70
  async function requestAlignedObjects(dockerfileId: string, body: PepseaBodyUnit[], method: string, gapOpen: number,
67
- gapExtend: number): Promise<PepseaRepsonse> {
71
+ gapExtend: number): Promise<PepseaResponse> {
68
72
  const params = {
69
73
  method: 'POST',
70
74
  headers: {'Accept': 'application/json', 'Content-Type': 'application/json'},
package/tsconfig.json CHANGED
@@ -6,7 +6,7 @@
6
6
  // "incremental": true, /* Enable incremental compilation */
7
7
  "target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
8
8
  "module": "es2020", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
9
- "lib": ["es2020", "dom", "ES2021.String"], /* Specify library files to be included in the compilation. */
9
+ "lib": ["ES2022", "dom"], /* Specify library files to be included in the compilation. */
10
10
  // "allowJs": true, /* Allow javascript files to be compiled. */
11
11
  // "checkJs": true, /* Report errors in .js files. */
12
12
  // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */