@jbrowse/core 2.4.2 → 2.6.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/ArrayValue.d.ts +16 -0
- package/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.js +45 -0
- package/BaseFeatureWidget/BaseFeatureDetail/Attributes.d.ts +15 -0
- package/BaseFeatureWidget/BaseFeatureDetail/Attributes.js +52 -0
- package/BaseFeatureWidget/BaseFeatureDetail/BasicValue.d.ts +13 -0
- package/BaseFeatureWidget/BaseFeatureDetail/BasicValue.js +27 -0
- package/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.d.ts +15 -0
- package/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.js +98 -0
- package/BaseFeatureWidget/BaseFeatureDetail/FieldName.d.ts +16 -0
- package/BaseFeatureWidget/BaseFeatureDetail/FieldName.js +32 -0
- package/BaseFeatureWidget/BaseFeatureDetail/SimpleField.d.ts +17 -0
- package/BaseFeatureWidget/BaseFeatureDetail/SimpleField.js +23 -0
- package/BaseFeatureWidget/BaseFeatureDetail/UriField.d.ts +18 -0
- package/BaseFeatureWidget/BaseFeatureDetail/UriField.js +31 -0
- package/BaseFeatureWidget/BaseFeatureDetail/UriLink.d.ts +7 -0
- package/BaseFeatureWidget/BaseFeatureDetail/UriLink.js +13 -0
- package/BaseFeatureWidget/BaseFeatureDetail/index.d.ts +33 -0
- package/BaseFeatureWidget/BaseFeatureDetail/index.js +170 -0
- package/BaseFeatureWidget/BaseFeatureDetail/util.d.ts +5 -0
- package/BaseFeatureWidget/BaseFeatureDetail/util.js +46 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/CDNASequence.d.ts +13 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/CDNASequence.js +25 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/CDSSequence.d.ts +6 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/CDSSequence.js +12 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/GenomicSequence.d.ts +6 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/GenomicSequence.js +14 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/ProteinSequence.d.ts +9 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/ProteinSequence.js +18 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.d.ts +3 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.js +143 -0
- package/BaseFeatureWidget/{SequenceFeatureSettingsDialog.d.ts → SequenceFeatureDetails/SequenceFeatureSettingsDialog.d.ts} +2 -2
- package/BaseFeatureWidget/{SequenceFeatureSettingsDialog.js → SequenceFeatureDetails/SequenceFeatureSettingsDialog.js} +1 -1
- package/BaseFeatureWidget/{SequenceHelpDialog.d.ts → SequenceFeatureDetails/SequenceHelpDialog.d.ts} +2 -2
- package/BaseFeatureWidget/{SequenceHelpDialog.js → SequenceFeatureDetails/SequenceHelpDialog.js} +6 -9
- package/BaseFeatureWidget/{SequencePanel.d.ts → SequenceFeatureDetails/SequencePanel.d.ts} +1 -1
- package/BaseFeatureWidget/{SequencePanel.js → SequenceFeatureDetails/SequencePanel.js} +10 -8
- package/BaseFeatureWidget/SequenceFeatureDetails/hooks.d.ts +10 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/hooks.js +73 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/index.d.ts +3 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/index.js +68 -0
- package/BaseFeatureWidget/{test_data → SequenceFeatureDetails/test_data}/DLGAP3.d.ts +17 -17
- package/BaseFeatureWidget/{test_data → SequenceFeatureDetails/test_data}/NCDN.d.ts +16 -16
- package/BaseFeatureWidget/SequenceFeatureDetails/util.d.ts +6 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/util.js +11 -0
- package/BaseFeatureWidget/index.d.ts +4 -1
- package/BaseFeatureWidget/index.js +29 -17
- package/BaseFeatureWidget/types.d.ts +2 -2
- package/BaseFeatureWidget/util.js +15 -5
- package/Plugin.d.ts +1 -1
- package/PluginLoader.js +17 -0
- package/PluginManager.d.ts +8 -5
- package/PluginManager.js +3 -0
- package/README.md +0 -2
- package/ReExports/list.js +1 -0
- package/ReExports/modules.d.ts +8 -5
- package/ReExports/modules.js +7 -7
- package/TextSearch/TextSearchManager.d.ts +2 -9
- package/assemblyManager/assembly.d.ts +91 -8
- package/assemblyManager/assembly.js +92 -8
- package/assemblyManager/assemblyConfigSchema.d.ts +52 -1
- package/assemblyManager/assemblyConfigSchema.js +1 -0
- package/assemblyManager/assemblyManager.d.ts +227 -58
- package/assemblyManager/assemblyManager.js +72 -13
- package/assemblyManager/index.d.ts +1 -0
- package/configuration/configurationSchema.d.ts +14 -16
- package/configuration/configurationSchema.js +4 -2
- package/configuration/index.d.ts +1 -1
- package/configuration/types.d.ts +15 -0
- package/configuration/types.js +2 -0
- package/configuration/util.d.ts +5 -3
- package/configuration/util.js +18 -18
- package/data_adapters/BaseAdapter/BaseAdapter.d.ts +23 -0
- package/data_adapters/BaseAdapter/BaseAdapter.js +37 -0
- package/data_adapters/BaseAdapter/BaseFeatureDataAdapter.d.ts +128 -0
- package/data_adapters/{BaseAdapter.js → BaseAdapter/BaseFeatureDataAdapter.js} +58 -88
- package/data_adapters/BaseAdapter/BaseOptions.d.ts +16 -0
- package/data_adapters/BaseAdapter/BaseOptions.js +2 -0
- package/data_adapters/BaseAdapter/BaseRefNameAliasAdapter.d.ts +9 -0
- package/data_adapters/BaseAdapter/BaseRefNameAliasAdapter.js +2 -0
- package/data_adapters/BaseAdapter/BaseSequenceAdapter.d.ts +13 -0
- package/data_adapters/BaseAdapter/BaseSequenceAdapter.js +10 -0
- package/data_adapters/BaseAdapter/BaseTextSearchAdapter.d.ts +6 -0
- package/data_adapters/BaseAdapter/BaseTextSearchAdapter.js +2 -0
- package/data_adapters/BaseAdapter/RegionsAdapter.d.ts +6 -0
- package/data_adapters/BaseAdapter/RegionsAdapter.js +2 -0
- package/data_adapters/BaseAdapter/index.d.ts +15 -0
- package/data_adapters/BaseAdapter/index.js +25 -0
- package/data_adapters/BaseAdapter/types.d.ts +21 -0
- package/data_adapters/BaseAdapter/types.js +2 -0
- package/data_adapters/BaseAdapter/util.d.ts +12 -0
- package/data_adapters/BaseAdapter/util.js +23 -0
- package/data_adapters/CytobandAdapter/configSchema.d.ts +11 -1
- package/package.json +4 -4
- package/pluggableElementTypes/AdapterType.d.ts +1 -1
- package/pluggableElementTypes/ConnectionType.d.ts +1 -1
- package/pluggableElementTypes/DisplayType.d.ts +1 -1
- package/pluggableElementTypes/InternetAccountType.d.ts +1 -1
- package/pluggableElementTypes/RpcMethodType.d.ts +9 -7
- package/pluggableElementTypes/RpcMethodType.js +9 -7
- package/pluggableElementTypes/TextSearchAdapterType.d.ts +1 -1
- package/pluggableElementTypes/models/BaseConnectionModelFactory.d.ts +18 -0
- package/pluggableElementTypes/models/BaseConnectionModelFactory.js +9 -0
- package/pluggableElementTypes/models/BaseDisplayModel.d.ts +10 -1
- package/pluggableElementTypes/models/BaseDisplayModel.js +9 -1
- package/pluggableElementTypes/models/BaseTrackModel.d.ts +2 -1
- package/pluggableElementTypes/models/BaseTrackModel.js +4 -2
- package/pluggableElementTypes/models/BaseViewModel.d.ts +46 -2
- package/pluggableElementTypes/models/BaseViewModel.js +6 -0
- package/pluggableElementTypes/models/InternetAccountModel.d.ts +36 -2
- package/pluggableElementTypes/models/InternetAccountModel.js +33 -21
- package/pluggableElementTypes/models/baseConnectionConfig.d.ts +22 -2
- package/pluggableElementTypes/models/baseConnectionConfig.js +2 -1
- package/pluggableElementTypes/models/baseInternetAccountConfig.d.ts +42 -1
- package/pluggableElementTypes/models/baseInternetAccountConfig.js +1 -1
- package/pluggableElementTypes/models/baseTrackConfig.d.ts +120 -3
- package/pluggableElementTypes/models/baseTrackConfig.js +7 -5
- package/pluggableElementTypes/models/index.d.ts +1 -1
- package/pluggableElementTypes/renderers/BoxRendererType.js +1 -2
- package/pluggableElementTypes/renderers/CircularChordRendererType.d.ts +2 -2
- package/pluggableElementTypes/renderers/FeatureRendererType.d.ts +4 -2
- package/pluggableElementTypes/renderers/FeatureRendererType.js +4 -6
- package/pluggableElementTypes/renderers/RendererType.d.ts +1 -1
- package/pluggableElementTypes/renderers/RpcRenderedSvgGroup.d.ts +2 -2
- package/pluggableElementTypes/renderers/ServerSideRenderedContent.d.ts +1 -1
- package/pluggableElementTypes/renderers/ServerSideRendererType.d.ts +1 -1
- package/rpc/BaseRpcDriver.js +1 -7
- package/rpc/RpcManager.d.ts +8 -1
- package/rpc/RpcManager.js +1 -1
- package/rpc/baseRpcConfig.d.ts +10 -1
- package/rpc/configSchema.d.ts +14 -1
- package/rpc/coreRpcMethods.d.ts +1 -1
- package/rpc/coreRpcMethods.js +3 -3
- package/rpc/mainThreadRpcConfig.d.ts +7 -1
- package/rpc/methods/{CoreEstimateRegionStats.d.ts → CoreGetFeatureDensityStats.d.ts} +2 -2
- package/rpc/methods/{CoreEstimateRegionStats.js → CoreGetFeatureDensityStats.js} +4 -4
- package/rpc/methods/CoreGetFeatureDetails.js +5 -5
- package/rpc/webWorkerRpcConfig.d.ts +7 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/ui/AppLogo.d.ts +2 -2
- package/ui/AssemblySelector.d.ts +2 -2
- package/ui/AssemblySelector.js +1 -1
- package/ui/CascadingMenu.d.ts +2 -2
- package/ui/CascadingMenuButton.d.ts +8 -0
- package/ui/CascadingMenuButton.js +20 -0
- package/ui/ColorPicker.d.ts +4 -4
- package/ui/Dialog.d.ts +5 -5
- package/ui/Dialog.js +19 -7
- package/ui/DropDownMenu.d.ts +2 -2
- package/ui/EditableTypography.js +1 -1
- package/ui/ErrorMessage.d.ts +2 -2
- package/ui/ErrorMessage.js +6 -2
- package/ui/FactoryResetDialog.d.ts +2 -2
- package/ui/FatalErrorDialog.d.ts +6 -7
- package/ui/FatalErrorDialog.js +7 -7
- package/ui/FileSelector/FileSelector.d.ts +2 -2
- package/ui/FileSelector/FileSelector.js +3 -2
- package/ui/FileSelector/LocalFileChooser.d.ts +2 -2
- package/ui/FileSelector/UrlChooser.d.ts +3 -4
- package/ui/FileSelector/UrlChooser.js +8 -10
- package/ui/Icons.d.ts +10 -10
- package/ui/LoadingEllipses.d.ts +2 -2
- package/ui/Logo.d.ts +3 -3
- package/ui/Menu.d.ts +2 -2
- package/ui/PrerenderedCanvas.d.ts +2 -2
- package/ui/ResizeBar.d.ts +1 -1
- package/ui/ResizeBar.js +1 -1
- package/ui/ResizeHandle.d.ts +2 -2
- package/ui/ReturnToImportFormDialog.d.ts +2 -2
- package/ui/SanitizedHTML.d.ts +2 -2
- package/ui/SanitizedHTML.js +6 -0
- package/ui/Snackbar.d.ts +7 -9
- package/ui/Snackbar.js +12 -17
- package/ui/SnackbarModel.d.ts +9 -3
- package/ui/SnackbarModel.js +3 -3
- package/ui/Tooltip.d.ts +2 -2
- package/ui/index.d.ts +0 -1
- package/ui/index.js +1 -3
- package/ui/react-colorful.d.ts +1 -1
- package/ui/theme.js +3 -18
- package/util/Base1DUtils.js +2 -1
- package/util/QuickLRU.d.ts +1 -1
- package/util/blockTypes.js +1 -1
- package/util/formatFastaStrings.js +1 -1
- package/util/index.d.ts +18 -2
- package/util/index.js +77 -11
- package/util/io/index.js +1 -1
- package/util/layouts/PrecomputedMultiLayout.d.ts +1 -1
- package/util/mst-reflection.js +1 -2
- package/util/offscreenCanvasUtils.d.ts +2 -2
- package/util/stats.d.ts +5 -5
- package/util/types/index.d.ts +9 -3
- package/util/types/index.js +6 -2
- package/util/types/mst.d.ts +12 -9
- package/util/types/util.d.ts +0 -3
- package/BaseFeatureWidget/BaseFeatureDetail.d.ts +0 -62
- package/BaseFeatureWidget/BaseFeatureDetail.js +0 -378
- package/BaseFeatureWidget/SequenceBox.d.ts +0 -29
- package/BaseFeatureWidget/SequenceBox.js +0 -63
- package/BaseFeatureWidget/SequenceFeatureDetails.d.ts +0 -3
- package/BaseFeatureWidget/SequenceFeatureDetails.js +0 -230
- package/data_adapters/BaseAdapter.d.ts +0 -138
- package/ui/AboutDialog.d.ts +0 -12
- package/ui/AboutDialog.js +0 -125
- package/ui/App.d.ts +0 -18
- package/ui/App.js +0 -114
- package/ui/AppToolbar.d.ts +0 -19
- package/ui/AppToolbar.js +0 -56
- package/ui/Drawer.d.ts +0 -8
- package/ui/Drawer.js +0 -34
- package/ui/DrawerWidget.d.ts +0 -6
- package/ui/DrawerWidget.js +0 -130
- package/ui/ViewContainer.d.ts +0 -9
- package/ui/ViewContainer.js +0 -76
- package/ui/ViewContainerTitle.d.ts +0 -6
- package/ui/ViewContainerTitle.js +0 -42
- package/ui/ViewLauncher.d.ts +0 -18
- package/ui/ViewLauncher.js +0 -50
- package/ui/ViewMenu.d.ts +0 -9
- package/ui/ViewMenu.js +0 -69
- package/ui/ViewPanel.d.ts +0 -19
- package/ui/ViewPanel.js +0 -49
- /package/BaseFeatureWidget/{test_data → SequenceFeatureDetails/test_data}/DLGAP3.js +0 -0
- /package/BaseFeatureWidget/{test_data → SequenceFeatureDetails/test_data}/NCDN.js +0 -0
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import { IAnyType } from 'mobx-state-tree';
|
|
2
2
|
import { Assembly } from './assembly';
|
|
3
3
|
import PluginManager from '../PluginManager';
|
|
4
|
+
import RpcManager from '../rpc/RpcManager';
|
|
5
|
+
/**
|
|
6
|
+
* #stateModel AssemblyManager
|
|
7
|
+
*/
|
|
4
8
|
declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): import("mobx-state-tree").IModelType<{
|
|
9
|
+
/**
|
|
10
|
+
* #property
|
|
11
|
+
* this is automatically managed by an autorun which looks in the parent
|
|
12
|
+
* session.assemblies, session.sessionAssemblies, and
|
|
13
|
+
* session.temporaryAssemblies
|
|
14
|
+
*/
|
|
5
15
|
assemblies: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
6
16
|
configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<IAnyType>>;
|
|
7
17
|
}, {
|
|
@@ -10,10 +20,10 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
10
20
|
loadingP: Promise<void> | undefined;
|
|
11
21
|
volatileRegions: import("./assembly").BasicRegion[] | undefined;
|
|
12
22
|
refNameAliases: {
|
|
13
|
-
[x: string]: string;
|
|
23
|
+
[x: string]: string | undefined;
|
|
14
24
|
} | undefined;
|
|
15
25
|
lowerCaseRefNameAliases: {
|
|
16
|
-
[x: string]: string;
|
|
26
|
+
[x: string]: string | undefined;
|
|
17
27
|
} | undefined;
|
|
18
28
|
cytobands: import("../util").Feature[] | undefined;
|
|
19
29
|
} & {
|
|
@@ -27,12 +37,12 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
27
37
|
readonly allRefNames: string[] | undefined;
|
|
28
38
|
readonly lowerCaseRefNames: string[] | undefined;
|
|
29
39
|
readonly allRefNamesWithLowerCase: string[] | undefined;
|
|
30
|
-
readonly rpcManager:
|
|
40
|
+
readonly rpcManager: RpcManager;
|
|
31
41
|
readonly refNameColors: string[];
|
|
32
42
|
} & {
|
|
33
43
|
readonly refNames: string[] | undefined;
|
|
34
44
|
} & {
|
|
35
|
-
getCanonicalRefName(refName: string): string;
|
|
45
|
+
getCanonicalRefName(refName: string): string | undefined;
|
|
36
46
|
getRefNameColor(refName: string): string | undefined;
|
|
37
47
|
isValidRefName(refName: string): boolean;
|
|
38
48
|
} & {
|
|
@@ -40,24 +50,139 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
40
50
|
setError(e: unknown): void;
|
|
41
51
|
setRegions(regions: import("../util").Region[]): void;
|
|
42
52
|
setRefNameAliases(aliases: {
|
|
43
|
-
[x: string]: string;
|
|
53
|
+
[x: string]: string | undefined;
|
|
44
54
|
}, lcAliases: {
|
|
45
|
-
[x: string]: string;
|
|
55
|
+
[x: string]: string | undefined;
|
|
46
56
|
}): void;
|
|
47
57
|
setCytobands(cytobands: import("../util").Feature[]): void;
|
|
48
58
|
setLoadingP(p?: Promise<void> | undefined): void;
|
|
49
59
|
load(): Promise<void>;
|
|
50
60
|
loadPre(): Promise<void>;
|
|
51
61
|
} & {
|
|
52
|
-
getAdapterMapEntry(adapterConf: unknown, options: import("
|
|
53
|
-
getRefNameMapForAdapter(adapterConf: unknown, opts: import("
|
|
54
|
-
[x: string]: string;
|
|
62
|
+
getAdapterMapEntry(adapterConf: unknown, options: import("../data_adapters/BaseAdapter").BaseOptions): Promise<import("./assembly").RefNameMap>;
|
|
63
|
+
getRefNameMapForAdapter(adapterConf: unknown, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
64
|
+
[x: string]: string | undefined;
|
|
55
65
|
}>;
|
|
56
|
-
getReverseRefNameMapForAdapter(adapterConf: unknown, opts: import("
|
|
57
|
-
[x: string]: string;
|
|
66
|
+
getReverseRefNameMapForAdapter(adapterConf: unknown, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
67
|
+
[x: string]: string | undefined;
|
|
58
68
|
}>;
|
|
59
69
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
60
70
|
}, {
|
|
71
|
+
readonly assemblyNameMap: {
|
|
72
|
+
[key: string]: ({
|
|
73
|
+
configuration: any;
|
|
74
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
75
|
+
error: unknown;
|
|
76
|
+
loaded: boolean;
|
|
77
|
+
loadingP: Promise<void> | undefined;
|
|
78
|
+
volatileRegions: import("./assembly").BasicRegion[] | undefined;
|
|
79
|
+
refNameAliases: {
|
|
80
|
+
[x: string]: string | undefined;
|
|
81
|
+
} | undefined;
|
|
82
|
+
lowerCaseRefNameAliases: {
|
|
83
|
+
[x: string]: string | undefined;
|
|
84
|
+
} | undefined;
|
|
85
|
+
cytobands: import("../util").Feature[] | undefined;
|
|
86
|
+
} & {
|
|
87
|
+
readonly initialized: boolean;
|
|
88
|
+
readonly name: string;
|
|
89
|
+
readonly regions: import("./assembly").BasicRegion[] | undefined;
|
|
90
|
+
readonly aliases: string[];
|
|
91
|
+
readonly displayName: string | undefined;
|
|
92
|
+
hasName(name: string): boolean;
|
|
93
|
+
readonly allAliases: string[];
|
|
94
|
+
readonly allRefNames: string[] | undefined;
|
|
95
|
+
readonly lowerCaseRefNames: string[] | undefined;
|
|
96
|
+
readonly allRefNamesWithLowerCase: string[] | undefined;
|
|
97
|
+
readonly rpcManager: RpcManager;
|
|
98
|
+
readonly refNameColors: string[];
|
|
99
|
+
} & {
|
|
100
|
+
readonly refNames: string[] | undefined;
|
|
101
|
+
} & {
|
|
102
|
+
getCanonicalRefName(refName: string): string | undefined;
|
|
103
|
+
getRefNameColor(refName: string): string | undefined;
|
|
104
|
+
isValidRefName(refName: string): boolean;
|
|
105
|
+
} & {
|
|
106
|
+
setLoaded({ adapterRegionsWithAssembly, refNameAliases, lowerCaseRefNameAliases, cytobands, }: import("./assembly").Loading): void;
|
|
107
|
+
setError(e: unknown): void;
|
|
108
|
+
setRegions(regions: import("../util").Region[]): void;
|
|
109
|
+
setRefNameAliases(aliases: {
|
|
110
|
+
[x: string]: string | undefined;
|
|
111
|
+
}, lcAliases: {
|
|
112
|
+
[x: string]: string | undefined;
|
|
113
|
+
}): void;
|
|
114
|
+
setCytobands(cytobands: import("../util").Feature[]): void;
|
|
115
|
+
setLoadingP(p?: Promise<void> | undefined): void;
|
|
116
|
+
load(): Promise<void>;
|
|
117
|
+
loadPre(): Promise<void>;
|
|
118
|
+
} & {
|
|
119
|
+
getAdapterMapEntry(adapterConf: unknown, options: import("../data_adapters/BaseAdapter").BaseOptions): Promise<import("./assembly").RefNameMap>;
|
|
120
|
+
getRefNameMapForAdapter(adapterConf: unknown, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
121
|
+
[x: string]: string | undefined;
|
|
122
|
+
}>;
|
|
123
|
+
getReverseRefNameMapForAdapter(adapterConf: unknown, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
124
|
+
[x: string]: string | undefined;
|
|
125
|
+
}>;
|
|
126
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
127
|
+
configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<IAnyType>>;
|
|
128
|
+
}, {
|
|
129
|
+
error: unknown;
|
|
130
|
+
loaded: boolean;
|
|
131
|
+
loadingP: Promise<void> | undefined;
|
|
132
|
+
volatileRegions: import("./assembly").BasicRegion[] | undefined;
|
|
133
|
+
refNameAliases: {
|
|
134
|
+
[x: string]: string | undefined;
|
|
135
|
+
} | undefined;
|
|
136
|
+
lowerCaseRefNameAliases: {
|
|
137
|
+
[x: string]: string | undefined;
|
|
138
|
+
} | undefined;
|
|
139
|
+
cytobands: import("../util").Feature[] | undefined;
|
|
140
|
+
} & {
|
|
141
|
+
readonly initialized: boolean;
|
|
142
|
+
readonly name: string;
|
|
143
|
+
readonly regions: import("./assembly").BasicRegion[] | undefined;
|
|
144
|
+
readonly aliases: string[];
|
|
145
|
+
readonly displayName: string | undefined;
|
|
146
|
+
hasName(name: string): boolean;
|
|
147
|
+
readonly allAliases: string[];
|
|
148
|
+
readonly allRefNames: string[] | undefined;
|
|
149
|
+
readonly lowerCaseRefNames: string[] | undefined;
|
|
150
|
+
readonly allRefNamesWithLowerCase: string[] | undefined;
|
|
151
|
+
readonly rpcManager: RpcManager;
|
|
152
|
+
readonly refNameColors: string[];
|
|
153
|
+
} & {
|
|
154
|
+
readonly refNames: string[] | undefined;
|
|
155
|
+
} & {
|
|
156
|
+
getCanonicalRefName(refName: string): string | undefined;
|
|
157
|
+
getRefNameColor(refName: string): string | undefined;
|
|
158
|
+
isValidRefName(refName: string): boolean;
|
|
159
|
+
} & {
|
|
160
|
+
setLoaded({ adapterRegionsWithAssembly, refNameAliases, lowerCaseRefNameAliases, cytobands, }: import("./assembly").Loading): void;
|
|
161
|
+
setError(e: unknown): void;
|
|
162
|
+
setRegions(regions: import("../util").Region[]): void;
|
|
163
|
+
setRefNameAliases(aliases: {
|
|
164
|
+
[x: string]: string | undefined;
|
|
165
|
+
}, lcAliases: {
|
|
166
|
+
[x: string]: string | undefined;
|
|
167
|
+
}): void;
|
|
168
|
+
setCytobands(cytobands: import("../util").Feature[]): void;
|
|
169
|
+
setLoadingP(p?: Promise<void> | undefined): void;
|
|
170
|
+
load(): Promise<void>;
|
|
171
|
+
loadPre(): Promise<void>;
|
|
172
|
+
} & {
|
|
173
|
+
getAdapterMapEntry(adapterConf: unknown, options: import("../data_adapters/BaseAdapter").BaseOptions): Promise<import("./assembly").RefNameMap>;
|
|
174
|
+
getRefNameMapForAdapter(adapterConf: unknown, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
175
|
+
[x: string]: string | undefined;
|
|
176
|
+
}>;
|
|
177
|
+
getReverseRefNameMapForAdapter(adapterConf: unknown, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
178
|
+
[x: string]: string | undefined;
|
|
179
|
+
}>;
|
|
180
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined;
|
|
181
|
+
};
|
|
182
|
+
} & {
|
|
183
|
+
/**
|
|
184
|
+
* #method
|
|
185
|
+
*/
|
|
61
186
|
get(asmName: string): ({
|
|
62
187
|
configuration: any;
|
|
63
188
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
@@ -66,10 +191,10 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
66
191
|
loadingP: Promise<void> | undefined;
|
|
67
192
|
volatileRegions: import("./assembly").BasicRegion[] | undefined;
|
|
68
193
|
refNameAliases: {
|
|
69
|
-
[x: string]: string;
|
|
194
|
+
[x: string]: string | undefined;
|
|
70
195
|
} | undefined;
|
|
71
196
|
lowerCaseRefNameAliases: {
|
|
72
|
-
[x: string]: string;
|
|
197
|
+
[x: string]: string | undefined;
|
|
73
198
|
} | undefined;
|
|
74
199
|
cytobands: import("../util").Feature[] | undefined;
|
|
75
200
|
} & {
|
|
@@ -83,12 +208,12 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
83
208
|
readonly allRefNames: string[] | undefined;
|
|
84
209
|
readonly lowerCaseRefNames: string[] | undefined;
|
|
85
210
|
readonly allRefNamesWithLowerCase: string[] | undefined;
|
|
86
|
-
readonly rpcManager:
|
|
211
|
+
readonly rpcManager: RpcManager;
|
|
87
212
|
readonly refNameColors: string[];
|
|
88
213
|
} & {
|
|
89
214
|
readonly refNames: string[] | undefined;
|
|
90
215
|
} & {
|
|
91
|
-
getCanonicalRefName(refName: string): string;
|
|
216
|
+
getCanonicalRefName(refName: string): string | undefined;
|
|
92
217
|
getRefNameColor(refName: string): string | undefined;
|
|
93
218
|
isValidRefName(refName: string): boolean;
|
|
94
219
|
} & {
|
|
@@ -96,21 +221,21 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
96
221
|
setError(e: unknown): void;
|
|
97
222
|
setRegions(regions: import("../util").Region[]): void;
|
|
98
223
|
setRefNameAliases(aliases: {
|
|
99
|
-
[x: string]: string;
|
|
224
|
+
[x: string]: string | undefined;
|
|
100
225
|
}, lcAliases: {
|
|
101
|
-
[x: string]: string;
|
|
226
|
+
[x: string]: string | undefined;
|
|
102
227
|
}): void;
|
|
103
228
|
setCytobands(cytobands: import("../util").Feature[]): void;
|
|
104
229
|
setLoadingP(p?: Promise<void> | undefined): void;
|
|
105
230
|
load(): Promise<void>;
|
|
106
231
|
loadPre(): Promise<void>;
|
|
107
232
|
} & {
|
|
108
|
-
getAdapterMapEntry(adapterConf: unknown, options: import("
|
|
109
|
-
getRefNameMapForAdapter(adapterConf: unknown, opts: import("
|
|
110
|
-
[x: string]: string;
|
|
233
|
+
getAdapterMapEntry(adapterConf: unknown, options: import("../data_adapters/BaseAdapter").BaseOptions): Promise<import("./assembly").RefNameMap>;
|
|
234
|
+
getRefNameMapForAdapter(adapterConf: unknown, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
235
|
+
[x: string]: string | undefined;
|
|
111
236
|
}>;
|
|
112
|
-
getReverseRefNameMapForAdapter(adapterConf: unknown, opts: import("
|
|
113
|
-
[x: string]: string;
|
|
237
|
+
getReverseRefNameMapForAdapter(adapterConf: unknown, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
238
|
+
[x: string]: string | undefined;
|
|
114
239
|
}>;
|
|
115
240
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
116
241
|
configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<IAnyType>>;
|
|
@@ -120,10 +245,10 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
120
245
|
loadingP: Promise<void> | undefined;
|
|
121
246
|
volatileRegions: import("./assembly").BasicRegion[] | undefined;
|
|
122
247
|
refNameAliases: {
|
|
123
|
-
[x: string]: string;
|
|
248
|
+
[x: string]: string | undefined;
|
|
124
249
|
} | undefined;
|
|
125
250
|
lowerCaseRefNameAliases: {
|
|
126
|
-
[x: string]: string;
|
|
251
|
+
[x: string]: string | undefined;
|
|
127
252
|
} | undefined;
|
|
128
253
|
cytobands: import("../util").Feature[] | undefined;
|
|
129
254
|
} & {
|
|
@@ -137,12 +262,12 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
137
262
|
readonly allRefNames: string[] | undefined;
|
|
138
263
|
readonly lowerCaseRefNames: string[] | undefined;
|
|
139
264
|
readonly allRefNamesWithLowerCase: string[] | undefined;
|
|
140
|
-
readonly rpcManager:
|
|
265
|
+
readonly rpcManager: RpcManager;
|
|
141
266
|
readonly refNameColors: string[];
|
|
142
267
|
} & {
|
|
143
268
|
readonly refNames: string[] | undefined;
|
|
144
269
|
} & {
|
|
145
|
-
getCanonicalRefName(refName: string): string;
|
|
270
|
+
getCanonicalRefName(refName: string): string | undefined;
|
|
146
271
|
getRefNameColor(refName: string): string | undefined;
|
|
147
272
|
isValidRefName(refName: string): boolean;
|
|
148
273
|
} & {
|
|
@@ -150,31 +275,44 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
150
275
|
setError(e: unknown): void;
|
|
151
276
|
setRegions(regions: import("../util").Region[]): void;
|
|
152
277
|
setRefNameAliases(aliases: {
|
|
153
|
-
[x: string]: string;
|
|
278
|
+
[x: string]: string | undefined;
|
|
154
279
|
}, lcAliases: {
|
|
155
|
-
[x: string]: string;
|
|
280
|
+
[x: string]: string | undefined;
|
|
156
281
|
}): void;
|
|
157
282
|
setCytobands(cytobands: import("../util").Feature[]): void;
|
|
158
283
|
setLoadingP(p?: Promise<void> | undefined): void;
|
|
159
284
|
load(): Promise<void>;
|
|
160
285
|
loadPre(): Promise<void>;
|
|
161
286
|
} & {
|
|
162
|
-
getAdapterMapEntry(adapterConf: unknown, options: import("
|
|
163
|
-
getRefNameMapForAdapter(adapterConf: unknown, opts: import("
|
|
164
|
-
[x: string]: string;
|
|
287
|
+
getAdapterMapEntry(adapterConf: unknown, options: import("../data_adapters/BaseAdapter").BaseOptions): Promise<import("./assembly").RefNameMap>;
|
|
288
|
+
getRefNameMapForAdapter(adapterConf: unknown, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
289
|
+
[x: string]: string | undefined;
|
|
165
290
|
}>;
|
|
166
|
-
getReverseRefNameMapForAdapter(adapterConf: unknown, opts: import("
|
|
167
|
-
[x: string]: string;
|
|
291
|
+
getReverseRefNameMapForAdapter(adapterConf: unknown, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
292
|
+
[x: string]: string | undefined;
|
|
168
293
|
}>;
|
|
169
294
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined;
|
|
295
|
+
/**
|
|
296
|
+
* #getter
|
|
297
|
+
*/
|
|
170
298
|
readonly assemblyNamesList: any[];
|
|
299
|
+
/**
|
|
300
|
+
* #getter
|
|
301
|
+
* looks at jbrowse.assemblies, session.sessionAssemblies, and
|
|
302
|
+
* session.temporaryAssemblies to load from
|
|
303
|
+
*/
|
|
171
304
|
readonly assemblyList: ({
|
|
172
305
|
[x: string]: any;
|
|
173
306
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
174
307
|
setSubschema(slotName: string, data: unknown): any;
|
|
175
308
|
} & import("mobx-state-tree").IStateTreeNode<import("../configuration").AnyConfigurationSchemaType>)[];
|
|
176
|
-
readonly rpcManager:
|
|
309
|
+
readonly rpcManager: RpcManager;
|
|
177
310
|
} & {
|
|
311
|
+
/**
|
|
312
|
+
* #method
|
|
313
|
+
* use this method instead of assemblyManager.get(assemblyName)
|
|
314
|
+
* to get an assembly with regions loaded
|
|
315
|
+
*/
|
|
178
316
|
waitForAssembly(assemblyName: string): Promise<({
|
|
179
317
|
configuration: any;
|
|
180
318
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
@@ -183,10 +321,10 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
183
321
|
loadingP: Promise<void> | undefined;
|
|
184
322
|
volatileRegions: import("./assembly").BasicRegion[] | undefined;
|
|
185
323
|
refNameAliases: {
|
|
186
|
-
[x: string]: string;
|
|
324
|
+
[x: string]: string | undefined;
|
|
187
325
|
} | undefined;
|
|
188
326
|
lowerCaseRefNameAliases: {
|
|
189
|
-
[x: string]: string;
|
|
327
|
+
[x: string]: string | undefined;
|
|
190
328
|
} | undefined;
|
|
191
329
|
cytobands: import("../util").Feature[] | undefined;
|
|
192
330
|
} & {
|
|
@@ -200,12 +338,12 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
200
338
|
readonly allRefNames: string[] | undefined;
|
|
201
339
|
readonly lowerCaseRefNames: string[] | undefined;
|
|
202
340
|
readonly allRefNamesWithLowerCase: string[] | undefined;
|
|
203
|
-
readonly rpcManager:
|
|
341
|
+
readonly rpcManager: RpcManager;
|
|
204
342
|
readonly refNameColors: string[];
|
|
205
343
|
} & {
|
|
206
344
|
readonly refNames: string[] | undefined;
|
|
207
345
|
} & {
|
|
208
|
-
getCanonicalRefName(refName: string): string;
|
|
346
|
+
getCanonicalRefName(refName: string): string | undefined;
|
|
209
347
|
getRefNameColor(refName: string): string | undefined;
|
|
210
348
|
isValidRefName(refName: string): boolean;
|
|
211
349
|
} & {
|
|
@@ -213,21 +351,21 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
213
351
|
setError(e: unknown): void;
|
|
214
352
|
setRegions(regions: import("../util").Region[]): void;
|
|
215
353
|
setRefNameAliases(aliases: {
|
|
216
|
-
[x: string]: string;
|
|
354
|
+
[x: string]: string | undefined;
|
|
217
355
|
}, lcAliases: {
|
|
218
|
-
[x: string]: string;
|
|
356
|
+
[x: string]: string | undefined;
|
|
219
357
|
}): void;
|
|
220
358
|
setCytobands(cytobands: import("../util").Feature[]): void;
|
|
221
359
|
setLoadingP(p?: Promise<void> | undefined): void;
|
|
222
360
|
load(): Promise<void>;
|
|
223
361
|
loadPre(): Promise<void>;
|
|
224
362
|
} & {
|
|
225
|
-
getAdapterMapEntry(adapterConf: unknown, options: import("
|
|
226
|
-
getRefNameMapForAdapter(adapterConf: unknown, opts: import("
|
|
227
|
-
[x: string]: string;
|
|
363
|
+
getAdapterMapEntry(adapterConf: unknown, options: import("../data_adapters/BaseAdapter").BaseOptions): Promise<import("./assembly").RefNameMap>;
|
|
364
|
+
getRefNameMapForAdapter(adapterConf: unknown, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
365
|
+
[x: string]: string | undefined;
|
|
228
366
|
}>;
|
|
229
|
-
getReverseRefNameMapForAdapter(adapterConf: unknown, opts: import("
|
|
230
|
-
[x: string]: string;
|
|
367
|
+
getReverseRefNameMapForAdapter(adapterConf: unknown, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
368
|
+
[x: string]: string | undefined;
|
|
231
369
|
}>;
|
|
232
370
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
233
371
|
configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<IAnyType>>;
|
|
@@ -237,10 +375,10 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
237
375
|
loadingP: Promise<void> | undefined;
|
|
238
376
|
volatileRegions: import("./assembly").BasicRegion[] | undefined;
|
|
239
377
|
refNameAliases: {
|
|
240
|
-
[x: string]: string;
|
|
378
|
+
[x: string]: string | undefined;
|
|
241
379
|
} | undefined;
|
|
242
380
|
lowerCaseRefNameAliases: {
|
|
243
|
-
[x: string]: string;
|
|
381
|
+
[x: string]: string | undefined;
|
|
244
382
|
} | undefined;
|
|
245
383
|
cytobands: import("../util").Feature[] | undefined;
|
|
246
384
|
} & {
|
|
@@ -254,12 +392,12 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
254
392
|
readonly allRefNames: string[] | undefined;
|
|
255
393
|
readonly lowerCaseRefNames: string[] | undefined;
|
|
256
394
|
readonly allRefNamesWithLowerCase: string[] | undefined;
|
|
257
|
-
readonly rpcManager:
|
|
395
|
+
readonly rpcManager: RpcManager;
|
|
258
396
|
readonly refNameColors: string[];
|
|
259
397
|
} & {
|
|
260
398
|
readonly refNames: string[] | undefined;
|
|
261
399
|
} & {
|
|
262
|
-
getCanonicalRefName(refName: string): string;
|
|
400
|
+
getCanonicalRefName(refName: string): string | undefined;
|
|
263
401
|
getRefNameColor(refName: string): string | undefined;
|
|
264
402
|
isValidRefName(refName: string): boolean;
|
|
265
403
|
} & {
|
|
@@ -267,40 +405,71 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
267
405
|
setError(e: unknown): void;
|
|
268
406
|
setRegions(regions: import("../util").Region[]): void;
|
|
269
407
|
setRefNameAliases(aliases: {
|
|
270
|
-
[x: string]: string;
|
|
408
|
+
[x: string]: string | undefined;
|
|
271
409
|
}, lcAliases: {
|
|
272
|
-
[x: string]: string;
|
|
410
|
+
[x: string]: string | undefined;
|
|
273
411
|
}): void;
|
|
274
412
|
setCytobands(cytobands: import("../util").Feature[]): void;
|
|
275
413
|
setLoadingP(p?: Promise<void> | undefined): void;
|
|
276
414
|
load(): Promise<void>;
|
|
277
415
|
loadPre(): Promise<void>;
|
|
278
416
|
} & {
|
|
279
|
-
getAdapterMapEntry(adapterConf: unknown, options: import("
|
|
280
|
-
getRefNameMapForAdapter(adapterConf: unknown, opts: import("
|
|
281
|
-
[x: string]: string;
|
|
417
|
+
getAdapterMapEntry(adapterConf: unknown, options: import("../data_adapters/BaseAdapter").BaseOptions): Promise<import("./assembly").RefNameMap>;
|
|
418
|
+
getRefNameMapForAdapter(adapterConf: unknown, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
419
|
+
[x: string]: string | undefined;
|
|
282
420
|
}>;
|
|
283
|
-
getReverseRefNameMapForAdapter(adapterConf: unknown, opts: import("
|
|
284
|
-
[x: string]: string;
|
|
421
|
+
getReverseRefNameMapForAdapter(adapterConf: unknown, opts: import("../data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
422
|
+
[x: string]: string | undefined;
|
|
285
423
|
}>;
|
|
286
424
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined>;
|
|
425
|
+
/**
|
|
426
|
+
* #method
|
|
427
|
+
*/
|
|
287
428
|
getRefNameMapForAdapter(adapterConf: unknown, assemblyName: string | undefined, opts: {
|
|
288
429
|
signal?: AbortSignal;
|
|
289
430
|
sessionId: string;
|
|
290
431
|
}): Promise<{
|
|
291
|
-
[x: string]: string;
|
|
432
|
+
[x: string]: string | undefined;
|
|
292
433
|
} | undefined>;
|
|
434
|
+
/**
|
|
435
|
+
* #method
|
|
436
|
+
*/
|
|
293
437
|
getReverseRefNameMapForAdapter(adapterConf: unknown, assemblyName: string | undefined, opts: {
|
|
294
438
|
signal?: AbortSignal;
|
|
295
439
|
sessionId: string;
|
|
296
440
|
}): Promise<{
|
|
297
|
-
[x: string]: string;
|
|
441
|
+
[x: string]: string | undefined;
|
|
298
442
|
} | undefined>;
|
|
443
|
+
/**
|
|
444
|
+
* #method
|
|
445
|
+
*/
|
|
299
446
|
isValidRefName(refName: string, assemblyName: string): boolean;
|
|
300
447
|
} & {
|
|
301
448
|
afterAttach(): void;
|
|
449
|
+
/**
|
|
450
|
+
* #action
|
|
451
|
+
* private: you would generally want to add to manipulate
|
|
452
|
+
* jbrowse.assemblies, session.sessionAssemblies, or
|
|
453
|
+
* session.temporaryAssemblies instead of using this directly
|
|
454
|
+
*/
|
|
302
455
|
removeAssembly(asm: Assembly): void;
|
|
456
|
+
/**
|
|
457
|
+
* #action
|
|
458
|
+
* private: you would generally want to add to manipulate
|
|
459
|
+
* jbrowse.assemblies, session.sessionAssemblies, or
|
|
460
|
+
* session.temporaryAssemblies instead of using this directly
|
|
461
|
+
*
|
|
462
|
+
* this can take an active instance of an assembly, in which case it is
|
|
463
|
+
* referred to, or it can take an identifier e.g. assembly name, which is
|
|
464
|
+
* used as a reference. snapshots cannot be used
|
|
465
|
+
*/
|
|
303
466
|
addAssembly(configuration: any): void;
|
|
467
|
+
/**
|
|
468
|
+
* #action
|
|
469
|
+
* private: you would generally want to add to manipulate
|
|
470
|
+
* jbrowse.assemblies, session.sessionAssemblies, or
|
|
471
|
+
* session.temporaryAssemblies instead of using this directly
|
|
472
|
+
*/
|
|
304
473
|
replaceAssembly(idx: number, configuration: any): void;
|
|
305
474
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
306
475
|
export default assemblyManagerFactory;
|
|
@@ -8,18 +8,49 @@ const util_1 = require("../util");
|
|
|
8
8
|
const mobx_1 = require("mobx");
|
|
9
9
|
const configuration_1 = require("../configuration");
|
|
10
10
|
const assembly_1 = __importDefault(require("./assembly"));
|
|
11
|
+
/**
|
|
12
|
+
* #stateModel AssemblyManager
|
|
13
|
+
*/
|
|
11
14
|
function assemblyManagerFactory(conf, pm) {
|
|
12
15
|
return mobx_state_tree_1.types
|
|
13
16
|
.model({
|
|
17
|
+
/**
|
|
18
|
+
* #property
|
|
19
|
+
* this is automatically managed by an autorun which looks in the parent
|
|
20
|
+
* session.assemblies, session.sessionAssemblies, and
|
|
21
|
+
* session.temporaryAssemblies
|
|
22
|
+
*/
|
|
14
23
|
assemblies: mobx_state_tree_1.types.array((0, assembly_1.default)(conf, pm)),
|
|
15
24
|
})
|
|
16
25
|
.views(self => ({
|
|
26
|
+
get assemblyNameMap() {
|
|
27
|
+
const obj = {};
|
|
28
|
+
for (const assembly of self.assemblies) {
|
|
29
|
+
for (const name of assembly.allAliases) {
|
|
30
|
+
obj[name] = assembly;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return obj;
|
|
34
|
+
},
|
|
35
|
+
}))
|
|
36
|
+
.views(self => ({
|
|
37
|
+
/**
|
|
38
|
+
* #method
|
|
39
|
+
*/
|
|
17
40
|
get(asmName) {
|
|
18
|
-
return self.
|
|
41
|
+
return self.assemblyNameMap[asmName];
|
|
19
42
|
},
|
|
43
|
+
/**
|
|
44
|
+
* #getter
|
|
45
|
+
*/
|
|
20
46
|
get assemblyNamesList() {
|
|
21
47
|
return this.assemblyList.map(asm => asm.name);
|
|
22
48
|
},
|
|
49
|
+
/**
|
|
50
|
+
* #getter
|
|
51
|
+
* looks at jbrowse.assemblies, session.sessionAssemblies, and
|
|
52
|
+
* session.temporaryAssemblies to load from
|
|
53
|
+
*/
|
|
23
54
|
get assemblyList() {
|
|
24
55
|
// name is the explicit identifier and can be accessed without getConf,
|
|
25
56
|
// hence the union with {name:string}
|
|
@@ -38,8 +69,11 @@ function assemblyManagerFactory(conf, pm) {
|
|
|
38
69
|
},
|
|
39
70
|
}))
|
|
40
71
|
.views(self => ({
|
|
41
|
-
|
|
42
|
-
|
|
72
|
+
/**
|
|
73
|
+
* #method
|
|
74
|
+
* use this method instead of assemblyManager.get(assemblyName)
|
|
75
|
+
* to get an assembly with regions loaded
|
|
76
|
+
*/
|
|
43
77
|
async waitForAssembly(assemblyName) {
|
|
44
78
|
if (!assemblyName) {
|
|
45
79
|
throw new Error('no assembly name supplied to waitForAssembly');
|
|
@@ -65,6 +99,9 @@ function assemblyManagerFactory(conf, pm) {
|
|
|
65
99
|
}
|
|
66
100
|
return assembly;
|
|
67
101
|
},
|
|
102
|
+
/**
|
|
103
|
+
* #method
|
|
104
|
+
*/
|
|
68
105
|
async getRefNameMapForAdapter(adapterConf, assemblyName, opts) {
|
|
69
106
|
if (assemblyName) {
|
|
70
107
|
const asm = await this.waitForAssembly(assemblyName);
|
|
@@ -72,6 +109,9 @@ function assemblyManagerFactory(conf, pm) {
|
|
|
72
109
|
}
|
|
73
110
|
return {};
|
|
74
111
|
},
|
|
112
|
+
/**
|
|
113
|
+
* #method
|
|
114
|
+
*/
|
|
75
115
|
async getReverseRefNameMapForAdapter(adapterConf, assemblyName, opts) {
|
|
76
116
|
if (assemblyName) {
|
|
77
117
|
const asm = await this.waitForAssembly(assemblyName);
|
|
@@ -79,6 +119,9 @@ function assemblyManagerFactory(conf, pm) {
|
|
|
79
119
|
}
|
|
80
120
|
return {};
|
|
81
121
|
},
|
|
122
|
+
/**
|
|
123
|
+
* #method
|
|
124
|
+
*/
|
|
82
125
|
isValidRefName(refName, assemblyName) {
|
|
83
126
|
const assembly = self.get(assemblyName);
|
|
84
127
|
if (assembly) {
|
|
@@ -89,31 +132,47 @@ function assemblyManagerFactory(conf, pm) {
|
|
|
89
132
|
}))
|
|
90
133
|
.actions(self => ({
|
|
91
134
|
afterAttach() {
|
|
92
|
-
(0, mobx_state_tree_1.addDisposer)(self, (0, mobx_1.reaction)(
|
|
93
|
-
// have to slice it to be properly reacted to
|
|
94
|
-
() => self.assemblyList, assemblyConfigs => {
|
|
135
|
+
(0, mobx_state_tree_1.addDisposer)(self, (0, mobx_1.reaction)(() => self.assemblyList, assemblyConfs => {
|
|
95
136
|
self.assemblies.forEach(asm => {
|
|
96
137
|
if (!asm.configuration) {
|
|
97
138
|
this.removeAssembly(asm);
|
|
98
139
|
}
|
|
99
140
|
});
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
this.addAssembly(assemblyConfig);
|
|
141
|
+
assemblyConfs.forEach(conf => {
|
|
142
|
+
if (!self.assemblies.some(a => a.name === (0, configuration_1.readConfObject)(conf, 'name'))) {
|
|
143
|
+
this.addAssembly(conf);
|
|
104
144
|
}
|
|
105
145
|
});
|
|
106
146
|
}, { fireImmediately: true, name: 'assemblyManagerAfterAttach' }));
|
|
107
147
|
},
|
|
148
|
+
/**
|
|
149
|
+
* #action
|
|
150
|
+
* private: you would generally want to add to manipulate
|
|
151
|
+
* jbrowse.assemblies, session.sessionAssemblies, or
|
|
152
|
+
* session.temporaryAssemblies instead of using this directly
|
|
153
|
+
*/
|
|
108
154
|
removeAssembly(asm) {
|
|
109
155
|
self.assemblies.remove(asm);
|
|
110
156
|
},
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
157
|
+
/**
|
|
158
|
+
* #action
|
|
159
|
+
* private: you would generally want to add to manipulate
|
|
160
|
+
* jbrowse.assemblies, session.sessionAssemblies, or
|
|
161
|
+
* session.temporaryAssemblies instead of using this directly
|
|
162
|
+
*
|
|
163
|
+
* this can take an active instance of an assembly, in which case it is
|
|
164
|
+
* referred to, or it can take an identifier e.g. assembly name, which is
|
|
165
|
+
* used as a reference. snapshots cannot be used
|
|
166
|
+
*/
|
|
114
167
|
addAssembly(configuration) {
|
|
115
168
|
self.assemblies.push({ configuration });
|
|
116
169
|
},
|
|
170
|
+
/**
|
|
171
|
+
* #action
|
|
172
|
+
* private: you would generally want to add to manipulate
|
|
173
|
+
* jbrowse.assemblies, session.sessionAssemblies, or
|
|
174
|
+
* session.temporaryAssemblies instead of using this directly
|
|
175
|
+
*/
|
|
117
176
|
replaceAssembly(idx, configuration) {
|
|
118
177
|
self.assemblies[idx] = (0, mobx_state_tree_1.cast)({ configuration });
|
|
119
178
|
},
|