@jbrowse/plugin-gccontent 2.16.1 → 2.18.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/dist/GCContentAdapter/GCContentAdapter.d.ts +5 -9
- package/dist/GCContentAdapter/GCContentAdapter.js +47 -42
- package/dist/GCContentAdapter/configSchema.d.ts +1 -10
- package/dist/GCContentAdapter/configSchema.js +1 -14
- package/dist/GCContentAdapter/index.d.ts +1 -1
- package/dist/GCContentTrack/configSchema.d.ts +1 -1
- package/dist/GCContentTrack/configSchema.js +1 -8
- package/dist/GCContentTrack/index.d.ts +1 -1
- package/dist/LinearGCContentDisplay/components/EditGCContentParams.js +3 -3
- package/dist/LinearGCContentDisplay/config1.d.ts +1 -6
- package/dist/LinearGCContentDisplay/config1.js +0 -8
- package/dist/LinearGCContentDisplay/config2.d.ts +1 -6
- package/dist/LinearGCContentDisplay/config2.js +0 -8
- package/dist/LinearGCContentDisplay/index.d.ts +1 -1
- package/dist/LinearGCContentDisplay/shared.d.ts +16 -43
- package/dist/LinearGCContentDisplay/shared.js +4 -21
- package/dist/LinearGCContentDisplay/stateModel1.d.ts +16 -29
- package/dist/LinearGCContentDisplay/stateModel1.js +0 -6
- package/dist/LinearGCContentDisplay/stateModel2.d.ts +16 -34
- package/dist/LinearGCContentDisplay/stateModel2.js +0 -11
- package/dist/index.d.ts +1 -1
- package/dist/index.js +0 -1
- package/esm/GCContentAdapter/GCContentAdapter.d.ts +5 -9
- package/esm/GCContentAdapter/GCContentAdapter.js +47 -42
- package/esm/GCContentAdapter/configSchema.d.ts +1 -10
- package/esm/GCContentAdapter/configSchema.js +1 -14
- package/esm/GCContentAdapter/index.d.ts +1 -1
- package/esm/GCContentTrack/configSchema.d.ts +1 -1
- package/esm/GCContentTrack/configSchema.js +1 -8
- package/esm/GCContentTrack/index.d.ts +1 -1
- package/esm/LinearGCContentDisplay/components/EditGCContentParams.js +3 -3
- package/esm/LinearGCContentDisplay/config1.d.ts +1 -6
- package/esm/LinearGCContentDisplay/config1.js +0 -8
- package/esm/LinearGCContentDisplay/config2.d.ts +1 -6
- package/esm/LinearGCContentDisplay/config2.js +0 -8
- package/esm/LinearGCContentDisplay/index.d.ts +1 -1
- package/esm/LinearGCContentDisplay/shared.d.ts +16 -43
- package/esm/LinearGCContentDisplay/shared.js +5 -22
- package/esm/LinearGCContentDisplay/stateModel1.d.ts +16 -29
- package/esm/LinearGCContentDisplay/stateModel1.js +0 -6
- package/esm/LinearGCContentDisplay/stateModel2.d.ts +16 -34
- package/esm/LinearGCContentDisplay/stateModel2.js +0 -11
- package/esm/index.d.ts +1 -1
- package/esm/index.js +0 -1
- package/package.json +2 -2
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import { BaseFeatureDataAdapter
|
|
2
|
-
import {
|
|
1
|
+
import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
2
|
+
import type { BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
3
|
+
import type { Feature, Region } from '@jbrowse/core/util';
|
|
3
4
|
export default class GCContentAdapter extends BaseFeatureDataAdapter {
|
|
4
5
|
private gcMode;
|
|
5
6
|
static capabilities: string[];
|
|
6
7
|
configure(): Promise<BaseFeatureDataAdapter>;
|
|
7
|
-
getRefNames(): Promise<string[]>;
|
|
8
|
-
getFeatures(query: Region, opts
|
|
9
|
-
/**
|
|
10
|
-
* called to provide a hint that data tied to a certain region
|
|
11
|
-
* will not be needed for the foreseeable future and can be purged
|
|
12
|
-
* from caches, etc
|
|
13
|
-
*/
|
|
8
|
+
getRefNames(opts?: BaseOptions): Promise<string[]>;
|
|
9
|
+
getFeatures(query: Region, opts?: BaseOptions): import("rxjs").Observable<Feature>;
|
|
14
10
|
freeResources(): void;
|
|
15
11
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const BaseAdapter_1 = require("@jbrowse/core/data_adapters/BaseAdapter");
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const rxjs_2 = require("@jbrowse/core/util/rxjs");
|
|
6
4
|
const util_1 = require("@jbrowse/core/util");
|
|
5
|
+
const rxjs_1 = require("@jbrowse/core/util/rxjs");
|
|
6
|
+
const stopToken_1 = require("@jbrowse/core/util/stopToken");
|
|
7
|
+
const rxjs_2 = require("rxjs");
|
|
7
8
|
const operators_1 = require("rxjs/operators");
|
|
8
9
|
class GCContentAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
9
10
|
constructor() {
|
|
@@ -18,17 +19,18 @@ class GCContentAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
18
19
|
}
|
|
19
20
|
return adapter.dataAdapter;
|
|
20
21
|
}
|
|
21
|
-
async getRefNames() {
|
|
22
|
+
async getRefNames(opts) {
|
|
22
23
|
const adapter = await this.configure();
|
|
23
|
-
return adapter.getRefNames();
|
|
24
|
+
return adapter.getRefNames(opts);
|
|
24
25
|
}
|
|
25
26
|
getFeatures(query, opts) {
|
|
26
|
-
|
|
27
|
+
const { statusCallback = () => { }, stopToken } = opts || {};
|
|
28
|
+
return (0, rxjs_1.ObservableCreate)(async (observer) => {
|
|
27
29
|
var _a;
|
|
28
30
|
const sequenceAdapter = await this.configure();
|
|
29
31
|
const windowSize = this.getConf('windowSize');
|
|
30
32
|
const windowDelta = this.getConf('windowDelta');
|
|
31
|
-
const hw = windowSize === 1 ? 1 : windowSize / 2;
|
|
33
|
+
const hw = windowSize === 1 ? 1 : windowSize / 2;
|
|
32
34
|
const f = windowSize === 1;
|
|
33
35
|
let { start: queryStart, end: queryEnd } = query;
|
|
34
36
|
queryStart = Math.max(0, queryStart - hw);
|
|
@@ -37,52 +39,55 @@ class GCContentAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
37
39
|
observer.complete();
|
|
38
40
|
return;
|
|
39
41
|
}
|
|
40
|
-
const
|
|
42
|
+
const feats = await (0, rxjs_2.firstValueFrom)(sequenceAdapter
|
|
43
|
+
.getFeatures({
|
|
41
44
|
...query,
|
|
42
45
|
start: queryStart,
|
|
43
46
|
end: queryEnd,
|
|
44
|
-
}, opts)
|
|
45
|
-
|
|
47
|
+
}, opts)
|
|
48
|
+
.pipe((0, operators_1.toArray)()));
|
|
46
49
|
const residues = ((_a = feats[0]) === null || _a === void 0 ? void 0 : _a.get('seq')) || '';
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
let
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
if (letter === 'c' || letter === 'C') {
|
|
54
|
-
nc++;
|
|
50
|
+
let start = performance.now();
|
|
51
|
+
await (0, util_1.updateStatus)('Calculating GC', statusCallback, () => {
|
|
52
|
+
for (let i = hw; i < residues.length - hw; i += windowDelta) {
|
|
53
|
+
if (performance.now() - start > 400) {
|
|
54
|
+
(0, stopToken_1.checkStopToken)(stopToken);
|
|
55
|
+
start = performance.now();
|
|
55
56
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
const r = f ? residues[i] : residues.slice(i - hw, i + hw);
|
|
58
|
+
let nc = 0;
|
|
59
|
+
let ng = 0;
|
|
60
|
+
let len = 0;
|
|
61
|
+
for (const letter of r) {
|
|
62
|
+
if (letter === 'c' || letter === 'C') {
|
|
63
|
+
nc++;
|
|
64
|
+
}
|
|
65
|
+
else if (letter === 'g' || letter === 'G') {
|
|
66
|
+
ng++;
|
|
67
|
+
}
|
|
68
|
+
if (letter !== 'N') {
|
|
69
|
+
len++;
|
|
70
|
+
}
|
|
61
71
|
}
|
|
72
|
+
const pos = queryStart;
|
|
73
|
+
const score = this.gcMode === 'content'
|
|
74
|
+
? (ng + nc) / (len || 1)
|
|
75
|
+
: this.gcMode === 'skew'
|
|
76
|
+
? (ng - nc) / (ng + nc || 1)
|
|
77
|
+
: 0;
|
|
78
|
+
observer.next(new util_1.SimpleFeature({
|
|
79
|
+
uniqueId: `${this.id}_${pos + i}`,
|
|
80
|
+
refName: query.refName,
|
|
81
|
+
start: pos + i,
|
|
82
|
+
end: pos + i + windowDelta,
|
|
83
|
+
score,
|
|
84
|
+
}));
|
|
62
85
|
}
|
|
63
|
-
|
|
64
|
-
const score = this.gcMode === 'content'
|
|
65
|
-
? (ng + nc) / (len || 1)
|
|
66
|
-
: this.gcMode === 'skew'
|
|
67
|
-
? (ng - nc) / (ng + nc || 1)
|
|
68
|
-
: 0;
|
|
69
|
-
observer.next(new util_1.SimpleFeature({
|
|
70
|
-
uniqueId: `${this.id}_${pos + i}`,
|
|
71
|
-
refName: query.refName,
|
|
72
|
-
start: pos + i,
|
|
73
|
-
end: pos + i + windowDelta,
|
|
74
|
-
score,
|
|
75
|
-
}));
|
|
76
|
-
}
|
|
86
|
+
});
|
|
77
87
|
observer.complete();
|
|
78
88
|
});
|
|
79
89
|
}
|
|
80
|
-
|
|
81
|
-
* called to provide a hint that data tied to a certain region
|
|
82
|
-
* will not be needed for the foreseeable future and can be purged
|
|
83
|
-
* from caches, etc
|
|
84
|
-
*/
|
|
85
|
-
freeResources( /* { region } */) { }
|
|
90
|
+
freeResources() { }
|
|
86
91
|
}
|
|
87
92
|
GCContentAdapter.capabilities = ['hasLocalStats'];
|
|
88
93
|
exports.default = GCContentAdapter;
|
|
@@ -1,22 +1,13 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
declare const GCContentAdapterF: (_pluginManager: PluginManager) => import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
3
|
-
/**
|
|
4
|
-
* #slot
|
|
5
|
-
*/
|
|
6
3
|
sequenceAdapter: {
|
|
7
4
|
type: string;
|
|
8
5
|
defaultValue: null;
|
|
9
6
|
};
|
|
10
|
-
/**
|
|
11
|
-
* #slot
|
|
12
|
-
*/
|
|
13
7
|
windowSize: {
|
|
14
8
|
type: string;
|
|
15
9
|
defaultValue: number;
|
|
16
10
|
};
|
|
17
|
-
/**
|
|
18
|
-
* #slot
|
|
19
|
-
*/
|
|
20
11
|
windowDelta: {
|
|
21
12
|
type: string;
|
|
22
13
|
defaultValue: number;
|
|
@@ -1,30 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
4
|
-
|
|
5
|
-
* #config GCContentAdapter
|
|
6
|
-
* #category adapter
|
|
7
|
-
*/
|
|
8
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
4
|
+
function x() { }
|
|
9
5
|
const GCContentAdapterF = (_pluginManager) => {
|
|
10
6
|
return (0, configuration_1.ConfigurationSchema)('GCContentAdapter', {
|
|
11
|
-
/**
|
|
12
|
-
* #slot
|
|
13
|
-
*/
|
|
14
7
|
sequenceAdapter: {
|
|
15
8
|
type: 'frozen',
|
|
16
9
|
defaultValue: null,
|
|
17
10
|
},
|
|
18
|
-
/**
|
|
19
|
-
* #slot
|
|
20
|
-
*/
|
|
21
11
|
windowSize: {
|
|
22
12
|
type: 'number',
|
|
23
13
|
defaultValue: 100,
|
|
24
14
|
},
|
|
25
|
-
/**
|
|
26
|
-
* #slot
|
|
27
|
-
*/
|
|
28
15
|
windowDelta: {
|
|
29
16
|
type: 'number',
|
|
30
17
|
defaultValue: 100,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function GCContentAdapterF(pluginManager: PluginManager): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
declare const configSchema: (pluginManager: PluginManager) => import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
3
3
|
name: {
|
|
4
4
|
description: string;
|
|
@@ -2,15 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
4
4
|
const pluggableElementTypes_1 = require("@jbrowse/core/pluggableElementTypes");
|
|
5
|
-
|
|
6
|
-
* #config GCContentTrack
|
|
7
|
-
* used for having a gc content track outside of the "reference sequence display"
|
|
8
|
-
*/
|
|
9
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
5
|
+
function x() { }
|
|
10
6
|
const configSchema = (pluginManager) => (0, configuration_1.ConfigurationSchema)('GCContentTrack', {}, {
|
|
11
|
-
/**
|
|
12
|
-
* #baseConfiguration
|
|
13
|
-
*/
|
|
14
7
|
baseConfiguration: (0, pluggableElementTypes_1.createBaseTrackConfig)(pluginManager),
|
|
15
8
|
});
|
|
16
9
|
exports.default = configSchema;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function GCContentTrackF(pm: PluginManager): void;
|
|
@@ -24,16 +24,16 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
const react_1 = __importStar(require("react"));
|
|
27
|
-
const mobx_react_1 = require("mobx-react");
|
|
28
|
-
const material_1 = require("@mui/material");
|
|
29
27
|
const ui_1 = require("@jbrowse/core/ui");
|
|
28
|
+
const material_1 = require("@mui/material");
|
|
29
|
+
const mobx_react_1 = require("mobx-react");
|
|
30
30
|
const EditGCContentParamsDialog = (0, mobx_react_1.observer)(function ({ model, handleClose, }) {
|
|
31
31
|
const [windowSize, setWindowSize] = (0, react_1.useState)(`${model.windowSizeSetting}`);
|
|
32
32
|
const [windowDelta, setWindowDelta] = (0, react_1.useState)(`${model.windowDeltaSetting}`);
|
|
33
33
|
return (react_1.default.createElement(ui_1.Dialog, { open: true, onClose: handleClose, title: "Edit GC content params" },
|
|
34
34
|
react_1.default.createElement(material_1.DialogContent, null,
|
|
35
35
|
react_1.default.createElement(material_1.Typography, null, "GC content is calculated in a particular sliding window of size N, and then the sliding window moves (steps) some number of bases M forward. Note that small step sizes can result in high CPU over large areas, and it is not recommended to make the step size larger than the window size as then the sliding window will miss contents."),
|
|
36
|
-
windowDelta > windowSize ? (react_1.default.createElement(ui_1.ErrorMessage, { error: "It is not recommended to make the step size larger than the window size" })) : null,
|
|
36
|
+
+windowDelta > +windowSize ? (react_1.default.createElement(ui_1.ErrorMessage, { error: "It is not recommended to make the step size larger than the window size" })) : null,
|
|
37
37
|
react_1.default.createElement(material_1.TextField, { label: "Size of sliding window (bp)", value: windowSize, onChange: event => {
|
|
38
38
|
setWindowSize(event.target.value);
|
|
39
39
|
} }),
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
/**
|
|
3
|
-
* #config LinearGCContentDisplay
|
|
4
|
-
* #category display
|
|
5
|
-
* extends LinearWiggleDisplay
|
|
6
|
-
*/
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
7
2
|
export default function LinearGCContentDisplay(pluginManager: PluginManager): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
8
3
|
windowSize: {
|
|
9
4
|
type: string;
|
|
@@ -2,11 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = LinearGCContentDisplay;
|
|
4
4
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
5
|
-
/**
|
|
6
|
-
* #config LinearGCContentDisplay
|
|
7
|
-
* #category display
|
|
8
|
-
* extends LinearWiggleDisplay
|
|
9
|
-
*/
|
|
10
5
|
function LinearGCContentDisplay(pluginManager) {
|
|
11
6
|
return (0, configuration_1.ConfigurationSchema)('LinearGCContentDisplay', {
|
|
12
7
|
windowSize: {
|
|
@@ -18,9 +13,6 @@ function LinearGCContentDisplay(pluginManager) {
|
|
|
18
13
|
defaultValue: 100,
|
|
19
14
|
},
|
|
20
15
|
}, {
|
|
21
|
-
/**
|
|
22
|
-
* #baseConfiguration
|
|
23
|
-
*/
|
|
24
16
|
baseConfiguration: pluginManager.getDisplayType('LinearWiggleDisplay')
|
|
25
17
|
.configSchema,
|
|
26
18
|
explicitlyTyped: true,
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
/**
|
|
3
|
-
* #config LinearGCContentTrackDisplay
|
|
4
|
-
* #category display
|
|
5
|
-
* extends LinearWiggleDisplay, used specifically for GCContentTrack
|
|
6
|
-
*/
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
7
2
|
export default function LinearGCContentTrackDisplayF(pluginManager: PluginManager): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
8
3
|
windowSize: {
|
|
9
4
|
type: string;
|
|
@@ -2,11 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = LinearGCContentTrackDisplayF;
|
|
4
4
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
5
|
-
/**
|
|
6
|
-
* #config LinearGCContentTrackDisplay
|
|
7
|
-
* #category display
|
|
8
|
-
* extends LinearWiggleDisplay, used specifically for GCContentTrack
|
|
9
|
-
*/
|
|
10
5
|
function LinearGCContentTrackDisplayF(pluginManager) {
|
|
11
6
|
return (0, configuration_1.ConfigurationSchema)('LinearGCContentTrackDisplay', {
|
|
12
7
|
windowSize: {
|
|
@@ -18,9 +13,6 @@ function LinearGCContentTrackDisplayF(pluginManager) {
|
|
|
18
13
|
defaultValue: 100,
|
|
19
14
|
},
|
|
20
15
|
}, {
|
|
21
|
-
/**
|
|
22
|
-
* #baseConfiguration
|
|
23
|
-
*/
|
|
24
16
|
baseConfiguration: pluginManager.getDisplayType('LinearWiggleDisplay')
|
|
25
17
|
.configSchema,
|
|
26
18
|
explicitlyTyped: true,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function LinearGCContentDisplayF(pluginManager: PluginManager): void;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
/**
|
|
4
|
-
* #stateModel SharedGCContentModel
|
|
5
|
-
* #category display
|
|
6
|
-
* extends
|
|
7
|
-
* - [LinearWiggleDisplay](../linearwiggledisplay)
|
|
8
|
-
*/
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
+
import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
9
3
|
export default function SharedModelF(pluginManager: PluginManager, configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
10
4
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
11
5
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
@@ -18,23 +12,12 @@ export default function SharedModelF(pluginManager: PluginManager, configSchema:
|
|
|
18
12
|
} & {
|
|
19
13
|
blockState: import("mobx-state-tree").IMapType<import("mobx-state-tree").IModelType<{
|
|
20
14
|
key: import("mobx-state-tree").ISimpleType<string>;
|
|
21
|
-
region: import("mobx-state-tree").
|
|
22
|
-
refName: import("mobx-state-tree").ISimpleType<string>;
|
|
23
|
-
start: import("mobx-state-tree").ISimpleType<number>;
|
|
24
|
-
end: import("mobx-state-tree").ISimpleType<number>;
|
|
25
|
-
reversed: import("mobx-state-tree" /**
|
|
26
|
-
* #property
|
|
27
|
-
*/).IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
28
|
-
} & {
|
|
29
|
-
assemblyName: import("mobx-state-tree").ISimpleType<string>;
|
|
30
|
-
}, {
|
|
31
|
-
setRefName(newRefName: string): void;
|
|
32
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
15
|
+
region: import("mobx-state-tree").IType<import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region>;
|
|
33
16
|
reloadFlag: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
34
17
|
isLeftEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
35
18
|
isRightEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
36
19
|
}, {
|
|
37
|
-
|
|
20
|
+
stopToken: string | undefined;
|
|
38
21
|
filled: boolean;
|
|
39
22
|
reactElement: React.ReactElement | undefined;
|
|
40
23
|
features: Map<string, import("@jbrowse/core/util").Feature> | undefined;
|
|
@@ -58,15 +41,9 @@ export default function SharedModelF(pluginManager: PluginManager, configSchema:
|
|
|
58
41
|
doReload(): void;
|
|
59
42
|
afterAttach(): void;
|
|
60
43
|
setStatus(message: string): void;
|
|
61
|
-
setLoading(
|
|
44
|
+
setLoading(newStopToken: string): void;
|
|
62
45
|
setMessage(messageText: string): void;
|
|
63
|
-
setRendered(props:
|
|
64
|
-
reactElement: React.ReactElement;
|
|
65
|
-
features: Map<string, import("@jbrowse/core/util").Feature>;
|
|
66
|
-
layout: any;
|
|
67
|
-
maxHeightReached: boolean;
|
|
68
|
-
renderProps: any;
|
|
69
|
-
} | undefined): void;
|
|
46
|
+
setRendered(props: import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/models/serverSideRenderedBlock").RenderedProps | undefined): void;
|
|
70
47
|
setError(error: unknown): void;
|
|
71
48
|
reload(): void;
|
|
72
49
|
beforeDestroy(): void;
|
|
@@ -120,13 +97,7 @@ export default function SharedModelF(pluginManager: PluginManager, configSchema:
|
|
|
120
97
|
} & {
|
|
121
98
|
type: import("mobx-state-tree").ISimpleType<"LinearWiggleDisplay">;
|
|
122
99
|
} & {
|
|
123
|
-
/**
|
|
124
|
-
* #property
|
|
125
|
-
*/
|
|
126
100
|
windowSize: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
127
|
-
/**
|
|
128
|
-
* #property
|
|
129
|
-
*/
|
|
130
101
|
windowDelta: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<number>>;
|
|
131
102
|
}, {
|
|
132
103
|
rendererTypeName: string;
|
|
@@ -217,6 +188,7 @@ export default function SharedModelF(pluginManager: PluginManager, configSchema:
|
|
|
217
188
|
readonly regionTooLarge: boolean;
|
|
218
189
|
readonly regionTooLargeReason: string;
|
|
219
190
|
} & {
|
|
191
|
+
readonly statsReadyAndRegionNotTooLarge: boolean;
|
|
220
192
|
regionCannotBeRenderedText(_region: import("@jbrowse/core/util").Region): "" | "Force load to see features";
|
|
221
193
|
regionCannotBeRendered(_region: import("@jbrowse/core/util").Region): import("react").JSX.Element | null;
|
|
222
194
|
} & {
|
|
@@ -256,19 +228,21 @@ export default function SharedModelF(pluginManager: PluginManager, configSchema:
|
|
|
256
228
|
} & {
|
|
257
229
|
message: undefined | string;
|
|
258
230
|
stats: {
|
|
231
|
+
currStatsBpPerPx: number;
|
|
259
232
|
scoreMin: number;
|
|
260
233
|
scoreMax: number;
|
|
261
234
|
} | undefined;
|
|
262
|
-
statsFetchInProgress: undefined |
|
|
235
|
+
statsFetchInProgress: undefined | string;
|
|
263
236
|
} & {
|
|
264
237
|
updateQuantitativeStats(stats: {
|
|
238
|
+
currStatsBpPerPx: number;
|
|
265
239
|
scoreMin: number;
|
|
266
240
|
scoreMax: number;
|
|
267
241
|
}): void;
|
|
268
242
|
setColor(color?: string): void;
|
|
269
243
|
setPosColor(color?: string): void;
|
|
270
244
|
setNegColor(color?: string): void;
|
|
271
|
-
|
|
245
|
+
setStatsLoading(arg?: string): void;
|
|
272
246
|
selectFeature(feature: import("@jbrowse/core/util").Feature): void;
|
|
273
247
|
setResolution(res: number): void;
|
|
274
248
|
setFill(fill: number): void;
|
|
@@ -310,6 +284,7 @@ export default function SharedModelF(pluginManager: PluginManager, configSchema:
|
|
|
310
284
|
readonly scaleOpts: {
|
|
311
285
|
domain: number[] | undefined;
|
|
312
286
|
stats: {
|
|
287
|
+
currStatsBpPerPx: number;
|
|
313
288
|
scoreMin: number;
|
|
314
289
|
scoreMax: number;
|
|
315
290
|
} | undefined;
|
|
@@ -348,7 +323,9 @@ export default function SharedModelF(pluginManager: PluginManager, configSchema:
|
|
|
348
323
|
} & {
|
|
349
324
|
readonly TooltipComponent: import("@jbrowse/core/util").AnyReactComponentType;
|
|
350
325
|
readonly rendererTypeName: string;
|
|
326
|
+
readonly quantitativeStatsRelevantToCurrentZoom: boolean;
|
|
351
327
|
} & {
|
|
328
|
+
adapterProps(): any;
|
|
352
329
|
readonly ticks: {
|
|
353
330
|
range: number[];
|
|
354
331
|
values: number[];
|
|
@@ -359,6 +336,7 @@ export default function SharedModelF(pluginManager: PluginManager, configSchema:
|
|
|
359
336
|
renderProps(): any;
|
|
360
337
|
readonly needsScalebar: boolean;
|
|
361
338
|
readonly fillSetting: 1 | 2 | 0;
|
|
339
|
+
readonly quantitativeStatsReady: boolean;
|
|
362
340
|
} & {
|
|
363
341
|
trackMenuItems(): (import("@jbrowse/core/ui").MenuDivider | import("@jbrowse/core/ui").MenuSubHeader | import("@jbrowse/core/ui").NormalMenuItem | import("@jbrowse/core/ui").CheckboxMenuItem | import("@jbrowse/core/ui").RadioMenuItem | import("@jbrowse/core/ui").SubMenuItem | {
|
|
364
342
|
label: string;
|
|
@@ -417,10 +395,5 @@ export default function SharedModelF(pluginManager: PluginManager, configSchema:
|
|
|
417
395
|
readonly windowDeltaSetting: any;
|
|
418
396
|
} & {
|
|
419
397
|
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
420
|
-
|
|
421
|
-
* #method
|
|
422
|
-
* retrieves the sequence adapter from parent track, and puts it as a
|
|
423
|
-
* subadapter on a GCContentAdapter
|
|
424
|
-
*/
|
|
425
|
-
renderProps(): any;
|
|
398
|
+
adapterProps(): any;
|
|
426
399
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
@@ -24,28 +24,16 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.default = SharedModelF;
|
|
27
|
+
const react_1 = require("react");
|
|
27
28
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
28
29
|
const util_1 = require("@jbrowse/core/util");
|
|
29
30
|
const plugin_wiggle_1 = require("@jbrowse/plugin-wiggle");
|
|
30
31
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
31
|
-
const react_1 = require("react");
|
|
32
32
|
const EditGCContentParamsDialog = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./components/EditGCContentParams'))));
|
|
33
|
-
/**
|
|
34
|
-
* #stateModel SharedGCContentModel
|
|
35
|
-
* #category display
|
|
36
|
-
* extends
|
|
37
|
-
* - [LinearWiggleDisplay](../linearwiggledisplay)
|
|
38
|
-
*/
|
|
39
33
|
function SharedModelF(pluginManager, configSchema) {
|
|
40
34
|
return mobx_state_tree_1.types
|
|
41
35
|
.compose('SharedGCContentModel', (0, plugin_wiggle_1.linearWiggleDisplayModelFactory)(pluginManager, configSchema), mobx_state_tree_1.types.model({
|
|
42
|
-
/**
|
|
43
|
-
* #property
|
|
44
|
-
*/
|
|
45
36
|
windowSize: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.number),
|
|
46
|
-
/**
|
|
47
|
-
* #property
|
|
48
|
-
*/
|
|
49
37
|
windowDelta: mobx_state_tree_1.types.maybe(mobx_state_tree_1.types.number),
|
|
50
38
|
}))
|
|
51
39
|
.actions(self => ({
|
|
@@ -65,7 +53,7 @@ function SharedModelF(pluginManager, configSchema) {
|
|
|
65
53
|
},
|
|
66
54
|
}))
|
|
67
55
|
.views(self => {
|
|
68
|
-
const { trackMenuItems: superTrackMenuItems,
|
|
56
|
+
const { trackMenuItems: superTrackMenuItems, adapterProps: superAdapterProps, } = self;
|
|
69
57
|
return {
|
|
70
58
|
trackMenuItems() {
|
|
71
59
|
return [
|
|
@@ -81,15 +69,10 @@ function SharedModelF(pluginManager, configSchema) {
|
|
|
81
69
|
},
|
|
82
70
|
];
|
|
83
71
|
},
|
|
84
|
-
|
|
85
|
-
* #method
|
|
86
|
-
* retrieves the sequence adapter from parent track, and puts it as a
|
|
87
|
-
* subadapter on a GCContentAdapter
|
|
88
|
-
*/
|
|
89
|
-
renderProps() {
|
|
72
|
+
adapterProps() {
|
|
90
73
|
const sequenceAdapter = (0, configuration_1.getConf)(self.parentTrack, 'adapter');
|
|
91
74
|
return {
|
|
92
|
-
...
|
|
75
|
+
...superAdapterProps(),
|
|
93
76
|
adapterConfig: {
|
|
94
77
|
type: 'GCContentAdapter',
|
|
95
78
|
sequenceAdapter,
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
/**
|
|
4
|
-
* #stateModel LinearGCContentDisplay
|
|
5
|
-
* #category display
|
|
6
|
-
* base model `SharedGCContentModel`
|
|
7
|
-
*/
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
+
import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
8
3
|
export default function stateModelF(pluginManager: PluginManager, configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
9
4
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
10
5
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
@@ -17,21 +12,12 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
|
|
|
17
12
|
} & {
|
|
18
13
|
blockState: import("mobx-state-tree").IMapType<import("mobx-state-tree").IModelType<{
|
|
19
14
|
key: import("mobx-state-tree").ISimpleType<string>;
|
|
20
|
-
region: import("mobx-state-tree").
|
|
21
|
-
refName: import("mobx-state-tree").ISimpleType<string>;
|
|
22
|
-
start: import("mobx-state-tree").ISimpleType<number>;
|
|
23
|
-
end: import("mobx-state-tree").ISimpleType<number>;
|
|
24
|
-
reversed: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
25
|
-
} & {
|
|
26
|
-
assemblyName: import("mobx-state-tree").ISimpleType<string>;
|
|
27
|
-
}, {
|
|
28
|
-
setRefName(newRefName: string): void;
|
|
29
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
15
|
+
region: import("mobx-state-tree").IType<import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region>;
|
|
30
16
|
reloadFlag: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
31
17
|
isLeftEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
32
18
|
isRightEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
33
19
|
}, {
|
|
34
|
-
|
|
20
|
+
stopToken: string | undefined;
|
|
35
21
|
filled: boolean;
|
|
36
22
|
reactElement: React.ReactElement | undefined;
|
|
37
23
|
features: Map<string, import("@jbrowse/core/util").Feature> | undefined;
|
|
@@ -55,15 +41,9 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
|
|
|
55
41
|
doReload(): void;
|
|
56
42
|
afterAttach(): void;
|
|
57
43
|
setStatus(message: string): void;
|
|
58
|
-
setLoading(
|
|
44
|
+
setLoading(newStopToken: string): void;
|
|
59
45
|
setMessage(messageText: string): void;
|
|
60
|
-
setRendered(props:
|
|
61
|
-
reactElement: React.ReactElement;
|
|
62
|
-
features: Map<string, import("@jbrowse/core/util").Feature>;
|
|
63
|
-
layout: any;
|
|
64
|
-
maxHeightReached: boolean;
|
|
65
|
-
renderProps: any;
|
|
66
|
-
} | undefined): void;
|
|
46
|
+
setRendered(props: import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/models/serverSideRenderedBlock").RenderedProps | undefined): void;
|
|
67
47
|
setError(error: unknown): void;
|
|
68
48
|
reload(): void;
|
|
69
49
|
beforeDestroy(): void;
|
|
@@ -210,6 +190,7 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
|
|
|
210
190
|
readonly regionTooLarge: boolean;
|
|
211
191
|
readonly regionTooLargeReason: string;
|
|
212
192
|
} & {
|
|
193
|
+
readonly statsReadyAndRegionNotTooLarge: boolean;
|
|
213
194
|
regionCannotBeRenderedText(_region: import("@jbrowse/core/util").Region): "" | "Force load to see features";
|
|
214
195
|
regionCannotBeRendered(_region: import("@jbrowse/core/util").Region): import("react").JSX.Element | null;
|
|
215
196
|
} & {
|
|
@@ -249,19 +230,21 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
|
|
|
249
230
|
} & {
|
|
250
231
|
message: undefined | string;
|
|
251
232
|
stats: {
|
|
233
|
+
currStatsBpPerPx: number;
|
|
252
234
|
scoreMin: number;
|
|
253
235
|
scoreMax: number;
|
|
254
236
|
} | undefined;
|
|
255
|
-
statsFetchInProgress: undefined |
|
|
237
|
+
statsFetchInProgress: undefined | string;
|
|
256
238
|
} & {
|
|
257
239
|
updateQuantitativeStats(stats: {
|
|
240
|
+
currStatsBpPerPx: number;
|
|
258
241
|
scoreMin: number;
|
|
259
242
|
scoreMax: number;
|
|
260
243
|
}): void;
|
|
261
244
|
setColor(color?: string): void;
|
|
262
245
|
setPosColor(color?: string): void;
|
|
263
246
|
setNegColor(color?: string): void;
|
|
264
|
-
|
|
247
|
+
setStatsLoading(arg?: string): void;
|
|
265
248
|
selectFeature(feature: import("@jbrowse/core/util").Feature): void;
|
|
266
249
|
setResolution(res: number): void;
|
|
267
250
|
setFill(fill: number): void;
|
|
@@ -303,6 +286,7 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
|
|
|
303
286
|
readonly scaleOpts: {
|
|
304
287
|
domain: number[] | undefined;
|
|
305
288
|
stats: {
|
|
289
|
+
currStatsBpPerPx: number;
|
|
306
290
|
scoreMin: number;
|
|
307
291
|
scoreMax: number;
|
|
308
292
|
} | undefined;
|
|
@@ -341,7 +325,9 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
|
|
|
341
325
|
} & {
|
|
342
326
|
readonly TooltipComponent: import("@jbrowse/core/util").AnyReactComponentType;
|
|
343
327
|
readonly rendererTypeName: string;
|
|
328
|
+
readonly quantitativeStatsRelevantToCurrentZoom: boolean;
|
|
344
329
|
} & {
|
|
330
|
+
adapterProps(): any;
|
|
345
331
|
readonly ticks: {
|
|
346
332
|
range: number[];
|
|
347
333
|
values: number[];
|
|
@@ -352,6 +338,7 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
|
|
|
352
338
|
renderProps(): any;
|
|
353
339
|
readonly needsScalebar: boolean;
|
|
354
340
|
readonly fillSetting: 1 | 2 | 0;
|
|
341
|
+
readonly quantitativeStatsReady: boolean;
|
|
355
342
|
} & {
|
|
356
343
|
trackMenuItems(): (import("@jbrowse/core/ui").MenuDivider | import("@jbrowse/core/ui").MenuSubHeader | import("@jbrowse/core/ui").NormalMenuItem | import("@jbrowse/core/ui").CheckboxMenuItem | import("@jbrowse/core/ui").RadioMenuItem | import("@jbrowse/core/ui").SubMenuItem | {
|
|
357
344
|
label: string;
|
|
@@ -410,5 +397,5 @@ export default function stateModelF(pluginManager: PluginManager, configSchema:
|
|
|
410
397
|
readonly windowDeltaSetting: any;
|
|
411
398
|
} & {
|
|
412
399
|
trackMenuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
413
|
-
|
|
400
|
+
adapterProps(): any;
|
|
414
401
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|