@datagrok/bio 0.0.6 → 1.0.1
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/.eslintignore +2 -0
- package/.eslintrc.json +51 -0
- package/README.md +2 -2
- package/dist/package.js +189 -68
- package/package.json +13 -6
- package/src/package.ts +6 -5
- package/webpack.config.js +13 -5
package/package.json
CHANGED
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datagrok/bio",
|
|
3
|
-
"beta":
|
|
3
|
+
"beta": false,
|
|
4
4
|
"friendlyName": "Bio",
|
|
5
|
-
"version": "
|
|
6
|
-
"description": "",
|
|
5
|
+
"version": "1.0.1",
|
|
6
|
+
"description": "Bio is a [package](https://datagrok.ai/help/develop/develop#packages) for the [Datagrok](https://datagrok.ai) platform",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/datagrok-ai/public.git",
|
|
10
10
|
"directory": "packages/Bio"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@datagrok-libraries/bio": "^
|
|
13
|
+
"@datagrok-libraries/bio": "^1.0.1",
|
|
14
14
|
"cash-dom": "latest",
|
|
15
|
-
"datagrok-api": "^
|
|
15
|
+
"datagrok-api": "^1.1.5",
|
|
16
16
|
"dayjs": "latest",
|
|
17
17
|
"ts-loader": "^9.2.5",
|
|
18
18
|
"typescript": "^4.4.2"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
+
"@typescript-eslint/eslint-plugin": "latest",
|
|
22
|
+
"@typescript-eslint/parser": "latest",
|
|
23
|
+
"eslint": "latest",
|
|
24
|
+
"eslint-config-google": "latest",
|
|
21
25
|
"webpack": "latest",
|
|
22
26
|
"webpack-cli": "latest"
|
|
23
27
|
},
|
|
@@ -28,11 +32,14 @@
|
|
|
28
32
|
"debug-sequences1": "grok publish --rebuild",
|
|
29
33
|
"release-sequences1": "grok publish --rebuild --release",
|
|
30
34
|
"build-sequences1": "webpack",
|
|
35
|
+
"local-bio": "grok publish local",
|
|
31
36
|
"build": "webpack",
|
|
32
37
|
"debug-sequences1-public": "grok publish public --rebuild",
|
|
33
38
|
"release-sequences1-public": "grok publish public --rebuild --release",
|
|
34
39
|
"debug-sequences1-local": "grok publish local --rebuild",
|
|
35
|
-
"release-sequences1-local": "grok publish local --rebuild --release"
|
|
40
|
+
"release-sequences1-local": "grok publish local --rebuild --release",
|
|
41
|
+
"lint": "eslint \"./src/**/*.ts\"",
|
|
42
|
+
"lint-fix": "eslint \"./src/**/*.ts\" --fix"
|
|
36
43
|
},
|
|
37
44
|
"canEdit": [
|
|
38
45
|
"Developers"
|
package/src/package.ts
CHANGED
|
@@ -4,20 +4,21 @@ import * as ui from 'datagrok-api/ui';
|
|
|
4
4
|
import * as DG from 'datagrok-api/dg';
|
|
5
5
|
import {SequenceAlignment, Aligned} from './seq_align';
|
|
6
6
|
|
|
7
|
-
export
|
|
7
|
+
export const _package = new DG.Package();
|
|
8
8
|
|
|
9
9
|
import {WebLogo} from '@datagrok-libraries/bio/src/viewers/web-logo';
|
|
10
10
|
|
|
11
11
|
//name: sequenceAlignment
|
|
12
12
|
//input: string alignType {choices: ['Local alignment', 'Global alignment']}
|
|
13
|
+
// eslint-disable-next-line max-len
|
|
13
14
|
//input: string alignTable {choices: ['AUTO', 'NUCLEOTIDES', 'BLOSUM45', 'BLOSUM50','BLOSUM62','BLOSUM80','BLOSUM90','PAM30','PAM70','PAM250','SCHNEIDER','TRANS']}
|
|
14
15
|
//input: double gap
|
|
15
16
|
//input: string seq1
|
|
16
17
|
//input: string seq2
|
|
17
|
-
//output: object res
|
|
18
|
+
//output: object res
|
|
18
19
|
export function sequenceAlignment(alignType: string, alignTable: string, gap: number, seq1: string, seq2: string) {
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
const toAlign = new SequenceAlignment(seq1, seq2, gap, alignTable);
|
|
21
|
+
const res = alignType == 'Local alignment' ? toAlign.smithWaterman() : toAlign.needlemanWunch();
|
|
21
22
|
return res;
|
|
22
23
|
}
|
|
23
24
|
|
|
@@ -27,4 +28,4 @@ export function sequenceAlignment(alignType: string, alignTable: string, gap: nu
|
|
|
27
28
|
//output: viewer result
|
|
28
29
|
export function webLogoViewer() {
|
|
29
30
|
return new WebLogo();
|
|
30
|
-
}
|
|
31
|
+
}
|
package/webpack.config.js
CHANGED
|
@@ -3,16 +3,24 @@ const path = require('path');
|
|
|
3
3
|
module.exports = {
|
|
4
4
|
mode: 'development',
|
|
5
5
|
entry: {
|
|
6
|
-
package: './src/package.ts'
|
|
6
|
+
package: './src/package.ts',
|
|
7
7
|
},
|
|
8
8
|
resolve: {
|
|
9
|
-
fallback: {
|
|
10
|
-
extensions: ['.wasm', '.mjs', '.
|
|
9
|
+
fallback: {'url': false},
|
|
10
|
+
extensions: ['.wasm', '.mjs', '.ts', '.js', '.json', '.tsx'],
|
|
11
11
|
},
|
|
12
12
|
module: {
|
|
13
13
|
rules: [
|
|
14
|
-
{
|
|
15
|
-
|
|
14
|
+
{
|
|
15
|
+
test: /\.ts(x?)$/,
|
|
16
|
+
use: 'ts-loader',
|
|
17
|
+
exclude: /node_modules/,
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
test: /\.css$/,
|
|
21
|
+
use: ['style-loader', 'css-loader'],
|
|
22
|
+
exclude: /node_modules/,
|
|
23
|
+
},
|
|
16
24
|
],
|
|
17
25
|
},
|
|
18
26
|
devtool: 'inline-source-map',
|