@datagrok/bio 1.5.2 → 1.5.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.
- package/detectors.js +11 -0
- package/dist/package-test.js +215 -81
- package/dist/package.js +183 -62
- package/files/samples/id.csv +313 -0
- package/files/samples/sample_HELM.csv +540 -540
- package/files/samples/sample_MSA.csv +540 -540
- package/files/samples/sar-small.csv +201 -0
- package/package.json +1 -1
- package/src/const.ts +0 -1
- package/src/package.ts +14 -12
- package/src/tests/convert-test.ts +31 -0
- package/src/tests/detectors-test.ts +37 -16
- package/src/utils/convert.ts +15 -3
- package/src/utils/multiple-sequence-alignment.ts +13 -8
- package/src/utils/notation-converter.ts +131 -0
- package/src/utils/sequence-space.ts +4 -4
- package/src/utils/split-to-monomers.ts +8 -0
|
@@ -18,9 +18,9 @@ export async function sequenceSpace(spaceParams: ISequenceSpaceParams): Promise<
|
|
|
18
18
|
const sepFinal = sep ? sep === '.' ? '\\\.' : sep : '-';
|
|
19
19
|
const regex = new RegExp(sepFinal, 'g');
|
|
20
20
|
if (Object.keys(AvailableMetrics['String']).includes(spaceParams.similarityMetric))
|
|
21
|
-
preparedData = spaceParams.seqCol.toList().map((v) => v.replace(regex, '')) as string[];
|
|
21
|
+
preparedData = spaceParams.seqCol.toList().map((v: string) => v.replace(regex, '')) as string[];
|
|
22
22
|
else
|
|
23
|
-
preparedData = spaceParams.seqCol.toList().map((v) => v.replace(regex, '')) as string[];
|
|
23
|
+
preparedData = spaceParams.seqCol.toList().map((v: string) => v.replace(regex, '')) as string[];
|
|
24
24
|
} else {
|
|
25
25
|
preparedData = spaceParams.seqCol.toList();
|
|
26
26
|
}
|
|
@@ -31,13 +31,13 @@ export async function sequenceSpace(spaceParams: ISequenceSpaceParams): Promise<
|
|
|
31
31
|
spaceParams.similarityMetric as StringMetrics | BitArrayMetrics,
|
|
32
32
|
spaceParams.options);
|
|
33
33
|
const cols: DG.Column[] = spaceParams.embedAxesNames.map(
|
|
34
|
-
(name, index) => DG.Column.fromFloat32Array(name, sequenceSpaceResult.embedding[index]));
|
|
34
|
+
(name: string, index: number) => DG.Column.fromFloat32Array(name, sequenceSpaceResult.embedding[index]));
|
|
35
35
|
return {distance: sequenceSpaceResult.distance, coordinates: new DG.ColumnList(cols)};
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
export function getEmbeddingColsNames(df: DG.DataFrame) {
|
|
40
40
|
const axes = ['Embed_X', 'Embed_Y'];
|
|
41
|
-
const colNameInd = df.columns.names().filter((it) => it.includes(axes[0])).length + 1;
|
|
41
|
+
const colNameInd = df.columns.names().filter((it: string) => it.includes(axes[0])).length + 1;
|
|
42
42
|
return axes.map((it) => `${it}_${colNameInd}`);
|
|
43
43
|
}
|