@jbrowse/plugin-gccontent 3.6.5 → 4.0.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/esm/GCContentAdapter/GCContentAdapter.d.ts +3 -2
- package/esm/GCContentAdapter/GCContentAdapter.js +103 -103
- package/esm/GCContentAdapter/configSchema.d.ts +2 -2
- package/esm/GCContentAdapter/index.js +2 -2
- package/esm/GCContentTrack/configSchema.d.ts +16 -11
- package/esm/GCContentTrack/index.js +17 -2
- package/esm/LinearGCContentDisplay/components/EditGCContentParams.js +1 -1
- package/esm/LinearGCContentDisplay/config1.d.ts +2 -2
- package/esm/LinearGCContentDisplay/config2.d.ts +2 -2
- package/esm/LinearGCContentDisplay/index.js +10 -7
- package/esm/LinearGCContentDisplay/shared.d.ts +1059 -93
- package/esm/LinearGCContentDisplay/shared.js +4 -6
- package/esm/LinearGCContentDisplay/stateModel1.d.ts +1026 -94
- package/esm/LinearGCContentDisplay/stateModel1.js +2 -2
- package/esm/LinearGCContentDisplay/stateModel2.d.ts +1026 -94
- package/esm/LinearGCContentDisplay/stateModel2.js +2 -2
- package/esm/index.js +4 -7
- package/package.json +27 -32
- package/dist/GCContentAdapter/GCContentAdapter.d.ts +0 -10
- package/dist/GCContentAdapter/GCContentAdapter.js +0 -132
- package/dist/GCContentAdapter/configSchema.d.ts +0 -16
- package/dist/GCContentAdapter/configSchema.js +0 -21
- package/dist/GCContentAdapter/index.d.ts +0 -2
- package/dist/GCContentAdapter/index.js +0 -52
- package/dist/GCContentTrack/configSchema.d.ts +0 -80
- package/dist/GCContentTrack/configSchema.js +0 -9
- package/dist/GCContentTrack/index.d.ts +0 -2
- package/dist/GCContentTrack/index.js +0 -20
- package/dist/LinearGCContentDisplay/components/EditGCContentParams.d.ts +0 -12
- package/dist/LinearGCContentDisplay/components/EditGCContentParams.js +0 -25
- package/dist/LinearGCContentDisplay/config1.d.ts +0 -11
- package/dist/LinearGCContentDisplay/config1.js +0 -20
- package/dist/LinearGCContentDisplay/config2.d.ts +0 -11
- package/dist/LinearGCContentDisplay/config2.js +0 -20
- package/dist/LinearGCContentDisplay/index.d.ts +0 -2
- package/dist/LinearGCContentDisplay/index.js +0 -40
- package/dist/LinearGCContentDisplay/shared.d.ts +0 -427
- package/dist/LinearGCContentDisplay/shared.js +0 -96
- package/dist/LinearGCContentDisplay/stateModel1.d.ts +0 -429
- package/dist/LinearGCContentDisplay/stateModel1.js +0 -13
- package/dist/LinearGCContentDisplay/stateModel2.d.ts +0 -429
- package/dist/LinearGCContentDisplay/stateModel2.js +0 -13
- package/dist/index.d.ts +0 -6
- package/dist/index.js +0 -21
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
2
|
-
import type { BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
2
|
+
import type { BaseOptions, BaseSequenceAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
3
3
|
import type { Feature, Region } from '@jbrowse/core/util';
|
|
4
4
|
export default class GCContentAdapter extends BaseFeatureDataAdapter {
|
|
5
5
|
private gcMode;
|
|
6
6
|
static capabilities: string[];
|
|
7
|
-
configure(): Promise<
|
|
7
|
+
configure(): Promise<BaseSequenceAdapter>;
|
|
8
8
|
getRefNames(opts?: BaseOptions): Promise<string[]>;
|
|
9
|
+
private calculateGCContent;
|
|
9
10
|
getFeatures(query: Region, opts?: BaseOptions): import("rxjs").Observable<Feature>;
|
|
10
11
|
}
|
|
@@ -2,16 +2,11 @@ import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter'
|
|
|
2
2
|
import { SimpleFeature, updateStatus } from '@jbrowse/core/util';
|
|
3
3
|
import { ObservableCreate } from '@jbrowse/core/util/rxjs';
|
|
4
4
|
import { checkStopToken } from '@jbrowse/core/util/stopToken';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
constructor() {
|
|
9
|
-
super(...arguments);
|
|
10
|
-
this.gcMode = 'content';
|
|
11
|
-
}
|
|
5
|
+
export default class GCContentAdapter extends BaseFeatureDataAdapter {
|
|
6
|
+
gcMode = 'content';
|
|
7
|
+
static capabilities = ['hasLocalStats'];
|
|
12
8
|
async configure() {
|
|
13
|
-
|
|
14
|
-
const adapter = await ((_a = this.getSubAdapter) === null || _a === void 0 ? void 0 : _a.call(this, this.getConf('sequenceAdapter')));
|
|
9
|
+
const adapter = await this.getSubAdapter?.(this.getConf('sequenceAdapter'));
|
|
15
10
|
if (!adapter) {
|
|
16
11
|
throw new Error('Error getting subadapter');
|
|
17
12
|
}
|
|
@@ -21,110 +16,115 @@ class GCContentAdapter extends BaseFeatureDataAdapter {
|
|
|
21
16
|
const adapter = await this.configure();
|
|
22
17
|
return adapter.getRefNames(opts);
|
|
23
18
|
}
|
|
24
|
-
|
|
19
|
+
async calculateGCContent(query, opts) {
|
|
25
20
|
const { statusCallback = () => { }, stopToken } = opts || {};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
21
|
+
const sequenceAdapter = await this.configure();
|
|
22
|
+
const windowSize = this.getConf('windowSize');
|
|
23
|
+
const windowDelta = this.getConf('windowDelta');
|
|
24
|
+
const halfWindowSize = windowSize === 1 ? 1 : Math.ceil(windowSize / 2);
|
|
25
|
+
const isWindowSizeOneBp = windowSize === 1;
|
|
26
|
+
const qs = Math.max(0, Math.floor((query.start - halfWindowSize) / windowSize) * windowSize);
|
|
27
|
+
const qe = Math.ceil((query.end + halfWindowSize) / windowSize) * windowSize;
|
|
28
|
+
if (qe < 0 || qs > qe) {
|
|
29
|
+
return { starts: [], ends: [], scores: [] };
|
|
30
|
+
}
|
|
31
|
+
const residues = (await sequenceAdapter.getSequence({
|
|
32
|
+
...query,
|
|
33
|
+
start: qs,
|
|
34
|
+
end: qe,
|
|
35
|
+
}, opts)) ?? '';
|
|
36
|
+
return updateStatus('Calculating GC', statusCallback, () => {
|
|
37
|
+
const starts = [];
|
|
38
|
+
const ends = [];
|
|
39
|
+
const scores = [];
|
|
40
|
+
let nc = 0;
|
|
41
|
+
let ng = 0;
|
|
42
|
+
let len = 0;
|
|
43
|
+
let start = performance.now();
|
|
44
|
+
const startIdx = halfWindowSize;
|
|
45
|
+
for (let j = startIdx - halfWindowSize; j < startIdx + halfWindowSize; j++) {
|
|
46
|
+
const letter = residues[j];
|
|
47
|
+
if (letter === 'c' || letter === 'C') {
|
|
48
|
+
nc++;
|
|
49
|
+
}
|
|
50
|
+
else if (letter === 'g' || letter === 'G') {
|
|
51
|
+
ng++;
|
|
52
|
+
}
|
|
53
|
+
if (letter !== 'N') {
|
|
54
|
+
len++;
|
|
55
|
+
}
|
|
38
56
|
}
|
|
39
|
-
|
|
40
|
-
.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
end: qe,
|
|
44
|
-
}, opts)
|
|
45
|
-
.pipe(toArray()));
|
|
46
|
-
const residues = ((_a = feats[0]) === null || _a === void 0 ? void 0 : _a.get('seq')) || '';
|
|
47
|
-
await updateStatus('Calculating GC', statusCallback, () => {
|
|
48
|
-
let nc = 0;
|
|
49
|
-
let ng = 0;
|
|
50
|
-
let len = 0;
|
|
51
|
-
let start = performance.now();
|
|
52
|
-
const startIdx = halfWindowSize;
|
|
53
|
-
for (let j = startIdx - halfWindowSize; j < startIdx + halfWindowSize; j++) {
|
|
54
|
-
const letter = residues[j];
|
|
55
|
-
if (letter === 'c' || letter === 'C') {
|
|
56
|
-
nc++;
|
|
57
|
-
}
|
|
58
|
-
else if (letter === 'g' || letter === 'G') {
|
|
59
|
-
ng++;
|
|
60
|
-
}
|
|
61
|
-
if (letter !== 'N') {
|
|
62
|
-
len++;
|
|
63
|
-
}
|
|
57
|
+
for (let i = halfWindowSize; i < residues.length - halfWindowSize; i += windowDelta) {
|
|
58
|
+
if (performance.now() - start > 400) {
|
|
59
|
+
checkStopToken(stopToken);
|
|
60
|
+
start = performance.now();
|
|
64
61
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
if (
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
else if (letter === 'g' || letter === 'G') {
|
|
88
|
-
ng--;
|
|
89
|
-
}
|
|
90
|
-
if (letter !== 'N') {
|
|
91
|
-
len--;
|
|
92
|
-
}
|
|
62
|
+
if (isWindowSizeOneBp) {
|
|
63
|
+
const letter = residues[i];
|
|
64
|
+
nc = letter === 'c' || letter === 'C' ? 1 : 0;
|
|
65
|
+
ng = letter === 'g' || letter === 'G' ? 1 : 0;
|
|
66
|
+
len = letter !== 'N' ? 1 : 0;
|
|
67
|
+
}
|
|
68
|
+
else if (i > halfWindowSize) {
|
|
69
|
+
const prevStart = i - windowDelta - halfWindowSize;
|
|
70
|
+
const prevEnd = i - windowDelta + halfWindowSize;
|
|
71
|
+
const currStart = i - halfWindowSize;
|
|
72
|
+
const currEnd = i + halfWindowSize;
|
|
73
|
+
for (let j = prevStart; j < Math.min(prevEnd, currStart); j++) {
|
|
74
|
+
if (j >= 0 && j < residues.length) {
|
|
75
|
+
const letter = residues[j];
|
|
76
|
+
if (letter === 'c' || letter === 'C') {
|
|
77
|
+
nc--;
|
|
78
|
+
}
|
|
79
|
+
else if (letter === 'g' || letter === 'G') {
|
|
80
|
+
ng--;
|
|
81
|
+
}
|
|
82
|
+
if (letter !== 'N') {
|
|
83
|
+
len--;
|
|
93
84
|
}
|
|
94
85
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
86
|
+
}
|
|
87
|
+
for (let j = Math.max(prevEnd, currStart); j < currEnd; j++) {
|
|
88
|
+
if (j >= 0 && j < residues.length) {
|
|
89
|
+
const letter = residues[j];
|
|
90
|
+
if (letter === 'c' || letter === 'C') {
|
|
91
|
+
nc++;
|
|
92
|
+
}
|
|
93
|
+
else if (letter === 'g' || letter === 'G') {
|
|
94
|
+
ng++;
|
|
95
|
+
}
|
|
96
|
+
if (letter !== 'N') {
|
|
97
|
+
len++;
|
|
107
98
|
}
|
|
108
99
|
}
|
|
109
100
|
}
|
|
110
|
-
const pos = qs;
|
|
111
|
-
const score = this.gcMode === 'content'
|
|
112
|
-
? (ng + nc) / (len || 1)
|
|
113
|
-
: this.gcMode === 'skew'
|
|
114
|
-
? (ng - nc) / (ng + nc || 1)
|
|
115
|
-
: 0;
|
|
116
|
-
observer.next(new SimpleFeature({
|
|
117
|
-
uniqueId: `${this.id}_${pos + i}`,
|
|
118
|
-
refName: query.refName,
|
|
119
|
-
start: pos + i,
|
|
120
|
-
end: pos + i + windowDelta,
|
|
121
|
-
score,
|
|
122
|
-
}));
|
|
123
101
|
}
|
|
124
|
-
|
|
102
|
+
const pos = qs;
|
|
103
|
+
const score = this.gcMode === 'content'
|
|
104
|
+
? (ng + nc) / (len || 1)
|
|
105
|
+
: this.gcMode === 'skew'
|
|
106
|
+
? (ng - nc) / (ng + nc || 1)
|
|
107
|
+
: 0;
|
|
108
|
+
starts.push(pos + i);
|
|
109
|
+
ends.push(pos + i + windowDelta);
|
|
110
|
+
scores.push(score);
|
|
111
|
+
}
|
|
112
|
+
return { starts, ends, scores };
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
getFeatures(query, opts) {
|
|
116
|
+
return ObservableCreate(async (observer) => {
|
|
117
|
+
const result = await this.calculateGCContent(query, opts);
|
|
118
|
+
for (let i = 0; i < result.starts.length; i++) {
|
|
119
|
+
observer.next(new SimpleFeature({
|
|
120
|
+
uniqueId: `${this.id}_${result.starts[i]}`,
|
|
121
|
+
refName: query.refName,
|
|
122
|
+
start: result.starts[i],
|
|
123
|
+
end: result.ends[i],
|
|
124
|
+
score: result.scores[i],
|
|
125
|
+
}));
|
|
126
|
+
}
|
|
125
127
|
observer.complete();
|
|
126
128
|
});
|
|
127
129
|
}
|
|
128
130
|
}
|
|
129
|
-
GCContentAdapter.capabilities = ['hasLocalStats'];
|
|
130
|
-
export default GCContentAdapter;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
declare const GCContentAdapterF: (_pluginManager: PluginManager) => import("
|
|
2
|
+
declare const GCContentAdapterF: (_pluginManager: PluginManager) => import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
3
3
|
sequenceAdapter: {
|
|
4
4
|
type: string;
|
|
5
5
|
defaultValue: null;
|
|
@@ -12,5 +12,5 @@ declare const GCContentAdapterF: (_pluginManager: PluginManager) => import("@jbr
|
|
|
12
12
|
type: string;
|
|
13
13
|
defaultValue: number;
|
|
14
14
|
};
|
|
15
|
-
}, import("
|
|
15
|
+
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
16
16
|
export default GCContentAdapterF;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import AdapterType from '@jbrowse/core/pluggableElementTypes/AdapterType';
|
|
2
|
-
import configSchemaF from
|
|
2
|
+
import configSchemaF from "./configSchema.js";
|
|
3
3
|
export default function GCContentAdapterF(pluginManager) {
|
|
4
4
|
pluginManager.addAdapterType(() => new AdapterType({
|
|
5
5
|
name: 'GCContentAdapter',
|
|
@@ -8,6 +8,6 @@ export default function GCContentAdapterF(pluginManager) {
|
|
|
8
8
|
hiddenFromGUI: true,
|
|
9
9
|
},
|
|
10
10
|
configSchema: configSchemaF(pluginManager),
|
|
11
|
-
getAdapterClass: () => import(
|
|
11
|
+
getAdapterClass: () => import("./GCContentAdapter.js").then(r => r.default),
|
|
12
12
|
}));
|
|
13
13
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
declare const configSchema: (pluginManager: PluginManager) => import("
|
|
2
|
+
declare const configSchema: (pluginManager: PluginManager) => import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
3
3
|
name: {
|
|
4
4
|
description: string;
|
|
5
5
|
type: string;
|
|
@@ -25,8 +25,13 @@ declare const configSchema: (pluginManager: PluginManager) => import("@jbrowse/c
|
|
|
25
25
|
description: string;
|
|
26
26
|
defaultValue: {};
|
|
27
27
|
};
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
rpcDriverName: {
|
|
29
|
+
type: string;
|
|
30
|
+
description: string;
|
|
31
|
+
defaultValue: string;
|
|
32
|
+
};
|
|
33
|
+
adapter: import("@jbrowse/mobx-state-tree").IAnyModelType;
|
|
34
|
+
textSearching: import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
30
35
|
indexingAttributes: {
|
|
31
36
|
type: string;
|
|
32
37
|
description: string;
|
|
@@ -37,10 +42,10 @@ declare const configSchema: (pluginManager: PluginManager) => import("@jbrowse/c
|
|
|
37
42
|
description: string;
|
|
38
43
|
defaultValue: string[];
|
|
39
44
|
};
|
|
40
|
-
textSearchAdapter: import("mobx-state-tree").IAnyModelType;
|
|
41
|
-
}, import("
|
|
42
|
-
displays: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
43
|
-
formatDetails: import("
|
|
45
|
+
textSearchAdapter: import("@jbrowse/mobx-state-tree").IAnyModelType;
|
|
46
|
+
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
47
|
+
displays: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyModelType>;
|
|
48
|
+
formatDetails: import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
44
49
|
feature: {
|
|
45
50
|
type: string;
|
|
46
51
|
description: string;
|
|
@@ -63,8 +68,8 @@ declare const configSchema: (pluginManager: PluginManager) => import("@jbrowse/c
|
|
|
63
68
|
defaultValue: number;
|
|
64
69
|
description: string;
|
|
65
70
|
};
|
|
66
|
-
}, import("
|
|
67
|
-
formatAbout: import("
|
|
71
|
+
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
72
|
+
formatAbout: import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
68
73
|
config: {
|
|
69
74
|
type: string;
|
|
70
75
|
description: string;
|
|
@@ -75,6 +80,6 @@ declare const configSchema: (pluginManager: PluginManager) => import("@jbrowse/c
|
|
|
75
80
|
type: string;
|
|
76
81
|
defaultValue: boolean;
|
|
77
82
|
};
|
|
78
|
-
}, import("
|
|
79
|
-
}, import("
|
|
83
|
+
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
84
|
+
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, "trackId">>, undefined>>;
|
|
80
85
|
export default configSchema;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import TrackType from '@jbrowse/core/pluggableElementTypes/TrackType';
|
|
2
2
|
import { createBaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models';
|
|
3
|
-
import configSchemaF from
|
|
3
|
+
import configSchemaF from "./configSchema.js";
|
|
4
|
+
function stringifyBedGraph({ features }) {
|
|
5
|
+
return features
|
|
6
|
+
.map(f => `${f.get('refName')}\t${f.get('start')}\t${f.get('end')}\t${f.get('score') ?? 0}`)
|
|
7
|
+
.join('\n');
|
|
8
|
+
}
|
|
4
9
|
export default function GCContentTrackF(pm) {
|
|
5
10
|
pm.addTrackType(() => {
|
|
6
11
|
const configSchema = configSchemaF(pm);
|
|
@@ -8,7 +13,17 @@ export default function GCContentTrackF(pm) {
|
|
|
8
13
|
name: 'GCContentTrack',
|
|
9
14
|
displayName: 'GCContent track',
|
|
10
15
|
configSchema,
|
|
11
|
-
stateModel: createBaseTrackModel(pm, 'GCContentTrack', configSchema)
|
|
16
|
+
stateModel: createBaseTrackModel(pm, 'GCContentTrack', configSchema).views(() => ({
|
|
17
|
+
saveTrackFileFormatOptions() {
|
|
18
|
+
return {
|
|
19
|
+
bedGraph: {
|
|
20
|
+
name: 'BedGraph',
|
|
21
|
+
extension: 'bedgraph',
|
|
22
|
+
callback: stringifyBedGraph,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
})),
|
|
12
27
|
});
|
|
13
28
|
});
|
|
14
29
|
}
|
|
@@ -3,7 +3,7 @@ import { useState } from 'react';
|
|
|
3
3
|
import { Dialog, ErrorMessage } from '@jbrowse/core/ui';
|
|
4
4
|
import { Button, DialogActions, DialogContent, TextField, Typography, } from '@mui/material';
|
|
5
5
|
import { observer } from 'mobx-react';
|
|
6
|
-
const EditGCContentParamsDialog = observer(function ({ model, handleClose, }) {
|
|
6
|
+
const EditGCContentParamsDialog = observer(function EditGCContentParamsDialog({ model, handleClose, }) {
|
|
7
7
|
const [windowSize, setWindowSize] = useState(`${model.windowSizeSetting}`);
|
|
8
8
|
const [windowDelta, setWindowDelta] = useState(`${model.windowDeltaSetting}`);
|
|
9
9
|
return (_jsx(Dialog, { open: true, onClose: handleClose, title: "Edit GC content params", children: _jsxs(DialogContent, { children: [_jsx(Typography, { children: "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." }), +windowDelta > +windowSize ? (_jsx(ErrorMessage, { error: "It is not recommended to make the step size larger than the window size" })) : null, _jsx(TextField, { label: "Size of sliding window (bp)", value: windowSize, onChange: event => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
export default function LinearGCContentDisplay(pluginManager: PluginManager): import("
|
|
2
|
+
export default function LinearGCContentDisplay(pluginManager: PluginManager): import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
3
3
|
windowSize: {
|
|
4
4
|
type: string;
|
|
5
5
|
defaultValue: number;
|
|
@@ -8,4 +8,4 @@ export default function LinearGCContentDisplay(pluginManager: PluginManager): im
|
|
|
8
8
|
type: string;
|
|
9
9
|
defaultValue: number;
|
|
10
10
|
};
|
|
11
|
-
}, import("
|
|
11
|
+
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration").AnyConfigurationSchemaType, undefined>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
-
export default function LinearGCContentTrackDisplayF(pluginManager: PluginManager): import("
|
|
2
|
+
export default function LinearGCContentTrackDisplayF(pluginManager: PluginManager): import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
3
3
|
windowSize: {
|
|
4
4
|
type: string;
|
|
5
5
|
defaultValue: number;
|
|
@@ -8,4 +8,4 @@ export default function LinearGCContentTrackDisplayF(pluginManager: PluginManage
|
|
|
8
8
|
type: string;
|
|
9
9
|
defaultValue: number;
|
|
10
10
|
};
|
|
11
|
-
}, import("
|
|
11
|
+
}, import("node_modules/@jbrowse/core/src/configuration/configurationSchema").ConfigurationSchemaOptions<import("@jbrowse/core/configuration").AnyConfigurationSchemaType, undefined>>;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { lazy } from 'react';
|
|
1
2
|
import { DisplayType } from '@jbrowse/core/pluggableElementTypes';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
3
|
+
import configSchemaFactory1 from "./config1.js";
|
|
4
|
+
import configSchemaFactory2 from "./config2.js";
|
|
5
|
+
import stateModelF1 from "./stateModel1.js";
|
|
6
|
+
import stateModelF2 from "./stateModel2.js";
|
|
7
|
+
const LazyWiggleDisplayComponent = lazy(() => import('@jbrowse/plugin-wiggle').then(m => ({
|
|
8
|
+
default: m.LinearWiggleDisplayReactComponent,
|
|
9
|
+
})));
|
|
7
10
|
export default function LinearGCContentDisplayF(pluginManager) {
|
|
8
11
|
pluginManager.addDisplayType(() => {
|
|
9
12
|
const configSchema = configSchemaFactory1(pluginManager);
|
|
@@ -15,7 +18,7 @@ export default function LinearGCContentDisplayF(pluginManager) {
|
|
|
15
18
|
displayName: 'GC content display',
|
|
16
19
|
trackType: 'ReferenceSequenceTrack',
|
|
17
20
|
viewType: 'LinearGenomeView',
|
|
18
|
-
ReactComponent:
|
|
21
|
+
ReactComponent: LazyWiggleDisplayComponent,
|
|
19
22
|
});
|
|
20
23
|
});
|
|
21
24
|
pluginManager.addDisplayType(() => {
|
|
@@ -28,7 +31,7 @@ export default function LinearGCContentDisplayF(pluginManager) {
|
|
|
28
31
|
displayName: 'GC content display',
|
|
29
32
|
trackType: 'GCContentTrack',
|
|
30
33
|
viewType: 'LinearGenomeView',
|
|
31
|
-
ReactComponent:
|
|
34
|
+
ReactComponent: LazyWiggleDisplayComponent,
|
|
32
35
|
});
|
|
33
36
|
});
|
|
34
37
|
}
|