@jbrowse/react-linear-genome-view2 3.2.0
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/LICENSE +201 -0
- package/README.md +72 -0
- package/dist/JBrowseLinearGenomeView/JBrowseLinearGenomeView.d.ts +5 -0
- package/dist/JBrowseLinearGenomeView/JBrowseLinearGenomeView.js +19 -0
- package/dist/JBrowseLinearGenomeView/JBrowseLinearGenomeView.test.d.ts +1 -0
- package/dist/JBrowseLinearGenomeView/JBrowseLinearGenomeView.test.js +77 -0
- package/dist/JBrowseLinearGenomeView/index.d.ts +1 -0
- package/dist/JBrowseLinearGenomeView/index.js +8 -0
- package/dist/corePlugins.d.ts +3 -0
- package/dist/corePlugins.js +38 -0
- package/dist/createModel/AboutDialog.d.ts +1 -0
- package/dist/createModel/AboutDialog.js +5 -0
- package/dist/createModel/createConfigModel.d.ts +94 -0
- package/dist/createModel/createConfigModel.js +43 -0
- package/dist/createModel/createModel.d.ts +3165 -0
- package/dist/createModel/createModel.js +118 -0
- package/dist/createModel/createSessionModel.d.ts +1170 -0
- package/dist/createModel/createSessionModel.js +118 -0
- package/dist/createModel/index.d.ts +3 -0
- package/dist/createModel/index.js +12 -0
- package/dist/createViewState.d.ts +8683 -0
- package/dist/createViewState.js +79 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +14 -0
- package/dist/loadPlugins.d.ts +13 -0
- package/dist/loadPlugins.js +12 -0
- package/dist/react-linear-genome-view.umd.production.min.js +185 -0
- package/dist/react-linear-genome-view.umd.production.min.js.LICENSE.txt +198 -0
- package/dist/react-linear-genome-view.umd.production.min.js.map +1 -0
- package/dist/rpcWorker.d.ts +2 -0
- package/dist/rpcWorker.js +49 -0
- package/dist/types.d.ts +5 -0
- package/dist/types.js +2 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +4 -0
- package/dist/webpack.d.ts +8 -0
- package/dist/webpack.js +53 -0
- package/dist/workerPolyfill.d.ts +0 -0
- package/dist/workerPolyfill.js +32 -0
- package/docs/example.md +91 -0
- package/docs/img/exampleView.png +0 -0
- package/esm/JBrowseLinearGenomeView/JBrowseLinearGenomeView.d.ts +5 -0
- package/esm/JBrowseLinearGenomeView/JBrowseLinearGenomeView.js +17 -0
- package/esm/JBrowseLinearGenomeView/index.d.ts +1 -0
- package/esm/JBrowseLinearGenomeView/index.js +1 -0
- package/esm/corePlugins.d.ts +3 -0
- package/esm/corePlugins.js +33 -0
- package/esm/createModel/AboutDialog.d.ts +1 -0
- package/esm/createModel/AboutDialog.js +1 -0
- package/esm/createModel/createConfigModel.d.ts +94 -0
- package/esm/createModel/createConfigModel.js +37 -0
- package/esm/createModel/createModel.d.ts +3165 -0
- package/esm/createModel/createModel.js +79 -0
- package/esm/createModel/createSessionModel.d.ts +1170 -0
- package/esm/createModel/createSessionModel.js +79 -0
- package/esm/createModel/index.d.ts +3 -0
- package/esm/createModel/index.js +3 -0
- package/esm/createViewState.d.ts +8683 -0
- package/esm/createViewState.js +73 -0
- package/esm/index.d.ts +5 -0
- package/esm/index.js +4 -0
- package/esm/loadPlugins.d.ts +13 -0
- package/esm/loadPlugins.js +6 -0
- package/esm/makeWorkerInstance.d.ts +1 -0
- package/esm/makeWorkerInstance.js +3 -0
- package/esm/rpcWorker.d.ts +2 -0
- package/esm/rpcWorker.js +10 -0
- package/esm/types.d.ts +5 -0
- package/esm/types.js +1 -0
- package/esm/version.d.ts +1 -0
- package/esm/version.js +1 -0
- package/esm/webpack.d.ts +8 -0
- package/esm/webpack.js +7 -0
- package/esm/workerPolyfill.d.ts +0 -0
- package/esm/workerPolyfill.js +32 -0
- package/package.json +84 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.default = doNothing;
|
|
40
|
+
require("./workerPolyfill");
|
|
41
|
+
const product_core_1 = require("@jbrowse/product-core");
|
|
42
|
+
const mobx_react_1 = require("mobx-react");
|
|
43
|
+
const corePlugins_1 = __importDefault(require("./corePlugins"));
|
|
44
|
+
(0, mobx_react_1.enableStaticRendering)(true);
|
|
45
|
+
(0, product_core_1.initializeWorker)(corePlugins_1.default, {
|
|
46
|
+
fetchESM: url => Promise.resolve(`${url}`).then(s => __importStar(require(s))),
|
|
47
|
+
});
|
|
48
|
+
function doNothing() {
|
|
49
|
+
}
|
package/dist/types.d.ts
ADDED
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const version: "3.2.0";
|
package/dist/version.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export { default as JBrowseLinearGenomeView } from './JBrowseLinearGenomeView';
|
|
3
|
+
export { default as createModel } from './createModel';
|
|
4
|
+
export { default as createViewState } from './createViewState';
|
|
5
|
+
export { default as loadPlugins } from './loadPlugins';
|
|
6
|
+
export type { ViewModel } from './createModel/createModel';
|
|
7
|
+
export * from 'react-dom/client';
|
|
8
|
+
export { React };
|
package/dist/webpack.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
36
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
|
+
};
|
|
38
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
+
};
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.React = exports.loadPlugins = exports.createViewState = exports.createModel = exports.JBrowseLinearGenomeView = void 0;
|
|
43
|
+
const React = __importStar(require("react"));
|
|
44
|
+
exports.React = React;
|
|
45
|
+
var JBrowseLinearGenomeView_1 = require("./JBrowseLinearGenomeView");
|
|
46
|
+
Object.defineProperty(exports, "JBrowseLinearGenomeView", { enumerable: true, get: function () { return __importDefault(JBrowseLinearGenomeView_1).default; } });
|
|
47
|
+
var createModel_1 = require("./createModel");
|
|
48
|
+
Object.defineProperty(exports, "createModel", { enumerable: true, get: function () { return __importDefault(createModel_1).default; } });
|
|
49
|
+
var createViewState_1 = require("./createViewState");
|
|
50
|
+
Object.defineProperty(exports, "createViewState", { enumerable: true, get: function () { return __importDefault(createViewState_1).default; } });
|
|
51
|
+
var loadPlugins_1 = require("./loadPlugins");
|
|
52
|
+
Object.defineProperty(exports, "loadPlugins", { enumerable: true, get: function () { return __importDefault(loadPlugins_1).default; } });
|
|
53
|
+
__exportStar(require("react-dom/client"), exports);
|
|
File without changes
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
self.window = {
|
|
3
|
+
addEventListener() { },
|
|
4
|
+
fetch: self.fetch.bind(self),
|
|
5
|
+
location: self.location,
|
|
6
|
+
Date: self.Date,
|
|
7
|
+
requestIdleCallback: cb => {
|
|
8
|
+
cb();
|
|
9
|
+
},
|
|
10
|
+
cancelIdleCallback: () => { },
|
|
11
|
+
requestAnimationFrame: cb => {
|
|
12
|
+
cb();
|
|
13
|
+
},
|
|
14
|
+
cancelAnimationFrame: () => { },
|
|
15
|
+
navigator: {},
|
|
16
|
+
};
|
|
17
|
+
self.document = {
|
|
18
|
+
createTextNode() { },
|
|
19
|
+
querySelector() {
|
|
20
|
+
return { appendChild() { } };
|
|
21
|
+
},
|
|
22
|
+
documentElement: {},
|
|
23
|
+
querySelectorAll: () => [],
|
|
24
|
+
createElement() {
|
|
25
|
+
return {
|
|
26
|
+
style: {},
|
|
27
|
+
setAttribute() { },
|
|
28
|
+
removeAttribute() { },
|
|
29
|
+
appendChild() { },
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
};
|
package/docs/example.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
This is an example of an assembly and tracks configuration for a simple human
|
|
2
|
+
genome example using publicly hosted data files. It includes the GRCh38
|
|
3
|
+
reference sequence and a genes track.
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import '@fontsource/roboto'
|
|
7
|
+
import {
|
|
8
|
+
createViewState,
|
|
9
|
+
JBrowseLinearGenomeView,
|
|
10
|
+
} from '@jbrowse/react-linear-genome-view2'
|
|
11
|
+
|
|
12
|
+
const assembly = {
|
|
13
|
+
name: 'GRCh38',
|
|
14
|
+
sequence: {
|
|
15
|
+
type: 'ReferenceSequenceTrack',
|
|
16
|
+
trackId: 'GRCh38-ReferenceSequenceTrack',
|
|
17
|
+
adapter: {
|
|
18
|
+
type: 'BgzipFastaAdapter',
|
|
19
|
+
uri: 'https://s3.amazonaws.com/jbrowse.org/genomes/GRCh38/fasta/GRCh38.fa.gz',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
aliases: ['hg38'],
|
|
23
|
+
refNameAliases: {
|
|
24
|
+
adapter: {
|
|
25
|
+
type: 'RefNameAliasAdapter',
|
|
26
|
+
uri: 'https://s3.amazonaws.com/jbrowse.org/genomes/GRCh38/hg38_aliases.txt',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const tracks = [
|
|
32
|
+
{
|
|
33
|
+
type: 'FeatureTrack',
|
|
34
|
+
trackId: 'ncbi_refseq_109_hg38',
|
|
35
|
+
name: 'NCBI RefSeq (GFF3Tabix)',
|
|
36
|
+
assemblyNames: ['GRCh38'],
|
|
37
|
+
category: ['Annotation'],
|
|
38
|
+
adapter: {
|
|
39
|
+
type: 'Gff3TabixAdapter',
|
|
40
|
+
uri: 'https://s3.amazonaws.com/jbrowse.org/genomes/GRCh38/ncbi_refseq/GCA_000001405.15_GRCh38_full_analysis_set.refseq_annotation.sorted.gff.gz',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
const defaultSession = {
|
|
46
|
+
name: 'My session',
|
|
47
|
+
view: {
|
|
48
|
+
id: 'linearGenomeView',
|
|
49
|
+
type: 'LinearGenomeView',
|
|
50
|
+
tracks: [
|
|
51
|
+
{
|
|
52
|
+
type: 'ReferenceSequenceTrack',
|
|
53
|
+
configuration: 'GRCh38-ReferenceSequenceTrack',
|
|
54
|
+
displays: [
|
|
55
|
+
{
|
|
56
|
+
type: 'LinearReferenceSequenceDisplay',
|
|
57
|
+
configuration:
|
|
58
|
+
'GRCh38-ReferenceSequenceTrack-LinearReferenceSequenceDisplay',
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
type: 'FeatureTrack',
|
|
64
|
+
configuration: 'ncbi_refseq_109_hg38',
|
|
65
|
+
displays: [
|
|
66
|
+
{
|
|
67
|
+
type: 'LinearBasicDisplay',
|
|
68
|
+
configuration: 'ncbi_refseq_109_hg38-LinearBasicDisplay',
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
},
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function View() {
|
|
77
|
+
const state = createViewState({
|
|
78
|
+
assembly,
|
|
79
|
+
tracks,
|
|
80
|
+
location: '10:29,838,737..29,838,819',
|
|
81
|
+
defaultSession,
|
|
82
|
+
})
|
|
83
|
+
return <JBrowseLinearGenomeView viewState={state} />
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export default View
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
This is what the component should look like:
|
|
90
|
+
|
|
91
|
+

|
|
Binary file
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Suspense } from 'react';
|
|
3
|
+
import { readConfObject } from '@jbrowse/core/configuration';
|
|
4
|
+
import { LoadingEllipses, createJBrowseTheme } from '@jbrowse/core/ui';
|
|
5
|
+
import { EmbeddedViewContainer, ModalWidget } from '@jbrowse/embedded-core';
|
|
6
|
+
import { ThemeProvider } from '@mui/material';
|
|
7
|
+
import { observer } from 'mobx-react';
|
|
8
|
+
import { getEnv } from 'mobx-state-tree';
|
|
9
|
+
const JBrowseLinearGenomeView = observer(function ({ viewState, }) {
|
|
10
|
+
const { session } = viewState;
|
|
11
|
+
const { view } = session;
|
|
12
|
+
const { pluginManager } = getEnv(session);
|
|
13
|
+
const { ReactComponent } = pluginManager.getViewType(view.type);
|
|
14
|
+
const theme = createJBrowseTheme(readConfObject(viewState.config.configuration, 'theme'));
|
|
15
|
+
return (_jsxs(ThemeProvider, { theme: theme, children: [_jsx(EmbeddedViewContainer, { view: view, children: _jsx(Suspense, { fallback: _jsx(LoadingEllipses, {}), children: _jsx(ReactComponent, { model: view, session: session }) }) }, `view-${view.id}`), _jsx(ModalWidget, { session: session })] }));
|
|
16
|
+
});
|
|
17
|
+
export default JBrowseLinearGenomeView;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './JBrowseLinearGenomeView';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './JBrowseLinearGenomeView';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import Alignments from '@jbrowse/plugin-alignments';
|
|
2
|
+
import Arc from '@jbrowse/plugin-arc';
|
|
3
|
+
import Authentication from '@jbrowse/plugin-authentication';
|
|
4
|
+
import BED from '@jbrowse/plugin-bed';
|
|
5
|
+
import Config from '@jbrowse/plugin-config';
|
|
6
|
+
import DataManagement from '@jbrowse/plugin-data-management';
|
|
7
|
+
import GCContent from '@jbrowse/plugin-gccontent';
|
|
8
|
+
import GFF3 from '@jbrowse/plugin-gff3';
|
|
9
|
+
import LegacyJBrowse from '@jbrowse/plugin-legacy-jbrowse';
|
|
10
|
+
import LinearGenomeView from '@jbrowse/plugin-linear-genome-view';
|
|
11
|
+
import Sequence from '@jbrowse/plugin-sequence';
|
|
12
|
+
import SVG from '@jbrowse/plugin-svg';
|
|
13
|
+
import Trix from '@jbrowse/plugin-trix';
|
|
14
|
+
import Variants from '@jbrowse/plugin-variants';
|
|
15
|
+
import Wiggle from '@jbrowse/plugin-wiggle';
|
|
16
|
+
const corePlugins = [
|
|
17
|
+
SVG,
|
|
18
|
+
Alignments,
|
|
19
|
+
Authentication,
|
|
20
|
+
BED,
|
|
21
|
+
Config,
|
|
22
|
+
DataManagement,
|
|
23
|
+
GFF3,
|
|
24
|
+
LegacyJBrowse,
|
|
25
|
+
LinearGenomeView,
|
|
26
|
+
Sequence,
|
|
27
|
+
Variants,
|
|
28
|
+
Wiggle,
|
|
29
|
+
GCContent,
|
|
30
|
+
Trix,
|
|
31
|
+
Arc,
|
|
32
|
+
];
|
|
33
|
+
export default corePlugins;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AboutDialog as default } from '@jbrowse/product-core';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AboutDialog as default } from '@jbrowse/product-core';
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
+
import type { IAnyType } from 'mobx-state-tree';
|
|
3
|
+
export default function createConfigModel(pluginManager: PluginManager, assemblyConfigSchemasType: IAnyType): import("mobx-state-tree").IModelType<{
|
|
4
|
+
configuration: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
5
|
+
rpc: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
6
|
+
defaultDriver: {
|
|
7
|
+
type: string;
|
|
8
|
+
description: string;
|
|
9
|
+
defaultValue: string;
|
|
10
|
+
};
|
|
11
|
+
drivers: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IMapType<import("mobx-state-tree").ITypeUnion<import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<Record<string, any>>> | undefined, import("mobx-state-tree").ModelSnapshotType<Record<string, any>>, ({} & Partial<import("mobx-state-tree/dist/internal").ExtractCFromProps<Record<string, any>>> & import("mobx-state-tree/dist/internal").NonEmptyObject) | undefined>>, [undefined]>;
|
|
12
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
13
|
+
highResolutionScaling: {
|
|
14
|
+
type: string;
|
|
15
|
+
defaultValue: number;
|
|
16
|
+
};
|
|
17
|
+
hierarchical: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
18
|
+
sort: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
19
|
+
trackNames: {
|
|
20
|
+
type: string;
|
|
21
|
+
defaultValue: boolean;
|
|
22
|
+
};
|
|
23
|
+
categories: {
|
|
24
|
+
type: string;
|
|
25
|
+
defaultValue: boolean;
|
|
26
|
+
};
|
|
27
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
28
|
+
defaultCollapsed: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
29
|
+
categoryNames: {
|
|
30
|
+
type: string;
|
|
31
|
+
defaultValue: never[];
|
|
32
|
+
};
|
|
33
|
+
topLevelCategories: {
|
|
34
|
+
type: string;
|
|
35
|
+
defaultValue: boolean;
|
|
36
|
+
};
|
|
37
|
+
subCategories: {
|
|
38
|
+
type: string;
|
|
39
|
+
defaultValue: boolean;
|
|
40
|
+
};
|
|
41
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
42
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
43
|
+
formatDetails: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
44
|
+
feature: {
|
|
45
|
+
type: string;
|
|
46
|
+
description: string;
|
|
47
|
+
defaultValue: {};
|
|
48
|
+
contextVariable: string[];
|
|
49
|
+
};
|
|
50
|
+
subfeatures: {
|
|
51
|
+
type: string;
|
|
52
|
+
description: string;
|
|
53
|
+
defaultValue: {};
|
|
54
|
+
contextVariable: string[];
|
|
55
|
+
};
|
|
56
|
+
depth: {
|
|
57
|
+
type: string;
|
|
58
|
+
defaultValue: number;
|
|
59
|
+
description: string;
|
|
60
|
+
};
|
|
61
|
+
maxDepth: {
|
|
62
|
+
type: string;
|
|
63
|
+
defaultValue: number;
|
|
64
|
+
description: string;
|
|
65
|
+
};
|
|
66
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
67
|
+
formatAbout: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
68
|
+
config: {
|
|
69
|
+
type: string;
|
|
70
|
+
description: string;
|
|
71
|
+
defaultValue: {};
|
|
72
|
+
contextVariable: string[];
|
|
73
|
+
};
|
|
74
|
+
hideUris: {
|
|
75
|
+
type: string;
|
|
76
|
+
defaultValue: boolean;
|
|
77
|
+
};
|
|
78
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
79
|
+
theme: {
|
|
80
|
+
type: string;
|
|
81
|
+
defaultValue: {};
|
|
82
|
+
};
|
|
83
|
+
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
84
|
+
assembly: IAnyType;
|
|
85
|
+
tracks: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
86
|
+
internetAccounts: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
87
|
+
connections: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
88
|
+
aggregateTextSearchAdapters: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
89
|
+
plugins: import("mobx-state-tree").IType<any, any, any>;
|
|
90
|
+
}, {
|
|
91
|
+
readonly assemblies: any[];
|
|
92
|
+
readonly assemblyName: string;
|
|
93
|
+
readonly rpcManager: any;
|
|
94
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ConfigurationSchema, readConfObject, } from '@jbrowse/core/configuration';
|
|
2
|
+
import RpcManager from '@jbrowse/core/rpc/RpcManager';
|
|
3
|
+
import { FormatAboutConfigSchemaFactory, FormatDetailsConfigSchemaFactory, HierarchicalConfigSchemaFactory, } from '@jbrowse/product-core';
|
|
4
|
+
import { getParent, types } from 'mobx-state-tree';
|
|
5
|
+
export default function createConfigModel(pluginManager, assemblyConfigSchemasType) {
|
|
6
|
+
return types
|
|
7
|
+
.model('Configuration', {
|
|
8
|
+
configuration: ConfigurationSchema('Root', {
|
|
9
|
+
rpc: RpcManager.configSchema,
|
|
10
|
+
highResolutionScaling: {
|
|
11
|
+
type: 'number',
|
|
12
|
+
defaultValue: 2,
|
|
13
|
+
},
|
|
14
|
+
hierarchical: HierarchicalConfigSchemaFactory(),
|
|
15
|
+
formatDetails: FormatDetailsConfigSchemaFactory(),
|
|
16
|
+
formatAbout: FormatAboutConfigSchemaFactory(),
|
|
17
|
+
theme: { type: 'frozen', defaultValue: {} },
|
|
18
|
+
}),
|
|
19
|
+
assembly: assemblyConfigSchemasType,
|
|
20
|
+
tracks: types.array(pluginManager.pluggableConfigSchemaType('track')),
|
|
21
|
+
internetAccounts: types.array(pluginManager.pluggableConfigSchemaType('internet account')),
|
|
22
|
+
connections: types.array(pluginManager.pluggableConfigSchemaType('connection')),
|
|
23
|
+
aggregateTextSearchAdapters: types.array(pluginManager.pluggableConfigSchemaType('text search adapter')),
|
|
24
|
+
plugins: types.frozen(),
|
|
25
|
+
})
|
|
26
|
+
.views(self => ({
|
|
27
|
+
get assemblies() {
|
|
28
|
+
return [self.assembly];
|
|
29
|
+
},
|
|
30
|
+
get assemblyName() {
|
|
31
|
+
return readConfObject(self.assembly, 'name');
|
|
32
|
+
},
|
|
33
|
+
get rpcManager() {
|
|
34
|
+
return getParent(self).rpcManager;
|
|
35
|
+
},
|
|
36
|
+
}));
|
|
37
|
+
}
|