@jbrowse/core 2.1.2 → 2.1.3
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/TextSearch/BaseResults.d.ts +5 -1
- package/TextSearch/BaseResults.js +8 -1
- package/TextSearch/TextSearchManager.d.ts +9 -12
- package/TextSearch/TextSearchManager.js +24 -35
- package/assemblyManager/assembly.d.ts +7 -4
- package/assemblyManager/assembly.js +16 -2
- package/assemblyManager/assemblyManager.d.ts +51 -30
- package/assemblyManager/assemblyManager.js +12 -3
- package/package.json +2 -2
- package/rpc/coreRpcMethods.d.ts +1 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/ui/AboutDialog.js +1 -1
- package/util/QuickLRU.d.ts +19 -11
- package/util/QuickLRU.js +170 -28
- package/util/calculateDynamicBlocks.js +3 -1
- package/util/calculateStaticBlocks.d.ts +3 -1
- package/util/calculateStaticBlocks.js +3 -1
- package/util/index.d.ts +1 -1
- package/util/io/index.d.ts +1 -1
- package/util/io/index.js +5 -3
- package/util/types/index.js +0 -4
- package/util/when.d.ts +2 -3
|
@@ -13,6 +13,7 @@ export interface BaseResultArgs {
|
|
|
13
13
|
refName?: string;
|
|
14
14
|
trackId?: string;
|
|
15
15
|
score?: number;
|
|
16
|
+
results?: BaseResult[];
|
|
16
17
|
}
|
|
17
18
|
export default class BaseResult {
|
|
18
19
|
label: string;
|
|
@@ -25,6 +26,7 @@ export default class BaseResult {
|
|
|
25
26
|
trackId?: string;
|
|
26
27
|
score: number;
|
|
27
28
|
locString?: string;
|
|
29
|
+
results?: BaseResult[];
|
|
28
30
|
constructor(args: BaseResultArgs);
|
|
29
31
|
getLabel(): string;
|
|
30
32
|
getDisplayString(): string;
|
|
@@ -33,7 +35,9 @@ export default class BaseResult {
|
|
|
33
35
|
getScore(): number;
|
|
34
36
|
updateScore(newScore: number): number;
|
|
35
37
|
getId(): string;
|
|
36
|
-
|
|
38
|
+
hasLocation(): boolean;
|
|
39
|
+
getLocation(): string | undefined;
|
|
40
|
+
getComboResults(): BaseResult[] | undefined;
|
|
37
41
|
}
|
|
38
42
|
export declare class RefSequenceResult extends BaseResult {
|
|
39
43
|
refName: string;
|
|
@@ -13,6 +13,7 @@ class BaseResult {
|
|
|
13
13
|
this.relevance = args.relevance;
|
|
14
14
|
this.trackId = args.trackId;
|
|
15
15
|
this.score = args.score || 1;
|
|
16
|
+
this.results = args.results || [];
|
|
16
17
|
}
|
|
17
18
|
getLabel() {
|
|
18
19
|
return this.label;
|
|
@@ -36,8 +37,14 @@ class BaseResult {
|
|
|
36
37
|
getId() {
|
|
37
38
|
return `${this.getLabel()}-${this.getLocation()}-${this.getTrackId()}`;
|
|
38
39
|
}
|
|
40
|
+
hasLocation() {
|
|
41
|
+
return !!this.locString;
|
|
42
|
+
}
|
|
39
43
|
getLocation() {
|
|
40
|
-
return this.locString
|
|
44
|
+
return this.locString;
|
|
45
|
+
}
|
|
46
|
+
getComboResults() {
|
|
47
|
+
return this.results;
|
|
41
48
|
}
|
|
42
49
|
}
|
|
43
50
|
exports.default = BaseResult;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import BaseResult from './BaseResults';
|
|
2
|
-
import { AnyConfigurationModel } from '../configuration/configurationSchema';
|
|
3
2
|
import PluginManager from '../PluginManager';
|
|
4
3
|
import QuickLRU from '../util/QuickLRU';
|
|
5
4
|
import { SearchType, BaseTextSearchAdapter } from '../data_adapters/BaseAdapter';
|
|
5
|
+
import { AnyConfigurationModel } from '../configuration';
|
|
6
6
|
export interface BaseArgs {
|
|
7
7
|
queryString: string;
|
|
8
8
|
searchType?: SearchType;
|
|
@@ -17,23 +17,20 @@ export interface SearchScope {
|
|
|
17
17
|
}
|
|
18
18
|
export default class TextSearchManager {
|
|
19
19
|
pluginManager: PluginManager;
|
|
20
|
-
adapterCache: QuickLRU
|
|
20
|
+
adapterCache: QuickLRU<string, BaseTextSearchAdapter>;
|
|
21
21
|
constructor(pluginManager: PluginManager);
|
|
22
|
-
/**
|
|
23
|
-
* Instantiate/initialize list of relevant adapters
|
|
24
|
-
*/
|
|
25
22
|
loadTextSearchAdapters(searchScope: SearchScope): BaseTextSearchAdapter[];
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
getAdaptersWithAssembly(
|
|
23
|
+
relevantAdapters(searchScope: SearchScope): ({
|
|
24
|
+
[x: string]: any;
|
|
25
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
26
|
+
setSubschema(slotName: string, data: unknown): any;
|
|
27
|
+
} & import("mobx-state-tree").IStateTreeNode<import("../configuration").AnyConfigurationSchemaType>)[];
|
|
28
|
+
getAdaptersWithAssembly(assemblyName: string, confs: AnyConfigurationModel[]): AnyConfigurationModel[];
|
|
29
|
+
getTrackAdaptersWithAssembly(assemblyName: string, confs: AnyConfigurationModel[]): ({
|
|
32
30
|
[x: string]: any;
|
|
33
31
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
34
32
|
setSubschema(slotName: string, data: unknown): any;
|
|
35
33
|
} & import("mobx-state-tree").IStateTreeNode<import("../configuration").AnyConfigurationSchemaType>)[];
|
|
36
|
-
getTrackAdaptersWithAssembly(asmName: string, adapterConfs: AnyConfigurationModel[]): any[];
|
|
37
34
|
/**
|
|
38
35
|
* Returns list of relevant results given a search query and options
|
|
39
36
|
* @param args - search options/arguments include: search query
|
|
@@ -12,55 +12,46 @@ class TextSearchManager {
|
|
|
12
12
|
maxSize: 15,
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
|
-
/**
|
|
16
|
-
* Instantiate/initialize list of relevant adapters
|
|
17
|
-
*/
|
|
18
15
|
loadTextSearchAdapters(searchScope) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
const pm = this.pluginManager;
|
|
17
|
+
return this.relevantAdapters(searchScope).map(conf => {
|
|
18
|
+
const adapterId = (0, configuration_1.readConfObject)(conf, 'textSearchAdapterId');
|
|
19
|
+
const r = this.adapterCache.get(adapterId);
|
|
20
|
+
if (r) {
|
|
21
|
+
return r;
|
|
23
22
|
}
|
|
24
23
|
else {
|
|
25
|
-
const { AdapterClass } =
|
|
26
|
-
const
|
|
27
|
-
this.adapterCache.set(adapterId,
|
|
28
|
-
return
|
|
24
|
+
const { AdapterClass } = pm.getTextSearchAdapterType(conf.type);
|
|
25
|
+
const a = new AdapterClass(conf, undefined, pm);
|
|
26
|
+
this.adapterCache.set(adapterId, a);
|
|
27
|
+
return a;
|
|
29
28
|
}
|
|
30
29
|
});
|
|
31
30
|
}
|
|
32
|
-
/**
|
|
33
|
-
* Returns list of relevant text search adapters to use
|
|
34
|
-
* @param args - search options/arguments include: search query
|
|
35
|
-
*/
|
|
36
31
|
relevantAdapters(searchScope) {
|
|
37
32
|
var _a;
|
|
38
|
-
const
|
|
33
|
+
const pm = this.pluginManager;
|
|
34
|
+
const { aggregateTextSearchAdapters, tracks } = (_a = pm.rootModel) === null || _a === void 0 ? void 0 : _a.jbrowse;
|
|
39
35
|
const { assemblyName } = searchScope;
|
|
40
|
-
|
|
36
|
+
return [
|
|
41
37
|
...this.getAdaptersWithAssembly(assemblyName, aggregateTextSearchAdapters),
|
|
42
38
|
...this.getTrackAdaptersWithAssembly(assemblyName, tracks),
|
|
43
39
|
];
|
|
44
|
-
return relevant;
|
|
45
40
|
}
|
|
46
|
-
getAdaptersWithAssembly(
|
|
47
|
-
return
|
|
41
|
+
getAdaptersWithAssembly(assemblyName, confs) {
|
|
42
|
+
return confs.filter(c => { var _a; return (_a = (0, configuration_1.readConfObject)(c, 'assemblyNames')) === null || _a === void 0 ? void 0 : _a.includes(assemblyName); });
|
|
48
43
|
}
|
|
49
|
-
getTrackAdaptersWithAssembly(
|
|
50
|
-
|
|
44
|
+
getTrackAdaptersWithAssembly(assemblyName, confs) {
|
|
45
|
+
return confs
|
|
46
|
+
.filter(conf => {
|
|
51
47
|
var _a;
|
|
52
48
|
return (_a = (0, configuration_1.readConfObject)(conf, [
|
|
53
49
|
'textSearching',
|
|
54
50
|
'textSearchAdapter',
|
|
55
51
|
'assemblyNames',
|
|
56
|
-
])) === null || _a === void 0 ? void 0 : _a.includes(
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
const { textSearching } = trackConf;
|
|
60
|
-
const { textSearchAdapter } = textSearching;
|
|
61
|
-
return textSearchAdapter;
|
|
62
|
-
});
|
|
63
|
-
return trackAdapters;
|
|
52
|
+
])) === null || _a === void 0 ? void 0 : _a.includes(assemblyName);
|
|
53
|
+
})
|
|
54
|
+
.map(conf => conf.textSearching.textSearchAdapter);
|
|
64
55
|
}
|
|
65
56
|
/**
|
|
66
57
|
* Returns list of relevant results given a search query and options
|
|
@@ -68,10 +59,8 @@ class TextSearchManager {
|
|
|
68
59
|
* limit of results to return, searchType...prefix | full | exact", etc.
|
|
69
60
|
*/
|
|
70
61
|
async search(args, searchScope, rankFn) {
|
|
71
|
-
|
|
72
|
-
const
|
|
73
|
-
const results = await Promise.all(textSearchAdapters.map(adapter => adapter.searchIndex(args)));
|
|
74
|
-
// aggregate and return relevant results
|
|
62
|
+
const adapters = this.loadTextSearchAdapters(searchScope);
|
|
63
|
+
const results = await Promise.all(adapters.map(a => a.searchIndex(args)));
|
|
75
64
|
return this.sortResults(results.flat(), rankFn);
|
|
76
65
|
}
|
|
77
66
|
/**
|
|
@@ -81,7 +70,7 @@ class TextSearchManager {
|
|
|
81
70
|
* based on more relevance
|
|
82
71
|
*/
|
|
83
72
|
sortResults(results, rankFn) {
|
|
84
|
-
return rankFn(results.sort((a, b) => -b.getLabel().localeCompare(a.getLabel()))).sort((
|
|
73
|
+
return rankFn(results.sort((a, b) => -b.getLabel().localeCompare(a.getLabel()))).sort((r1, r2) => r1.getScore() - r2.getScore());
|
|
85
74
|
}
|
|
86
75
|
}
|
|
87
76
|
exports.default = TextSearchManager;
|
|
@@ -25,10 +25,13 @@ export default function assemblyFactory(assemblyConfigType: IAnyType, pluginMana
|
|
|
25
25
|
readonly initialized: boolean;
|
|
26
26
|
readonly name: string;
|
|
27
27
|
readonly aliases: string[];
|
|
28
|
+
readonly displayName: string | undefined;
|
|
28
29
|
hasName(name: string): boolean;
|
|
29
30
|
readonly allAliases: string[];
|
|
30
31
|
readonly refNames: string[] | undefined;
|
|
31
32
|
readonly allRefNames: string[] | undefined;
|
|
33
|
+
readonly lowerCaseRefNames: string[] | undefined;
|
|
34
|
+
readonly allRefNamesWithLowerCase: string[] | undefined;
|
|
32
35
|
readonly rpcManager: any;
|
|
33
36
|
readonly refNameColors: string[];
|
|
34
37
|
} & {
|
|
@@ -51,23 +54,23 @@ export default function assemblyFactory(assemblyConfigType: IAnyType, pluginMana
|
|
|
51
54
|
} & {
|
|
52
55
|
getAdapterMapEntry(adapterConf: unknown, options: BaseOptions): Promise<{
|
|
53
56
|
forwardMap: {
|
|
54
|
-
[
|
|
57
|
+
[key: string]: string;
|
|
55
58
|
};
|
|
56
59
|
reverseMap: {
|
|
57
|
-
[
|
|
60
|
+
[key: string]: string;
|
|
58
61
|
};
|
|
59
62
|
}>;
|
|
60
63
|
/**
|
|
61
64
|
* get Map of `canonical-name -> adapter-specific-name`
|
|
62
65
|
*/
|
|
63
66
|
getRefNameMapForAdapter(adapterConf: unknown, opts: BaseOptions): Promise<{
|
|
64
|
-
[
|
|
67
|
+
[key: string]: string;
|
|
65
68
|
}>;
|
|
66
69
|
/**
|
|
67
70
|
* get Map of `adapter-specific-name -> canonical-name`
|
|
68
71
|
*/
|
|
69
72
|
getReverseRefNameMapForAdapter(adapterConf: unknown, opts: BaseOptions): Promise<{
|
|
70
|
-
[
|
|
73
|
+
[key: string]: string;
|
|
71
74
|
}>;
|
|
72
75
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
73
76
|
export declare type AssemblyModel = ReturnType<typeof assemblyFactory>;
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const json_stable_stringify_1 = __importDefault(require("json-stable-stringify"));
|
|
7
7
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
8
8
|
const abortable_promise_cache_1 = __importDefault(require("abortable-promise-cache"));
|
|
9
|
+
// locals
|
|
9
10
|
const configuration_1 = require("../configuration");
|
|
10
11
|
const util_1 = require("../util");
|
|
11
12
|
const QuickLRU_1 = __importDefault(require("../util/QuickLRU"));
|
|
@@ -83,9 +84,9 @@ function getAdapterId(adapterConf) {
|
|
|
83
84
|
function assemblyFactory(assemblyConfigType, pluginManager) {
|
|
84
85
|
const adapterLoads = new abortable_promise_cache_1.default({
|
|
85
86
|
cache: new QuickLRU_1.default({ maxSize: 1000 }),
|
|
86
|
-
async fill(args,
|
|
87
|
+
async fill(args, signal, statusCallback) {
|
|
87
88
|
const { adapterConf, self, options } = args;
|
|
88
|
-
return loadRefNameMap(self, adapterConf, { ...options, statusCallback },
|
|
89
|
+
return loadRefNameMap(self, adapterConf, { ...options, statusCallback }, signal);
|
|
89
90
|
},
|
|
90
91
|
});
|
|
91
92
|
return mobx_state_tree_1.types
|
|
@@ -109,6 +110,9 @@ function assemblyFactory(assemblyConfigType, pluginManager) {
|
|
|
109
110
|
get aliases() {
|
|
110
111
|
return (0, configuration_1.getConf)(self, 'aliases');
|
|
111
112
|
},
|
|
113
|
+
get displayName() {
|
|
114
|
+
return (0, configuration_1.getConf)(self, 'displayName');
|
|
115
|
+
},
|
|
112
116
|
hasName(name) {
|
|
113
117
|
return this.allAliases.includes(name);
|
|
114
118
|
},
|
|
@@ -127,6 +131,16 @@ function assemblyFactory(assemblyConfigType, pluginManager) {
|
|
|
127
131
|
? undefined
|
|
128
132
|
: Object.keys(self.refNameAliases);
|
|
129
133
|
},
|
|
134
|
+
get lowerCaseRefNames() {
|
|
135
|
+
return !self.lowerCaseRefNameAliases
|
|
136
|
+
? undefined
|
|
137
|
+
: Object.keys(self.lowerCaseRefNameAliases || {});
|
|
138
|
+
},
|
|
139
|
+
get allRefNamesWithLowerCase() {
|
|
140
|
+
return this.allRefNames && this.lowerCaseRefNames
|
|
141
|
+
? [...new Set([...this.allRefNames, ...this.lowerCaseRefNames])]
|
|
142
|
+
: undefined;
|
|
143
|
+
},
|
|
130
144
|
get rpcManager() {
|
|
131
145
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
132
146
|
return (0, mobx_state_tree_1.getParent)(self, 2).rpcManager;
|
|
@@ -17,10 +17,13 @@ export default function assemblyManagerFactory(assemblyConfigType: IAnyType, plu
|
|
|
17
17
|
readonly initialized: boolean;
|
|
18
18
|
readonly name: string;
|
|
19
19
|
readonly aliases: string[];
|
|
20
|
+
readonly displayName: string | undefined;
|
|
20
21
|
hasName(name: string): boolean;
|
|
21
22
|
readonly allAliases: string[];
|
|
22
23
|
readonly refNames: string[] | undefined;
|
|
23
24
|
readonly allRefNames: string[] | undefined;
|
|
25
|
+
readonly lowerCaseRefNames: string[] | undefined;
|
|
26
|
+
readonly allRefNamesWithLowerCase: string[] | undefined;
|
|
24
27
|
readonly rpcManager: any;
|
|
25
28
|
readonly refNameColors: string[];
|
|
26
29
|
} & {
|
|
@@ -51,17 +54,17 @@ export default function assemblyManagerFactory(assemblyConfigType: IAnyType, plu
|
|
|
51
54
|
} & {
|
|
52
55
|
getAdapterMapEntry(adapterConf: unknown, options: import("./assembly").BaseOptions): Promise<{
|
|
53
56
|
forwardMap: {
|
|
54
|
-
[
|
|
57
|
+
[key: string]: string;
|
|
55
58
|
};
|
|
56
59
|
reverseMap: {
|
|
57
|
-
[
|
|
60
|
+
[key: string]: string;
|
|
58
61
|
};
|
|
59
62
|
}>;
|
|
60
63
|
getRefNameMapForAdapter(adapterConf: unknown, opts: import("./assembly").BaseOptions): Promise<{
|
|
61
|
-
[
|
|
64
|
+
[key: string]: string;
|
|
62
65
|
}>;
|
|
63
66
|
getReverseRefNameMapForAdapter(adapterConf: unknown, opts: import("./assembly").BaseOptions): Promise<{
|
|
64
|
-
[
|
|
67
|
+
[key: string]: string;
|
|
65
68
|
}>;
|
|
66
69
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
67
70
|
}, {
|
|
@@ -81,10 +84,13 @@ export default function assemblyManagerFactory(assemblyConfigType: IAnyType, plu
|
|
|
81
84
|
readonly initialized: boolean;
|
|
82
85
|
readonly name: string;
|
|
83
86
|
readonly aliases: string[];
|
|
87
|
+
readonly displayName: string | undefined;
|
|
84
88
|
hasName(name: string): boolean;
|
|
85
89
|
readonly allAliases: string[];
|
|
86
90
|
readonly refNames: string[] | undefined;
|
|
87
91
|
readonly allRefNames: string[] | undefined;
|
|
92
|
+
readonly lowerCaseRefNames: string[] | undefined;
|
|
93
|
+
readonly allRefNamesWithLowerCase: string[] | undefined;
|
|
88
94
|
readonly rpcManager: any;
|
|
89
95
|
readonly refNameColors: string[];
|
|
90
96
|
} & {
|
|
@@ -115,17 +121,17 @@ export default function assemblyManagerFactory(assemblyConfigType: IAnyType, plu
|
|
|
115
121
|
} & {
|
|
116
122
|
getAdapterMapEntry(adapterConf: unknown, options: import("./assembly").BaseOptions): Promise<{
|
|
117
123
|
forwardMap: {
|
|
118
|
-
[
|
|
124
|
+
[key: string]: string;
|
|
119
125
|
};
|
|
120
126
|
reverseMap: {
|
|
121
|
-
[
|
|
127
|
+
[key: string]: string;
|
|
122
128
|
};
|
|
123
129
|
}>;
|
|
124
130
|
getRefNameMapForAdapter(adapterConf: unknown, opts: import("./assembly").BaseOptions): Promise<{
|
|
125
|
-
[
|
|
131
|
+
[key: string]: string;
|
|
126
132
|
}>;
|
|
127
133
|
getReverseRefNameMapForAdapter(adapterConf: unknown, opts: import("./assembly").BaseOptions): Promise<{
|
|
128
|
-
[
|
|
134
|
+
[key: string]: string;
|
|
129
135
|
}>;
|
|
130
136
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
131
137
|
configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<IAnyType>>;
|
|
@@ -143,10 +149,13 @@ export default function assemblyManagerFactory(assemblyConfigType: IAnyType, plu
|
|
|
143
149
|
readonly initialized: boolean;
|
|
144
150
|
readonly name: string;
|
|
145
151
|
readonly aliases: string[];
|
|
152
|
+
readonly displayName: string | undefined;
|
|
146
153
|
hasName(name: string): boolean;
|
|
147
154
|
readonly allAliases: string[];
|
|
148
155
|
readonly refNames: string[] | undefined;
|
|
149
156
|
readonly allRefNames: string[] | undefined;
|
|
157
|
+
readonly lowerCaseRefNames: string[] | undefined;
|
|
158
|
+
readonly allRefNamesWithLowerCase: string[] | undefined;
|
|
150
159
|
readonly rpcManager: any;
|
|
151
160
|
readonly refNameColors: string[];
|
|
152
161
|
} & {
|
|
@@ -177,17 +186,17 @@ export default function assemblyManagerFactory(assemblyConfigType: IAnyType, plu
|
|
|
177
186
|
} & {
|
|
178
187
|
getAdapterMapEntry(adapterConf: unknown, options: import("./assembly").BaseOptions): Promise<{
|
|
179
188
|
forwardMap: {
|
|
180
|
-
[
|
|
189
|
+
[key: string]: string;
|
|
181
190
|
};
|
|
182
191
|
reverseMap: {
|
|
183
|
-
[
|
|
192
|
+
[key: string]: string;
|
|
184
193
|
};
|
|
185
194
|
}>;
|
|
186
195
|
getRefNameMapForAdapter(adapterConf: unknown, opts: import("./assembly").BaseOptions): Promise<{
|
|
187
|
-
[
|
|
196
|
+
[key: string]: string;
|
|
188
197
|
}>;
|
|
189
198
|
getReverseRefNameMapForAdapter(adapterConf: unknown, opts: import("./assembly").BaseOptions): Promise<{
|
|
190
|
-
[
|
|
199
|
+
[key: string]: string;
|
|
191
200
|
}>;
|
|
192
201
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined;
|
|
193
202
|
readonly assemblyNamesList: string[];
|
|
@@ -218,10 +227,13 @@ export default function assemblyManagerFactory(assemblyConfigType: IAnyType, plu
|
|
|
218
227
|
readonly initialized: boolean;
|
|
219
228
|
readonly name: string;
|
|
220
229
|
readonly aliases: string[];
|
|
230
|
+
readonly displayName: string | undefined;
|
|
221
231
|
hasName(name: string): boolean;
|
|
222
232
|
readonly allAliases: string[];
|
|
223
233
|
readonly refNames: string[] | undefined;
|
|
224
234
|
readonly allRefNames: string[] | undefined;
|
|
235
|
+
readonly lowerCaseRefNames: string[] | undefined;
|
|
236
|
+
readonly allRefNamesWithLowerCase: string[] | undefined;
|
|
225
237
|
readonly rpcManager: any;
|
|
226
238
|
readonly refNameColors: string[];
|
|
227
239
|
} & {
|
|
@@ -252,17 +264,17 @@ export default function assemblyManagerFactory(assemblyConfigType: IAnyType, plu
|
|
|
252
264
|
} & {
|
|
253
265
|
getAdapterMapEntry(adapterConf: unknown, options: import("./assembly").BaseOptions): Promise<{
|
|
254
266
|
forwardMap: {
|
|
255
|
-
[
|
|
267
|
+
[key: string]: string;
|
|
256
268
|
};
|
|
257
269
|
reverseMap: {
|
|
258
|
-
[
|
|
270
|
+
[key: string]: string;
|
|
259
271
|
};
|
|
260
272
|
}>;
|
|
261
273
|
getRefNameMapForAdapter(adapterConf: unknown, opts: import("./assembly").BaseOptions): Promise<{
|
|
262
|
-
[
|
|
274
|
+
[key: string]: string;
|
|
263
275
|
}>;
|
|
264
276
|
getReverseRefNameMapForAdapter(adapterConf: unknown, opts: import("./assembly").BaseOptions): Promise<{
|
|
265
|
-
[
|
|
277
|
+
[key: string]: string;
|
|
266
278
|
}>;
|
|
267
279
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
268
280
|
configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<IAnyType>>;
|
|
@@ -280,10 +292,13 @@ export default function assemblyManagerFactory(assemblyConfigType: IAnyType, plu
|
|
|
280
292
|
readonly initialized: boolean;
|
|
281
293
|
readonly name: string;
|
|
282
294
|
readonly aliases: string[];
|
|
295
|
+
readonly displayName: string | undefined;
|
|
283
296
|
hasName(name: string): boolean;
|
|
284
297
|
readonly allAliases: string[];
|
|
285
298
|
readonly refNames: string[] | undefined;
|
|
286
299
|
readonly allRefNames: string[] | undefined;
|
|
300
|
+
readonly lowerCaseRefNames: string[] | undefined;
|
|
301
|
+
readonly allRefNamesWithLowerCase: string[] | undefined;
|
|
287
302
|
readonly rpcManager: any;
|
|
288
303
|
readonly refNameColors: string[];
|
|
289
304
|
} & {
|
|
@@ -314,30 +329,30 @@ export default function assemblyManagerFactory(assemblyConfigType: IAnyType, plu
|
|
|
314
329
|
} & {
|
|
315
330
|
getAdapterMapEntry(adapterConf: unknown, options: import("./assembly").BaseOptions): Promise<{
|
|
316
331
|
forwardMap: {
|
|
317
|
-
[
|
|
332
|
+
[key: string]: string;
|
|
318
333
|
};
|
|
319
334
|
reverseMap: {
|
|
320
|
-
[
|
|
335
|
+
[key: string]: string;
|
|
321
336
|
};
|
|
322
337
|
}>;
|
|
323
338
|
getRefNameMapForAdapter(adapterConf: unknown, opts: import("./assembly").BaseOptions): Promise<{
|
|
324
|
-
[
|
|
339
|
+
[key: string]: string;
|
|
325
340
|
}>;
|
|
326
341
|
getReverseRefNameMapForAdapter(adapterConf: unknown, opts: import("./assembly").BaseOptions): Promise<{
|
|
327
|
-
[
|
|
342
|
+
[key: string]: string;
|
|
328
343
|
}>;
|
|
329
344
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined>;
|
|
330
345
|
getRefNameMapForAdapter(adapterConf: unknown, assemblyName: string | undefined, opts: {
|
|
331
346
|
signal?: AbortSignal;
|
|
332
347
|
sessionId: string;
|
|
333
348
|
}): Promise<{
|
|
334
|
-
[
|
|
349
|
+
[key: string]: string;
|
|
335
350
|
} | undefined>;
|
|
336
351
|
getReverseRefNameMapForAdapter(adapterConf: unknown, assemblyName: string | undefined, opts: {
|
|
337
352
|
signal?: AbortSignal;
|
|
338
353
|
sessionId: string;
|
|
339
354
|
}): Promise<{
|
|
340
|
-
[
|
|
355
|
+
[key: string]: string;
|
|
341
356
|
} | undefined>;
|
|
342
357
|
isValidRefName(refName: string, assemblyName?: string): boolean;
|
|
343
358
|
} & {
|
|
@@ -357,10 +372,13 @@ export default function assemblyManagerFactory(assemblyConfigType: IAnyType, plu
|
|
|
357
372
|
readonly initialized: boolean;
|
|
358
373
|
readonly name: string;
|
|
359
374
|
readonly aliases: string[];
|
|
375
|
+
readonly displayName: string | undefined;
|
|
360
376
|
hasName(name: string): boolean;
|
|
361
377
|
readonly allAliases: string[];
|
|
362
378
|
readonly refNames: string[] | undefined;
|
|
363
379
|
readonly allRefNames: string[] | undefined;
|
|
380
|
+
readonly lowerCaseRefNames: string[] | undefined;
|
|
381
|
+
readonly allRefNamesWithLowerCase: string[] | undefined;
|
|
364
382
|
readonly rpcManager: any;
|
|
365
383
|
readonly refNameColors: string[];
|
|
366
384
|
} & {
|
|
@@ -391,17 +409,17 @@ export default function assemblyManagerFactory(assemblyConfigType: IAnyType, plu
|
|
|
391
409
|
} & {
|
|
392
410
|
getAdapterMapEntry(adapterConf: unknown, options: import("./assembly").BaseOptions): Promise<{
|
|
393
411
|
forwardMap: {
|
|
394
|
-
[
|
|
412
|
+
[key: string]: string;
|
|
395
413
|
};
|
|
396
414
|
reverseMap: {
|
|
397
|
-
[
|
|
415
|
+
[key: string]: string;
|
|
398
416
|
};
|
|
399
417
|
}>;
|
|
400
418
|
getRefNameMapForAdapter(adapterConf: unknown, opts: import("./assembly").BaseOptions): Promise<{
|
|
401
|
-
[
|
|
419
|
+
[key: string]: string;
|
|
402
420
|
}>;
|
|
403
421
|
getReverseRefNameMapForAdapter(adapterConf: unknown, opts: import("./assembly").BaseOptions): Promise<{
|
|
404
|
-
[
|
|
422
|
+
[key: string]: string;
|
|
405
423
|
}>;
|
|
406
424
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
407
425
|
configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<IAnyType>>;
|
|
@@ -419,10 +437,13 @@ export default function assemblyManagerFactory(assemblyConfigType: IAnyType, plu
|
|
|
419
437
|
readonly initialized: boolean;
|
|
420
438
|
readonly name: string;
|
|
421
439
|
readonly aliases: string[];
|
|
440
|
+
readonly displayName: string | undefined;
|
|
422
441
|
hasName(name: string): boolean;
|
|
423
442
|
readonly allAliases: string[];
|
|
424
443
|
readonly refNames: string[] | undefined;
|
|
425
444
|
readonly allRefNames: string[] | undefined;
|
|
445
|
+
readonly lowerCaseRefNames: string[] | undefined;
|
|
446
|
+
readonly allRefNamesWithLowerCase: string[] | undefined;
|
|
426
447
|
readonly rpcManager: any;
|
|
427
448
|
readonly refNameColors: string[];
|
|
428
449
|
} & {
|
|
@@ -453,17 +474,17 @@ export default function assemblyManagerFactory(assemblyConfigType: IAnyType, plu
|
|
|
453
474
|
} & {
|
|
454
475
|
getAdapterMapEntry(adapterConf: unknown, options: import("./assembly").BaseOptions): Promise<{
|
|
455
476
|
forwardMap: {
|
|
456
|
-
[
|
|
477
|
+
[key: string]: string;
|
|
457
478
|
};
|
|
458
479
|
reverseMap: {
|
|
459
|
-
[
|
|
480
|
+
[key: string]: string;
|
|
460
481
|
};
|
|
461
482
|
}>;
|
|
462
483
|
getRefNameMapForAdapter(adapterConf: unknown, opts: import("./assembly").BaseOptions): Promise<{
|
|
463
|
-
[
|
|
484
|
+
[key: string]: string;
|
|
464
485
|
}>;
|
|
465
486
|
getReverseRefNameMapForAdapter(adapterConf: unknown, opts: import("./assembly").BaseOptions): Promise<{
|
|
466
|
-
[
|
|
487
|
+
[key: string]: string;
|
|
467
488
|
}>;
|
|
468
489
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>): void;
|
|
469
490
|
afterAttach(): void;
|
|
@@ -58,12 +58,21 @@ function assemblyManagerFactory(assemblyConfigType, pluginManager) {
|
|
|
58
58
|
if (!assemblyName) {
|
|
59
59
|
throw new Error('no assembly name supplied to waitForAssembly');
|
|
60
60
|
}
|
|
61
|
-
|
|
61
|
+
let assembly = self.get(assemblyName);
|
|
62
|
+
if (!assembly) {
|
|
63
|
+
try {
|
|
64
|
+
await (0, util_1.when)(() => Boolean(self.get(assemblyName)), { timeout: 1000 });
|
|
65
|
+
assembly = self.get(assemblyName);
|
|
66
|
+
}
|
|
67
|
+
catch (e) {
|
|
68
|
+
// ignore
|
|
69
|
+
}
|
|
70
|
+
}
|
|
62
71
|
if (!assembly) {
|
|
63
72
|
return undefined;
|
|
64
73
|
}
|
|
65
|
-
await (0, util_1.when)(() => Boolean(assembly.regions && assembly.refNameAliases) ||
|
|
66
|
-
!!assembly.error);
|
|
74
|
+
await (0, util_1.when)(() => Boolean((assembly === null || assembly === void 0 ? void 0 : assembly.regions) && assembly.refNameAliases) ||
|
|
75
|
+
!!(assembly === null || assembly === void 0 ? void 0 : assembly.error));
|
|
67
76
|
if (assembly.error) {
|
|
68
77
|
throw assembly.error;
|
|
69
78
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/core",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
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": "ebd548ceb52adb36cf6ab437082b5b5feac1338e"
|
|
77
77
|
}
|
package/rpc/coreRpcMethods.d.ts
CHANGED
|
@@ -64,7 +64,7 @@ export declare class CoreEstimateRegionStats extends RpcMethodType {
|
|
|
64
64
|
name: string;
|
|
65
65
|
serializeArguments(args: RenderArgs & {
|
|
66
66
|
signal?: AbortSignal;
|
|
67
|
-
statusCallback?:
|
|
67
|
+
statusCallback?: (arg: string) => void;
|
|
68
68
|
}, rpcDriverClassName: string): Promise<{}>;
|
|
69
69
|
execute(args: {
|
|
70
70
|
adapterConfig: {};
|