@datagrok/bio 0.0.4 → 0.0.8
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/dist/package.js +861 -8
- package/package.json +41 -29
- package/src/package.ts +18 -7
- package/webpack.config.js +14 -6
package/package.json
CHANGED
|
@@ -1,35 +1,47 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
"name": "@datagrok/bio",
|
|
3
|
+
"beta": false,
|
|
4
|
+
"friendlyName": "Bio",
|
|
5
|
+
"version": "0.0.8",
|
|
6
|
+
"description": "",
|
|
7
|
+
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/datagrok-ai/public.git",
|
|
10
10
|
"directory": "packages/Bio"
|
|
11
11
|
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@datagrok-libraries/bio": "^0.0.16",
|
|
14
|
+
"cash-dom": "latest",
|
|
15
|
+
"datagrok-api": "^1.0.0",
|
|
16
|
+
"dayjs": "latest",
|
|
17
|
+
"ts-loader": "^9.2.5",
|
|
18
|
+
"typescript": "^4.4.2"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@typescript-eslint/eslint-plugin": "latest",
|
|
22
|
+
"@typescript-eslint/parser": "latest",
|
|
23
|
+
"eslint": "latest",
|
|
24
|
+
"eslint-config-google": "latest",
|
|
25
|
+
"webpack": "latest",
|
|
26
|
+
"webpack-cli": "latest"
|
|
27
|
+
},
|
|
28
|
+
"scripts": {
|
|
29
|
+
"link-api": "npm link datagrok-api",
|
|
30
|
+
"link-bio": "npm link @datagrok-libraries/bio",
|
|
31
|
+
"link-all": "npm link datagrok-api @datagrok-libraries/bio",
|
|
32
|
+
"debug-sequences1": "grok publish --rebuild",
|
|
33
|
+
"release-sequences1": "grok publish --rebuild --release",
|
|
34
|
+
"build-sequences1": "webpack",
|
|
35
|
+
"local-bio": "grok publish local",
|
|
36
|
+
"build": "webpack",
|
|
37
|
+
"debug-sequences1-public": "grok publish public --rebuild",
|
|
38
|
+
"release-sequences1-public": "grok publish public --rebuild --release",
|
|
39
|
+
"debug-sequences1-local": "grok publish local --rebuild",
|
|
40
|
+
"release-sequences1-local": "grok publish local --rebuild --release",
|
|
41
|
+
"lint": "eslint \"./src/**/*.ts\"",
|
|
42
|
+
"lint-fix": "eslint \"./src/**/*.ts\" --fix"
|
|
43
|
+
},
|
|
44
|
+
"canEdit": [
|
|
45
|
+
"Developers"
|
|
46
|
+
]
|
|
35
47
|
}
|
package/src/package.ts
CHANGED
|
@@ -2,19 +2,30 @@
|
|
|
2
2
|
import * as grok from 'datagrok-api/grok';
|
|
3
3
|
import * as ui from 'datagrok-api/ui';
|
|
4
4
|
import * as DG from 'datagrok-api/dg';
|
|
5
|
-
import {
|
|
6
|
-
export let _package = new DG.Package();
|
|
5
|
+
import {SequenceAlignment, Aligned} from './seq_align';
|
|
7
6
|
|
|
7
|
+
export const _package = new DG.Package();
|
|
8
|
+
|
|
9
|
+
import {WebLogo} from '@datagrok-libraries/bio/src/viewers/web-logo';
|
|
8
10
|
|
|
9
11
|
//name: sequenceAlignment
|
|
10
12
|
//input: string alignType {choices: ['Local alignment', 'Global alignment']}
|
|
13
|
+
// eslint-disable-next-line max-len
|
|
11
14
|
//input: string alignTable {choices: ['AUTO', 'NUCLEOTIDES', 'BLOSUM45', 'BLOSUM50','BLOSUM62','BLOSUM80','BLOSUM90','PAM30','PAM70','PAM250','SCHNEIDER','TRANS']}
|
|
12
15
|
//input: double gap
|
|
13
16
|
//input: string seq1
|
|
14
17
|
//input: string seq2
|
|
15
|
-
//output: object res
|
|
16
|
-
export function sequenceAlignment(alignType:string, alignTable:string, gap:number, seq1:string, seq2:string){
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
//output: object res
|
|
19
|
+
export function sequenceAlignment(alignType: string, alignTable: string, gap: number, seq1: string, seq2: string) {
|
|
20
|
+
const toAlign = new SequenceAlignment(seq1, seq2, gap, alignTable);
|
|
21
|
+
const res = alignType == 'Local alignment' ? toAlign.smithWaterman() : toAlign.needlemanWunch();
|
|
22
|
+
return res;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
//name: WebLogo
|
|
26
|
+
//description: WebLogo viewer
|
|
27
|
+
//tags: viewer, panel
|
|
28
|
+
//output: viewer result
|
|
29
|
+
export function webLogoViewer() {
|
|
30
|
+
return new WebLogo();
|
|
20
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',
|
|
@@ -28,7 +36,7 @@ module.exports = {
|
|
|
28
36
|
},
|
|
29
37
|
output: {
|
|
30
38
|
filename: '[name].js',
|
|
31
|
-
library: '
|
|
39
|
+
library: 'bio',
|
|
32
40
|
libraryTarget: 'var',
|
|
33
41
|
path: path.resolve(__dirname, 'dist'),
|
|
34
42
|
},
|