@jbrowse/core 2.1.7 → 2.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/BaseFeatureWidget/BaseFeatureDetail.d.ts +2 -2
- package/BaseFeatureWidget/SequenceFeatureDetails.js +2 -1
- package/PluginManager.d.ts +3 -3
- package/ReExports/modules.d.ts +3 -3
- package/assemblyManager/assembly.d.ts +20 -14
- package/assemblyManager/assembly.js +74 -75
- package/assemblyManager/assemblyConfigSchema.d.ts +6 -2
- package/assemblyManager/assemblyConfigSchema.js +39 -2
- package/assemblyManager/assemblyManager.d.ts +76 -214
- package/assemblyManager/assemblyManager.js +17 -39
- package/data_adapters/CytobandAdapter.js +7 -0
- package/package.json +2 -2
- package/pluggableElementTypes/models/BaseDisplayModel.d.ts +60 -1
- package/pluggableElementTypes/models/BaseDisplayModel.js +138 -92
- package/pluggableElementTypes/models/baseConnectionConfig.js +17 -1
- package/pluggableElementTypes/models/baseInternetAccountConfig.js +27 -1
- package/pluggableElementTypes/models/baseTrackConfig.d.ts +3 -0
- package/pluggableElementTypes/models/baseTrackConfig.js +43 -1
- package/pluggableElementTypes/renderers/BoxRendererType.d.ts +1 -1
- package/pluggableElementTypes/renderers/BoxRendererType.js +2 -0
- package/rpc/MainThreadRpcDriver.d.ts +1 -1
- package/rpc/MainThreadRpcDriver.js +2 -2
- package/rpc/WebWorkerRpcDriver.d.ts +5 -4
- package/rpc/WebWorkerRpcDriver.js +2 -2
- package/rpc/baseRpcConfig.d.ts +2 -0
- package/rpc/baseRpcConfig.js +18 -0
- package/rpc/configSchema.js +16 -10
- package/rpc/coreRpcMethods.d.ts +14 -14
- package/rpc/coreRpcMethods.js +60 -63
- package/rpc/mainThreadRpcConfig.d.ts +2 -0
- package/rpc/mainThreadRpcConfig.js +19 -0
- package/rpc/webWorkerRpcConfig.d.ts +2 -0
- package/rpc/webWorkerRpcConfig.js +19 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/ui/AboutDialog.js +2 -1
- package/ui/App.js +8 -5
- package/ui/AssemblySelector.js +1 -1
- package/ui/DrawerWidget.js +2 -1
- package/ui/LoadingEllipses.d.ts +7 -0
- package/ui/LoadingEllipses.js +38 -0
- package/ui/index.d.ts +1 -0
- package/ui/index.js +3 -1
- package/util/Base1DUtils.js +9 -3
- package/util/calculateDynamicBlocks.js +1 -1
- package/util/calculateStaticBlocks.js +1 -1
- package/util/index.d.ts +1 -0
- package/util/index.js +13 -9
- package/util/io/RemoteFileWithRangeCache.d.ts +1 -2
- package/util/layouts/GranularRectLayout.d.ts +7 -2
- package/util/layouts/GranularRectLayout.js +29 -45
- package/util/layouts/MultiLayout.d.ts +2 -2
- package/util/layouts/MultiLayout.js +4 -6
- package/util/simpleFeature.d.ts +3 -0
- package/util/stats.d.ts +26 -0
- package/util/stats.js +9 -9
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IAnyType } from 'mobx-state-tree';
|
|
2
|
+
import { Assembly } from './assembly';
|
|
2
3
|
import PluginManager from '../PluginManager';
|
|
3
|
-
|
|
4
|
+
declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): import("mobx-state-tree").IModelType<{
|
|
4
5
|
assemblies: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
5
6
|
configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<IAnyType>>;
|
|
6
7
|
}, {
|
|
7
|
-
error:
|
|
8
|
-
|
|
8
|
+
error: unknown;
|
|
9
|
+
loaded: boolean;
|
|
10
|
+
loadingP: Promise<void> | undefined;
|
|
11
|
+
volatileRegions: import("./assembly").BasicRegion[] | undefined;
|
|
9
12
|
refNameAliases: {
|
|
10
13
|
[x: string]: string;
|
|
11
14
|
} | undefined;
|
|
@@ -16,41 +19,35 @@ export default function assemblyManagerFactory(assemblyConfigType: IAnyType, plu
|
|
|
16
19
|
} & {
|
|
17
20
|
readonly initialized: boolean;
|
|
18
21
|
readonly name: string;
|
|
22
|
+
readonly regions: import("./assembly").BasicRegion[] | undefined;
|
|
19
23
|
readonly aliases: string[];
|
|
20
24
|
readonly displayName: string | undefined;
|
|
21
25
|
hasName(name: string): boolean;
|
|
22
26
|
readonly allAliases: string[];
|
|
23
|
-
readonly refNames: string[] | undefined;
|
|
24
27
|
readonly allRefNames: string[] | undefined;
|
|
25
28
|
readonly lowerCaseRefNames: string[] | undefined;
|
|
26
29
|
readonly allRefNamesWithLowerCase: string[] | undefined;
|
|
27
30
|
readonly rpcManager: any;
|
|
28
31
|
readonly refNameColors: string[];
|
|
32
|
+
} & {
|
|
33
|
+
readonly refNames: string[] | undefined;
|
|
29
34
|
} & {
|
|
30
35
|
getCanonicalRefName(refName: string): string;
|
|
31
36
|
getRefNameColor(refName: string): string | undefined;
|
|
32
37
|
isValidRefName(refName: string): boolean;
|
|
33
38
|
} & {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
adapterRegionsWithAssembly: import("../util").Region[];
|
|
37
|
-
refNameAliases: {
|
|
38
|
-
[x: string]: string;
|
|
39
|
-
};
|
|
40
|
-
lowerCaseRefNameAliases: {
|
|
41
|
-
[x: string]: string;
|
|
42
|
-
};
|
|
43
|
-
cytobands: import("../util").Feature[];
|
|
44
|
-
}): void;
|
|
45
|
-
setError(e: Error): void;
|
|
39
|
+
setLoaded({ adapterRegionsWithAssembly, refNameAliases, lowerCaseRefNameAliases, cytobands, }: import("./assembly").Loading): void;
|
|
40
|
+
setError(e: unknown): void;
|
|
46
41
|
setRegions(regions: import("../util").Region[]): void;
|
|
47
42
|
setRefNameAliases(aliases: {
|
|
48
43
|
[x: string]: string;
|
|
49
|
-
},
|
|
44
|
+
}, lcAliases: {
|
|
50
45
|
[x: string]: string;
|
|
51
46
|
}): void;
|
|
52
47
|
setCytobands(cytobands: import("../util").Feature[]): void;
|
|
53
|
-
|
|
48
|
+
setLoadingP(p?: Promise<void> | undefined): void;
|
|
49
|
+
load(): Promise<void>;
|
|
50
|
+
loadPre(): Promise<void>;
|
|
54
51
|
} & {
|
|
55
52
|
getAdapterMapEntry(adapterConf: unknown, options: import("./assembly").BaseOptions): Promise<import("./assembly").RefNameMap>;
|
|
56
53
|
getRefNameMapForAdapter(adapterConf: unknown, opts: import("./assembly").BaseOptions): Promise<{
|
|
@@ -61,11 +58,13 @@ export default function assemblyManagerFactory(assemblyConfigType: IAnyType, plu
|
|
|
61
58
|
}>;
|
|
62
59
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
63
60
|
}, {
|
|
64
|
-
get(
|
|
61
|
+
get(asmName: string): ({
|
|
65
62
|
configuration: any;
|
|
66
63
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
67
|
-
error:
|
|
68
|
-
|
|
64
|
+
error: unknown;
|
|
65
|
+
loaded: boolean;
|
|
66
|
+
loadingP: Promise<void> | undefined;
|
|
67
|
+
volatileRegions: import("./assembly").BasicRegion[] | undefined;
|
|
69
68
|
refNameAliases: {
|
|
70
69
|
[x: string]: string;
|
|
71
70
|
} | undefined;
|
|
@@ -76,41 +75,35 @@ export default function assemblyManagerFactory(assemblyConfigType: IAnyType, plu
|
|
|
76
75
|
} & {
|
|
77
76
|
readonly initialized: boolean;
|
|
78
77
|
readonly name: string;
|
|
78
|
+
readonly regions: import("./assembly").BasicRegion[] | undefined;
|
|
79
79
|
readonly aliases: string[];
|
|
80
80
|
readonly displayName: string | undefined;
|
|
81
81
|
hasName(name: string): boolean;
|
|
82
82
|
readonly allAliases: string[];
|
|
83
|
-
readonly refNames: string[] | undefined;
|
|
84
83
|
readonly allRefNames: string[] | undefined;
|
|
85
84
|
readonly lowerCaseRefNames: string[] | undefined;
|
|
86
85
|
readonly allRefNamesWithLowerCase: string[] | undefined;
|
|
87
86
|
readonly rpcManager: any;
|
|
88
87
|
readonly refNameColors: string[];
|
|
88
|
+
} & {
|
|
89
|
+
readonly refNames: string[] | undefined;
|
|
89
90
|
} & {
|
|
90
91
|
getCanonicalRefName(refName: string): string;
|
|
91
92
|
getRefNameColor(refName: string): string | undefined;
|
|
92
93
|
isValidRefName(refName: string): boolean;
|
|
93
94
|
} & {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
adapterRegionsWithAssembly: import("../util").Region[];
|
|
97
|
-
refNameAliases: {
|
|
98
|
-
[x: string]: string;
|
|
99
|
-
};
|
|
100
|
-
lowerCaseRefNameAliases: {
|
|
101
|
-
[x: string]: string;
|
|
102
|
-
};
|
|
103
|
-
cytobands: import("../util").Feature[];
|
|
104
|
-
}): void;
|
|
105
|
-
setError(e: Error): void;
|
|
95
|
+
setLoaded({ adapterRegionsWithAssembly, refNameAliases, lowerCaseRefNameAliases, cytobands, }: import("./assembly").Loading): void;
|
|
96
|
+
setError(e: unknown): void;
|
|
106
97
|
setRegions(regions: import("../util").Region[]): void;
|
|
107
98
|
setRefNameAliases(aliases: {
|
|
108
99
|
[x: string]: string;
|
|
109
|
-
},
|
|
100
|
+
}, lcAliases: {
|
|
110
101
|
[x: string]: string;
|
|
111
102
|
}): void;
|
|
112
103
|
setCytobands(cytobands: import("../util").Feature[]): void;
|
|
113
|
-
|
|
104
|
+
setLoadingP(p?: Promise<void> | undefined): void;
|
|
105
|
+
load(): Promise<void>;
|
|
106
|
+
loadPre(): Promise<void>;
|
|
114
107
|
} & {
|
|
115
108
|
getAdapterMapEntry(adapterConf: unknown, options: import("./assembly").BaseOptions): Promise<import("./assembly").RefNameMap>;
|
|
116
109
|
getRefNameMapForAdapter(adapterConf: unknown, opts: import("./assembly").BaseOptions): Promise<{
|
|
@@ -122,8 +115,10 @@ export default function assemblyManagerFactory(assemblyConfigType: IAnyType, plu
|
|
|
122
115
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
123
116
|
configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<IAnyType>>;
|
|
124
117
|
}, {
|
|
125
|
-
error:
|
|
126
|
-
|
|
118
|
+
error: unknown;
|
|
119
|
+
loaded: boolean;
|
|
120
|
+
loadingP: Promise<void> | undefined;
|
|
121
|
+
volatileRegions: import("./assembly").BasicRegion[] | undefined;
|
|
127
122
|
refNameAliases: {
|
|
128
123
|
[x: string]: string;
|
|
129
124
|
} | undefined;
|
|
@@ -134,41 +129,35 @@ export default function assemblyManagerFactory(assemblyConfigType: IAnyType, plu
|
|
|
134
129
|
} & {
|
|
135
130
|
readonly initialized: boolean;
|
|
136
131
|
readonly name: string;
|
|
132
|
+
readonly regions: import("./assembly").BasicRegion[] | undefined;
|
|
137
133
|
readonly aliases: string[];
|
|
138
134
|
readonly displayName: string | undefined;
|
|
139
135
|
hasName(name: string): boolean;
|
|
140
136
|
readonly allAliases: string[];
|
|
141
|
-
readonly refNames: string[] | undefined;
|
|
142
137
|
readonly allRefNames: string[] | undefined;
|
|
143
138
|
readonly lowerCaseRefNames: string[] | undefined;
|
|
144
139
|
readonly allRefNamesWithLowerCase: string[] | undefined;
|
|
145
140
|
readonly rpcManager: any;
|
|
146
141
|
readonly refNameColors: string[];
|
|
142
|
+
} & {
|
|
143
|
+
readonly refNames: string[] | undefined;
|
|
147
144
|
} & {
|
|
148
145
|
getCanonicalRefName(refName: string): string;
|
|
149
146
|
getRefNameColor(refName: string): string | undefined;
|
|
150
147
|
isValidRefName(refName: string): boolean;
|
|
151
148
|
} & {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
adapterRegionsWithAssembly: import("../util").Region[];
|
|
155
|
-
refNameAliases: {
|
|
156
|
-
[x: string]: string;
|
|
157
|
-
};
|
|
158
|
-
lowerCaseRefNameAliases: {
|
|
159
|
-
[x: string]: string;
|
|
160
|
-
};
|
|
161
|
-
cytobands: import("../util").Feature[];
|
|
162
|
-
}): void;
|
|
163
|
-
setError(e: Error): void;
|
|
149
|
+
setLoaded({ adapterRegionsWithAssembly, refNameAliases, lowerCaseRefNameAliases, cytobands, }: import("./assembly").Loading): void;
|
|
150
|
+
setError(e: unknown): void;
|
|
164
151
|
setRegions(regions: import("../util").Region[]): void;
|
|
165
152
|
setRefNameAliases(aliases: {
|
|
166
153
|
[x: string]: string;
|
|
167
|
-
},
|
|
154
|
+
}, lcAliases: {
|
|
168
155
|
[x: string]: string;
|
|
169
156
|
}): void;
|
|
170
157
|
setCytobands(cytobands: import("../util").Feature[]): void;
|
|
171
|
-
|
|
158
|
+
setLoadingP(p?: Promise<void> | undefined): void;
|
|
159
|
+
load(): Promise<void>;
|
|
160
|
+
loadPre(): Promise<void>;
|
|
172
161
|
} & {
|
|
173
162
|
getAdapterMapEntry(adapterConf: unknown, options: import("./assembly").BaseOptions): Promise<import("./assembly").RefNameMap>;
|
|
174
163
|
getRefNameMapForAdapter(adapterConf: unknown, opts: import("./assembly").BaseOptions): Promise<{
|
|
@@ -178,23 +167,21 @@ export default function assemblyManagerFactory(assemblyConfigType: IAnyType, plu
|
|
|
178
167
|
[x: string]: string;
|
|
179
168
|
}>;
|
|
180
169
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined;
|
|
181
|
-
readonly assemblyNamesList:
|
|
170
|
+
readonly assemblyNamesList: any[];
|
|
182
171
|
readonly assemblyList: ({
|
|
183
172
|
[x: string]: any;
|
|
184
173
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
185
174
|
setSubschema(slotName: string, data: unknown): any;
|
|
186
|
-
} & import("mobx-state-tree").IStateTreeNode<import("../configuration").AnyConfigurationSchemaType>
|
|
187
|
-
name: string;
|
|
188
|
-
})[];
|
|
175
|
+
} & import("mobx-state-tree").IStateTreeNode<import("../configuration").AnyConfigurationSchemaType>)[];
|
|
189
176
|
readonly rpcManager: any;
|
|
190
|
-
readonly pluginManager: any;
|
|
191
|
-
readonly allPossibleRefNames: string[] | undefined;
|
|
192
177
|
} & {
|
|
193
178
|
waitForAssembly(assemblyName: string): Promise<({
|
|
194
179
|
configuration: any;
|
|
195
180
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
196
|
-
error:
|
|
197
|
-
|
|
181
|
+
error: unknown;
|
|
182
|
+
loaded: boolean;
|
|
183
|
+
loadingP: Promise<void> | undefined;
|
|
184
|
+
volatileRegions: import("./assembly").BasicRegion[] | undefined;
|
|
198
185
|
refNameAliases: {
|
|
199
186
|
[x: string]: string;
|
|
200
187
|
} | undefined;
|
|
@@ -205,41 +192,35 @@ export default function assemblyManagerFactory(assemblyConfigType: IAnyType, plu
|
|
|
205
192
|
} & {
|
|
206
193
|
readonly initialized: boolean;
|
|
207
194
|
readonly name: string;
|
|
195
|
+
readonly regions: import("./assembly").BasicRegion[] | undefined;
|
|
208
196
|
readonly aliases: string[];
|
|
209
197
|
readonly displayName: string | undefined;
|
|
210
198
|
hasName(name: string): boolean;
|
|
211
199
|
readonly allAliases: string[];
|
|
212
|
-
readonly refNames: string[] | undefined;
|
|
213
200
|
readonly allRefNames: string[] | undefined;
|
|
214
201
|
readonly lowerCaseRefNames: string[] | undefined;
|
|
215
202
|
readonly allRefNamesWithLowerCase: string[] | undefined;
|
|
216
203
|
readonly rpcManager: any;
|
|
217
204
|
readonly refNameColors: string[];
|
|
205
|
+
} & {
|
|
206
|
+
readonly refNames: string[] | undefined;
|
|
218
207
|
} & {
|
|
219
208
|
getCanonicalRefName(refName: string): string;
|
|
220
209
|
getRefNameColor(refName: string): string | undefined;
|
|
221
210
|
isValidRefName(refName: string): boolean;
|
|
222
211
|
} & {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
adapterRegionsWithAssembly: import("../util").Region[];
|
|
226
|
-
refNameAliases: {
|
|
227
|
-
[x: string]: string;
|
|
228
|
-
};
|
|
229
|
-
lowerCaseRefNameAliases: {
|
|
230
|
-
[x: string]: string;
|
|
231
|
-
};
|
|
232
|
-
cytobands: import("../util").Feature[];
|
|
233
|
-
}): void;
|
|
234
|
-
setError(e: Error): void;
|
|
212
|
+
setLoaded({ adapterRegionsWithAssembly, refNameAliases, lowerCaseRefNameAliases, cytobands, }: import("./assembly").Loading): void;
|
|
213
|
+
setError(e: unknown): void;
|
|
235
214
|
setRegions(regions: import("../util").Region[]): void;
|
|
236
215
|
setRefNameAliases(aliases: {
|
|
237
216
|
[x: string]: string;
|
|
238
|
-
},
|
|
217
|
+
}, lcAliases: {
|
|
239
218
|
[x: string]: string;
|
|
240
219
|
}): void;
|
|
241
220
|
setCytobands(cytobands: import("../util").Feature[]): void;
|
|
242
|
-
|
|
221
|
+
setLoadingP(p?: Promise<void> | undefined): void;
|
|
222
|
+
load(): Promise<void>;
|
|
223
|
+
loadPre(): Promise<void>;
|
|
243
224
|
} & {
|
|
244
225
|
getAdapterMapEntry(adapterConf: unknown, options: import("./assembly").BaseOptions): Promise<import("./assembly").RefNameMap>;
|
|
245
226
|
getRefNameMapForAdapter(adapterConf: unknown, opts: import("./assembly").BaseOptions): Promise<{
|
|
@@ -251,8 +232,10 @@ export default function assemblyManagerFactory(assemblyConfigType: IAnyType, plu
|
|
|
251
232
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
252
233
|
configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<IAnyType>>;
|
|
253
234
|
}, {
|
|
254
|
-
error:
|
|
255
|
-
|
|
235
|
+
error: unknown;
|
|
236
|
+
loaded: boolean;
|
|
237
|
+
loadingP: Promise<void> | undefined;
|
|
238
|
+
volatileRegions: import("./assembly").BasicRegion[] | undefined;
|
|
256
239
|
refNameAliases: {
|
|
257
240
|
[x: string]: string;
|
|
258
241
|
} | undefined;
|
|
@@ -263,41 +246,35 @@ export default function assemblyManagerFactory(assemblyConfigType: IAnyType, plu
|
|
|
263
246
|
} & {
|
|
264
247
|
readonly initialized: boolean;
|
|
265
248
|
readonly name: string;
|
|
249
|
+
readonly regions: import("./assembly").BasicRegion[] | undefined;
|
|
266
250
|
readonly aliases: string[];
|
|
267
251
|
readonly displayName: string | undefined;
|
|
268
252
|
hasName(name: string): boolean;
|
|
269
253
|
readonly allAliases: string[];
|
|
270
|
-
readonly refNames: string[] | undefined;
|
|
271
254
|
readonly allRefNames: string[] | undefined;
|
|
272
255
|
readonly lowerCaseRefNames: string[] | undefined;
|
|
273
256
|
readonly allRefNamesWithLowerCase: string[] | undefined;
|
|
274
257
|
readonly rpcManager: any;
|
|
275
258
|
readonly refNameColors: string[];
|
|
259
|
+
} & {
|
|
260
|
+
readonly refNames: string[] | undefined;
|
|
276
261
|
} & {
|
|
277
262
|
getCanonicalRefName(refName: string): string;
|
|
278
263
|
getRefNameColor(refName: string): string | undefined;
|
|
279
264
|
isValidRefName(refName: string): boolean;
|
|
280
265
|
} & {
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
adapterRegionsWithAssembly: import("../util").Region[];
|
|
284
|
-
refNameAliases: {
|
|
285
|
-
[x: string]: string;
|
|
286
|
-
};
|
|
287
|
-
lowerCaseRefNameAliases: {
|
|
288
|
-
[x: string]: string;
|
|
289
|
-
};
|
|
290
|
-
cytobands: import("../util").Feature[];
|
|
291
|
-
}): void;
|
|
292
|
-
setError(e: Error): void;
|
|
266
|
+
setLoaded({ adapterRegionsWithAssembly, refNameAliases, lowerCaseRefNameAliases, cytobands, }: import("./assembly").Loading): void;
|
|
267
|
+
setError(e: unknown): void;
|
|
293
268
|
setRegions(regions: import("../util").Region[]): void;
|
|
294
269
|
setRefNameAliases(aliases: {
|
|
295
270
|
[x: string]: string;
|
|
296
|
-
},
|
|
271
|
+
}, lcAliases: {
|
|
297
272
|
[x: string]: string;
|
|
298
273
|
}): void;
|
|
299
274
|
setCytobands(cytobands: import("../util").Feature[]): void;
|
|
300
|
-
|
|
275
|
+
setLoadingP(p?: Promise<void> | undefined): void;
|
|
276
|
+
load(): Promise<void>;
|
|
277
|
+
loadPre(): Promise<void>;
|
|
301
278
|
} & {
|
|
302
279
|
getAdapterMapEntry(adapterConf: unknown, options: import("./assembly").BaseOptions): Promise<import("./assembly").RefNameMap>;
|
|
303
280
|
getRefNameMapForAdapter(adapterConf: unknown, opts: import("./assembly").BaseOptions): Promise<{
|
|
@@ -319,126 +296,11 @@ export default function assemblyManagerFactory(assemblyConfigType: IAnyType, plu
|
|
|
319
296
|
}): Promise<{
|
|
320
297
|
[x: string]: string;
|
|
321
298
|
} | undefined>;
|
|
322
|
-
isValidRefName(refName: string, assemblyName
|
|
299
|
+
isValidRefName(refName: string, assemblyName: string): boolean;
|
|
323
300
|
} & {
|
|
324
|
-
removeAssembly(asm: {
|
|
325
|
-
configuration: any;
|
|
326
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
327
|
-
error: Error | undefined;
|
|
328
|
-
regions: import("./assembly").BasicRegion[] | undefined;
|
|
329
|
-
refNameAliases: {
|
|
330
|
-
[x: string]: string;
|
|
331
|
-
} | undefined;
|
|
332
|
-
lowerCaseRefNameAliases: {
|
|
333
|
-
[x: string]: string;
|
|
334
|
-
} | undefined;
|
|
335
|
-
cytobands: import("../util").Feature[] | undefined;
|
|
336
|
-
} & {
|
|
337
|
-
readonly initialized: boolean;
|
|
338
|
-
readonly name: string;
|
|
339
|
-
readonly aliases: string[];
|
|
340
|
-
readonly displayName: string | undefined;
|
|
341
|
-
hasName(name: string): boolean;
|
|
342
|
-
readonly allAliases: string[];
|
|
343
|
-
readonly refNames: string[] | undefined;
|
|
344
|
-
readonly allRefNames: string[] | undefined;
|
|
345
|
-
readonly lowerCaseRefNames: string[] | undefined;
|
|
346
|
-
readonly allRefNamesWithLowerCase: string[] | undefined;
|
|
347
|
-
readonly rpcManager: any;
|
|
348
|
-
readonly refNameColors: string[];
|
|
349
|
-
} & {
|
|
350
|
-
getCanonicalRefName(refName: string): string;
|
|
351
|
-
getRefNameColor(refName: string): string | undefined;
|
|
352
|
-
isValidRefName(refName: string): boolean;
|
|
353
|
-
} & {
|
|
354
|
-
setLoading(): void;
|
|
355
|
-
setLoaded({ adapterRegionsWithAssembly, refNameAliases, lowerCaseRefNameAliases, cytobands, }: {
|
|
356
|
-
adapterRegionsWithAssembly: import("../util").Region[];
|
|
357
|
-
refNameAliases: {
|
|
358
|
-
[x: string]: string;
|
|
359
|
-
};
|
|
360
|
-
lowerCaseRefNameAliases: {
|
|
361
|
-
[x: string]: string;
|
|
362
|
-
};
|
|
363
|
-
cytobands: import("../util").Feature[];
|
|
364
|
-
}): void;
|
|
365
|
-
setError(e: Error): void;
|
|
366
|
-
setRegions(regions: import("../util").Region[]): void;
|
|
367
|
-
setRefNameAliases(aliases: {
|
|
368
|
-
[x: string]: string;
|
|
369
|
-
}, lowerCase: {
|
|
370
|
-
[x: string]: string;
|
|
371
|
-
}): void;
|
|
372
|
-
setCytobands(cytobands: import("../util").Feature[]): void;
|
|
373
|
-
afterAttach(): void;
|
|
374
|
-
} & {
|
|
375
|
-
getAdapterMapEntry(adapterConf: unknown, options: import("./assembly").BaseOptions): Promise<import("./assembly").RefNameMap>;
|
|
376
|
-
getRefNameMapForAdapter(adapterConf: unknown, opts: import("./assembly").BaseOptions): Promise<{
|
|
377
|
-
[x: string]: string;
|
|
378
|
-
}>;
|
|
379
|
-
getReverseRefNameMapForAdapter(adapterConf: unknown, opts: import("./assembly").BaseOptions): Promise<{
|
|
380
|
-
[x: string]: string;
|
|
381
|
-
}>;
|
|
382
|
-
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
383
|
-
configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<IAnyType>>;
|
|
384
|
-
}, {
|
|
385
|
-
error: Error | undefined;
|
|
386
|
-
regions: import("./assembly").BasicRegion[] | undefined;
|
|
387
|
-
refNameAliases: {
|
|
388
|
-
[x: string]: string;
|
|
389
|
-
} | undefined;
|
|
390
|
-
lowerCaseRefNameAliases: {
|
|
391
|
-
[x: string]: string;
|
|
392
|
-
} | undefined;
|
|
393
|
-
cytobands: import("../util").Feature[] | undefined;
|
|
394
|
-
} & {
|
|
395
|
-
readonly initialized: boolean;
|
|
396
|
-
readonly name: string;
|
|
397
|
-
readonly aliases: string[];
|
|
398
|
-
readonly displayName: string | undefined;
|
|
399
|
-
hasName(name: string): boolean;
|
|
400
|
-
readonly allAliases: string[];
|
|
401
|
-
readonly refNames: string[] | undefined;
|
|
402
|
-
readonly allRefNames: string[] | undefined;
|
|
403
|
-
readonly lowerCaseRefNames: string[] | undefined;
|
|
404
|
-
readonly allRefNamesWithLowerCase: string[] | undefined;
|
|
405
|
-
readonly rpcManager: any;
|
|
406
|
-
readonly refNameColors: string[];
|
|
407
|
-
} & {
|
|
408
|
-
getCanonicalRefName(refName: string): string;
|
|
409
|
-
getRefNameColor(refName: string): string | undefined;
|
|
410
|
-
isValidRefName(refName: string): boolean;
|
|
411
|
-
} & {
|
|
412
|
-
setLoading(): void;
|
|
413
|
-
setLoaded({ adapterRegionsWithAssembly, refNameAliases, lowerCaseRefNameAliases, cytobands, }: {
|
|
414
|
-
adapterRegionsWithAssembly: import("../util").Region[];
|
|
415
|
-
refNameAliases: {
|
|
416
|
-
[x: string]: string;
|
|
417
|
-
};
|
|
418
|
-
lowerCaseRefNameAliases: {
|
|
419
|
-
[x: string]: string;
|
|
420
|
-
};
|
|
421
|
-
cytobands: import("../util").Feature[];
|
|
422
|
-
}): void;
|
|
423
|
-
setError(e: Error): void;
|
|
424
|
-
setRegions(regions: import("../util").Region[]): void;
|
|
425
|
-
setRefNameAliases(aliases: {
|
|
426
|
-
[x: string]: string;
|
|
427
|
-
}, lowerCase: {
|
|
428
|
-
[x: string]: string;
|
|
429
|
-
}): void;
|
|
430
|
-
setCytobands(cytobands: import("../util").Feature[]): void;
|
|
431
|
-
afterAttach(): void;
|
|
432
|
-
} & {
|
|
433
|
-
getAdapterMapEntry(adapterConf: unknown, options: import("./assembly").BaseOptions): Promise<import("./assembly").RefNameMap>;
|
|
434
|
-
getRefNameMapForAdapter(adapterConf: unknown, opts: import("./assembly").BaseOptions): Promise<{
|
|
435
|
-
[x: string]: string;
|
|
436
|
-
}>;
|
|
437
|
-
getReverseRefNameMapForAdapter(adapterConf: unknown, opts: import("./assembly").BaseOptions): Promise<{
|
|
438
|
-
[x: string]: string;
|
|
439
|
-
}>;
|
|
440
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>): void;
|
|
441
301
|
afterAttach(): void;
|
|
442
|
-
|
|
443
|
-
|
|
302
|
+
removeAssembly(asm: Assembly): void;
|
|
303
|
+
addAssembly(configuration: any): void;
|
|
304
|
+
replaceAssembly(idx: number, configuration: any): void;
|
|
444
305
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
306
|
+
export default assemblyManagerFactory;
|
|
@@ -3,20 +3,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const mobx_1 = require("mobx");
|
|
7
6
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
8
7
|
const util_1 = require("../util");
|
|
8
|
+
const mobx_1 = require("mobx");
|
|
9
9
|
const configuration_1 = require("../configuration");
|
|
10
10
|
const assembly_1 = __importDefault(require("./assembly"));
|
|
11
|
-
function assemblyManagerFactory(
|
|
12
|
-
const Assembly = (0, assembly_1.default)(assemblyConfigType, pluginManager);
|
|
11
|
+
function assemblyManagerFactory(conf, pm) {
|
|
13
12
|
return mobx_state_tree_1.types
|
|
14
13
|
.model({
|
|
15
|
-
assemblies: mobx_state_tree_1.types.array(
|
|
14
|
+
assemblies: mobx_state_tree_1.types.array((0, assembly_1.default)(conf, pm)),
|
|
16
15
|
})
|
|
17
16
|
.views(self => ({
|
|
18
|
-
get(
|
|
19
|
-
return self.assemblies.find(
|
|
17
|
+
get(asmName) {
|
|
18
|
+
return self.assemblies.find(asm => asm.hasName(asmName));
|
|
20
19
|
},
|
|
21
20
|
get assemblyNamesList() {
|
|
22
21
|
return this.assemblyList.map(asm => asm.name);
|
|
@@ -37,20 +36,6 @@ function assemblyManagerFactory(assemblyConfigType, pluginManager) {
|
|
|
37
36
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
38
37
|
return (0, mobx_state_tree_1.getParent)(self).rpcManager;
|
|
39
38
|
},
|
|
40
|
-
get pluginManager() {
|
|
41
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
42
|
-
return (0, mobx_state_tree_1.getParent)(self).pluginManager;
|
|
43
|
-
},
|
|
44
|
-
get allPossibleRefNames() {
|
|
45
|
-
let refNames = [];
|
|
46
|
-
for (const assembly of self.assemblies) {
|
|
47
|
-
if (!assembly.allRefNames) {
|
|
48
|
-
return undefined;
|
|
49
|
-
}
|
|
50
|
-
refNames = refNames.concat(assembly.allRefNames);
|
|
51
|
-
}
|
|
52
|
-
return refNames;
|
|
53
|
-
},
|
|
54
39
|
}))
|
|
55
40
|
.views(self => ({
|
|
56
41
|
// use this method instead of assemblyManager.get(assemblyName)
|
|
@@ -72,6 +57,7 @@ function assemblyManagerFactory(assemblyConfigType, pluginManager) {
|
|
|
72
57
|
if (!assembly) {
|
|
73
58
|
return undefined;
|
|
74
59
|
}
|
|
60
|
+
await assembly.load();
|
|
75
61
|
await (0, util_1.when)(() => Boolean((assembly === null || assembly === void 0 ? void 0 : assembly.regions) && assembly.refNameAliases) ||
|
|
76
62
|
!!(assembly === null || assembly === void 0 ? void 0 : assembly.error));
|
|
77
63
|
if (assembly.error) {
|
|
@@ -94,23 +80,14 @@ function assemblyManagerFactory(assemblyConfigType, pluginManager) {
|
|
|
94
80
|
return {};
|
|
95
81
|
},
|
|
96
82
|
isValidRefName(refName, assemblyName) {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
return assembly.isValidRefName(refName);
|
|
101
|
-
}
|
|
102
|
-
throw new Error(`isValidRefName for ${assemblyName} failed, assembly does not exist`);
|
|
103
|
-
}
|
|
104
|
-
if (!self.allPossibleRefNames) {
|
|
105
|
-
throw new Error(`isValidRefName not available, assemblyManager has not yet finished loading. If you are looking for a refname in a specific assembly, pass assembly argument`);
|
|
83
|
+
const assembly = self.get(assemblyName);
|
|
84
|
+
if (assembly) {
|
|
85
|
+
return assembly.isValidRefName(refName);
|
|
106
86
|
}
|
|
107
|
-
|
|
87
|
+
throw new Error(`isValidRefName for ${assemblyName} failed, assembly does not exist`);
|
|
108
88
|
},
|
|
109
89
|
}))
|
|
110
90
|
.actions(self => ({
|
|
111
|
-
removeAssembly(asm) {
|
|
112
|
-
self.assemblies.remove(asm);
|
|
113
|
-
},
|
|
114
91
|
afterAttach() {
|
|
115
92
|
(0, mobx_state_tree_1.addDisposer)(self, (0, mobx_1.reaction)(
|
|
116
93
|
// have to slice it to be properly reacted to
|
|
@@ -128,16 +105,17 @@ function assemblyManagerFactory(assemblyConfigType, pluginManager) {
|
|
|
128
105
|
});
|
|
129
106
|
}, { fireImmediately: true, name: 'assemblyManagerAfterAttach' }));
|
|
130
107
|
},
|
|
108
|
+
removeAssembly(asm) {
|
|
109
|
+
self.assemblies.remove(asm);
|
|
110
|
+
},
|
|
131
111
|
// this can take an active instance of an assembly, in which case it is
|
|
132
112
|
// referred to, or it can take an identifier e.g. assembly name, which is
|
|
133
113
|
// used as a reference. snapshots cannot be used
|
|
134
|
-
addAssembly(
|
|
135
|
-
self.assemblies.push({ configuration
|
|
114
|
+
addAssembly(configuration) {
|
|
115
|
+
self.assemblies.push({ configuration });
|
|
136
116
|
},
|
|
137
|
-
replaceAssembly(idx,
|
|
138
|
-
self.assemblies[idx] = (0, mobx_state_tree_1.cast)({
|
|
139
|
-
configuration: assemblyConfig,
|
|
140
|
-
});
|
|
117
|
+
replaceAssembly(idx, configuration) {
|
|
118
|
+
self.assemblies[idx] = (0, mobx_state_tree_1.cast)({ configuration });
|
|
141
119
|
},
|
|
142
120
|
}));
|
|
143
121
|
}
|
|
@@ -8,7 +8,14 @@ const simpleFeature_1 = __importDefault(require("../util/simpleFeature"));
|
|
|
8
8
|
const configuration_1 = require("../configuration");
|
|
9
9
|
const io_1 = require("../util/io");
|
|
10
10
|
const BaseAdapter_1 = require("./BaseAdapter");
|
|
11
|
+
/**
|
|
12
|
+
* #config CytobandAdapter
|
|
13
|
+
*/
|
|
14
|
+
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
11
15
|
const configSchema = (0, configuration_1.ConfigurationSchema)('CytobandAdapter', {
|
|
16
|
+
/**
|
|
17
|
+
* #slot
|
|
18
|
+
*/
|
|
12
19
|
cytobandLocation: {
|
|
13
20
|
type: 'fileLocation',
|
|
14
21
|
defaultValue: { uri: '/path/to/cytoband.txt.gz' },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "JBrowse 2 core libraries used by plugins",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"access": "public",
|
|
74
74
|
"directory": "dist"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "cf31db8d833117f8822510340664fb3f045975cb"
|
|
77
77
|
}
|