@jbrowse/core 2.17.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.d.ts +1 -2
- package/BaseFeatureWidget/BaseFeatureDetail/ArrayValue.js +7 -13
- package/BaseFeatureWidget/BaseFeatureDetail/Attributes.d.ts +1 -2
- package/BaseFeatureWidget/BaseFeatureDetail/Attributes.js +20 -25
- package/BaseFeatureWidget/BaseFeatureDetail/BaseCard.d.ts +2 -3
- package/BaseFeatureWidget/BaseFeatureDetail/BaseCard.js +3 -7
- package/BaseFeatureWidget/BaseFeatureDetail/BasicValue.d.ts +1 -2
- package/BaseFeatureWidget/BaseFeatureDetail/BasicValue.js +5 -8
- package/BaseFeatureWidget/BaseFeatureDetail/CoreDetails.d.ts +2 -3
- package/BaseFeatureWidget/BaseFeatureDetail/CoreDetails.js +7 -10
- package/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.d.ts +1 -2
- package/BaseFeatureWidget/BaseFeatureDetail/DataGridDetails.js +25 -55
- package/BaseFeatureWidget/BaseFeatureDetail/FeatureDetails.d.ts +3 -4
- package/BaseFeatureWidget/BaseFeatureDetail/FeatureDetails.js +16 -34
- package/BaseFeatureWidget/BaseFeatureDetail/FieldName.d.ts +1 -2
- package/BaseFeatureWidget/BaseFeatureDetail/FieldName.js +2 -6
- package/BaseFeatureWidget/BaseFeatureDetail/Position.d.ts +2 -3
- package/BaseFeatureWidget/BaseFeatureDetail/Position.js +2 -5
- package/BaseFeatureWidget/BaseFeatureDetail/SimpleField.d.ts +1 -2
- package/BaseFeatureWidget/BaseFeatureDetail/SimpleField.js +3 -5
- package/BaseFeatureWidget/BaseFeatureDetail/UriField.d.ts +1 -2
- package/BaseFeatureWidget/BaseFeatureDetail/UriField.js +3 -5
- package/BaseFeatureWidget/BaseFeatureDetail/index.d.ts +4 -5
- package/BaseFeatureWidget/BaseFeatureDetail/index.js +6 -14
- package/BaseFeatureWidget/BaseFeatureDetail/util.js +4 -13
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceContents.d.ts +10 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceContents.js +48 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.d.ts +3 -4
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.js +33 -41
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeaturePanel.d.ts +3 -4
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeaturePanel.js +30 -29
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceName.d.ts +8 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceName.js +28 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/SequencePanel.d.ts +2 -10
- package/BaseFeatureWidget/SequenceFeatureDetails/SequencePanel.js +11 -85
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/HelpDialog.d.ts +1 -2
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/HelpDialog.js +6 -25
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceDialog.d.ts +3 -4
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceDialog.js +11 -46
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceFeatureMenu.d.ts +3 -4
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceFeatureMenu.js +101 -96
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceTypeSelector.d.ts +2 -3
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SequenceTypeSelector.js +49 -53
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SettingsDialog.d.ts +2 -3
- package/BaseFeatureWidget/SequenceFeatureDetails/dialogs/SettingsDialog.js +20 -55
- package/BaseFeatureWidget/SequenceFeatureDetails/hooks.d.ts +2 -2
- package/BaseFeatureWidget/SequenceFeatureDetails/hooks.js +1 -2
- package/BaseFeatureWidget/SequenceFeatureDetails/model.d.ts +2 -56
- package/BaseFeatureWidget/SequenceFeatureDetails/model.js +4 -66
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/CDNASequence.d.ts +4 -5
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/CDNASequence.js +6 -9
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/CDSSequence.d.ts +3 -4
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/CDSSequence.js +6 -7
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/GenomicSequence.d.ts +3 -4
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/GenomicSequence.js +5 -9
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/ProteinSequence.d.ts +3 -4
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/ProteinSequence.js +2 -4
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/SequenceDisplay.d.ts +2 -3
- package/BaseFeatureWidget/SequenceFeatureDetails/seqtypes/SequenceDisplay.js +3 -10
- package/BaseFeatureWidget/SequenceFeatureDetails/types.d.ts +8 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/types.js +2 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/util.js +1 -5
- package/BaseFeatureWidget/stateModelFactory.d.ts +2 -93
- package/BaseFeatureWidget/stateModelFactory.js +3 -73
- package/BaseFeatureWidget/types.d.ts +3 -3
- package/BaseFeatureWidget/util.js +0 -4
- package/CorePlugin.d.ts +1 -1
- package/CorePlugin.js +19 -12
- package/Plugin.d.ts +2 -5
- package/Plugin.js +0 -3
- package/PluginLoader.d.ts +1 -1
- package/PluginLoader.js +2 -19
- package/PluginManager.d.ts +17 -32
- package/PluginManager.js +15 -41
- package/ReExports/DataGrid.js +0 -1
- package/ReExports/list.d.ts +0 -5
- package/ReExports/list.js +3 -5
- package/ReExports/modules.d.ts +26 -22
- package/ReExports/modules.js +45 -44
- package/TextSearch/BaseResults.d.ts +4 -4
- package/TextSearch/TextSearchManager.d.ts +4 -16
- package/TextSearch/TextSearchManager.js +1 -13
- package/assemblyManager/assembly.d.ts +5 -100
- package/assemblyManager/assembly.js +30 -146
- package/assemblyManager/assemblyConfigSchema.d.ts +1 -34
- package/assemblyManager/assemblyConfigSchema.js +12 -46
- package/assemblyManager/assemblyManager.d.ts +7 -57
- package/assemblyManager/assemblyManager.js +2 -57
- package/configuration/configurationSchema.d.ts +4 -4
- package/configuration/configurationSchema.js +2 -14
- package/configuration/configurationSlot.d.ts +2 -13
- package/configuration/configurationSlot.js +2 -32
- package/configuration/index.d.ts +2 -2
- package/configuration/index.js +2 -2
- package/configuration/types.d.ts +2 -3
- package/configuration/util.d.ts +1 -25
- package/configuration/util.js +19 -56
- package/data_adapters/BaseAdapter/BaseAdapter.d.ts +4 -14
- package/data_adapters/BaseAdapter/BaseAdapter.js +1 -10
- package/data_adapters/BaseAdapter/BaseFeatureDataAdapter.d.ts +5 -114
- package/data_adapters/BaseAdapter/BaseFeatureDataAdapter.js +3 -79
- package/data_adapters/BaseAdapter/BaseOptions.d.ts +2 -2
- package/data_adapters/BaseAdapter/BaseRefNameAliasAdapter.d.ts +2 -2
- package/data_adapters/BaseAdapter/BaseSequenceAdapter.d.ts +3 -6
- package/data_adapters/BaseAdapter/BaseTextSearchAdapter.d.ts +3 -3
- package/data_adapters/BaseAdapter/RegionsAdapter.d.ts +3 -3
- package/data_adapters/BaseAdapter/index.d.ts +4 -4
- package/data_adapters/BaseAdapter/types.d.ts +2 -2
- package/data_adapters/BaseAdapter/util.d.ts +6 -6
- package/data_adapters/CytobandAdapter/CytobandAdapter.d.ts +1 -1
- package/data_adapters/CytobandAdapter/CytobandAdapter.js +2 -6
- package/data_adapters/CytobandAdapter/configSchema.d.ts +0 -3
- package/data_adapters/CytobandAdapter/configSchema.js +1 -7
- package/data_adapters/CytobandAdapter/index.d.ts +1 -1
- package/data_adapters/CytobandAdapter/index.js +21 -8
- package/data_adapters/dataAdapterCache.d.ts +4 -22
- package/data_adapters/dataAdapterCache.js +2 -28
- package/data_adapters/util.d.ts +1 -0
- package/data_adapters/util.js +10 -0
- package/package.json +8 -11
- package/pluggableElementTypes/AdapterType.d.ts +2 -2
- package/pluggableElementTypes/AddTrackWorkflowType.d.ts +2 -2
- package/pluggableElementTypes/ConnectionType.d.ts +3 -3
- package/pluggableElementTypes/DisplayType.d.ts +3 -9
- package/pluggableElementTypes/InternetAccountType.d.ts +2 -2
- package/pluggableElementTypes/PluggableElementBase.d.ts +1 -1
- package/pluggableElementTypes/PluggableElementBase.js +2 -2
- package/pluggableElementTypes/RpcMethodType.d.ts +5 -11
- package/pluggableElementTypes/RpcMethodType.js +7 -19
- package/pluggableElementTypes/RpcMethodTypeWithFiltersAndRenameRegions.d.ts +9 -0
- package/pluggableElementTypes/RpcMethodTypeWithFiltersAndRenameRegions.js +35 -0
- package/pluggableElementTypes/TextSearchAdapterType.d.ts +2 -2
- package/pluggableElementTypes/TrackType.d.ts +3 -3
- package/pluggableElementTypes/ViewType.d.ts +3 -3
- package/pluggableElementTypes/WidgetType.d.ts +4 -3
- package/pluggableElementTypes/index.d.ts +11 -11
- package/pluggableElementTypes/models/BaseConnectionModelFactory.d.ts +2 -29
- package/pluggableElementTypes/models/BaseConnectionModelFactory.js +1 -28
- package/pluggableElementTypes/models/BaseDisplayModel.d.ts +3 -83
- package/pluggableElementTypes/models/BaseDisplayModel.js +2 -69
- package/pluggableElementTypes/models/BaseTrackModel.d.ts +4 -46
- package/pluggableElementTypes/models/BaseTrackModel.js +9 -63
- package/pluggableElementTypes/models/BaseViewModel.d.ts +2 -42
- package/pluggableElementTypes/models/BaseViewModel.js +2 -38
- package/pluggableElementTypes/models/InternetAccountModel.d.ts +3 -119
- package/pluggableElementTypes/models/InternetAccountModel.js +3 -123
- package/pluggableElementTypes/models/baseConnectionConfig.d.ts +0 -6
- package/pluggableElementTypes/models/baseConnectionConfig.js +1 -13
- package/pluggableElementTypes/models/baseInternetAccountConfig.d.ts +0 -15
- package/pluggableElementTypes/models/baseInternetAccountConfig.js +1 -23
- package/pluggableElementTypes/models/baseTrackConfig.d.ts +2 -53
- package/pluggableElementTypes/models/baseTrackConfig.js +1 -58
- package/pluggableElementTypes/renderers/BoxRendererType.d.ts +7 -15
- package/pluggableElementTypes/renderers/BoxRendererType.js +3 -14
- package/pluggableElementTypes/renderers/CircularChordRendererType.d.ts +4 -4
- package/pluggableElementTypes/renderers/CircularChordRendererType.js +3 -8
- package/pluggableElementTypes/renderers/ComparativeServerSideRendererType.d.ts +6 -21
- package/pluggableElementTypes/renderers/ComparativeServerSideRendererType.js +2 -25
- package/pluggableElementTypes/renderers/FeatureRendererType.d.ts +5 -47
- package/pluggableElementTypes/renderers/FeatureRendererType.js +15 -68
- package/pluggableElementTypes/renderers/RendererType.d.ts +5 -9
- package/pluggableElementTypes/renderers/RendererType.js +3 -7
- package/pluggableElementTypes/renderers/RpcRenderedSvgGroup.d.ts +3 -4
- package/pluggableElementTypes/renderers/RpcRenderedSvgGroup.js +11 -76
- package/pluggableElementTypes/renderers/ServerSideRenderedContent.d.ts +2 -3
- package/pluggableElementTypes/renderers/ServerSideRenderedContent.js +10 -74
- package/pluggableElementTypes/renderers/ServerSideRendererType.d.ts +9 -49
- package/pluggableElementTypes/renderers/ServerSideRendererType.js +10 -60
- package/pluggableElementTypes/renderers/index.d.ts +1 -1
- package/pluggableElementTypes/renderers/util/serializableFilterChain.js +1 -3
- package/rpc/BaseRpcDriver.d.ts +3 -4
- package/rpc/BaseRpcDriver.js +20 -80
- package/rpc/MainThreadRpcDriver.d.ts +3 -7
- package/rpc/MainThreadRpcDriver.js +0 -5
- package/rpc/RpcManager.d.ts +3 -3
- package/rpc/RpcManager.js +2 -4
- package/rpc/WebWorkerRpcDriver.d.ts +3 -2
- package/rpc/WebWorkerRpcDriver.js +2 -13
- package/rpc/baseRpcConfig.d.ts +0 -3
- package/rpc/baseRpcConfig.js +1 -7
- package/rpc/configSchema.d.ts +0 -6
- package/rpc/configSchema.js +2 -11
- package/rpc/mainThreadRpcConfig.js +1 -7
- package/rpc/methods/CoreFreeResources.d.ts +0 -6
- package/rpc/methods/CoreFreeResources.js +2 -9
- package/rpc/methods/CoreGetFeatureDensityStats.d.ts +4 -5
- package/rpc/methods/CoreGetFeatureDensityStats.js +1 -1
- package/rpc/methods/CoreGetFeatureDetails.d.ts +2 -7
- package/rpc/methods/CoreGetFeatureDetails.js +0 -5
- package/rpc/methods/CoreGetFeatures.d.ts +5 -5
- package/rpc/methods/CoreGetFeatures.js +4 -5
- package/rpc/methods/CoreGetFileInfo.d.ts +1 -2
- package/rpc/methods/CoreGetFileInfo.js +1 -1
- package/rpc/methods/CoreGetMetadata.d.ts +1 -2
- package/rpc/methods/CoreGetMetadata.js +1 -1
- package/rpc/methods/CoreGetRefNames.d.ts +1 -2
- package/rpc/methods/CoreGetRefNames.js +1 -1
- package/rpc/methods/CoreRender.d.ts +2 -6
- package/rpc/methods/CoreRender.js +5 -7
- package/rpc/methods/util.d.ts +3 -3
- package/rpc/methods/util.js +0 -1
- package/rpc/webWorkerRpcConfig.js +1 -7
- package/stories/JBrowseCore.stories.d.ts +1 -1
- package/stories/JBrowseCore.stories.js +3 -3
- package/stories/examples/WithSequencePanel.d.ts +6 -7
- package/stories/examples/WithSequencePanel.js +9 -9
- package/tsconfig.build.tsbuildinfo +1 -1
- package/ui/AppLogo.d.ts +2 -3
- package/ui/AppLogo.js +2 -7
- package/ui/AssemblySelector.d.ts +5 -5
- package/ui/AssemblySelector.js +11 -36
- package/ui/BaseTooltip.d.ts +1 -2
- package/ui/BaseTooltip.js +10 -17
- package/ui/CascadingMenu.d.ts +3 -4
- package/ui/CascadingMenu.js +18 -57
- package/ui/CascadingMenuButton.d.ts +2 -3
- package/ui/CascadingMenuButton.js +18 -42
- package/ui/ColorPicker.d.ts +3 -4
- package/ui/ColorPicker.js +33 -37
- package/ui/Dialog.d.ts +2 -3
- package/ui/Dialog.js +15 -27
- package/ui/DraggableDialog.d.ts +5 -0
- package/ui/DraggableDialog.js +32 -0
- package/ui/DropDownMenu.d.ts +2 -3
- package/ui/DropDownMenu.js +10 -36
- package/ui/EditableTypography.d.ts +2 -3
- package/ui/EditableTypography.js +30 -59
- package/ui/ErrorBoundary.d.ts +3 -2
- package/ui/ErrorBoundary.js +3 -25
- package/ui/ErrorMessage.d.ts +1 -2
- package/ui/ErrorMessage.js +27 -34
- package/ui/ErrorMessageStackTraceDialog.d.ts +1 -2
- package/ui/ErrorMessageStackTraceDialog.js +13 -54
- package/ui/FactoryResetDialog.d.ts +1 -2
- package/ui/FactoryResetDialog.js +8 -13
- package/ui/FatalErrorDialog.d.ts +1 -2
- package/ui/FatalErrorDialog.js +11 -42
- package/ui/FileSelector/FileSelector.d.ts +5 -5
- package/ui/FileSelector/FileSelector.js +41 -80
- package/ui/FileSelector/LocalFileChooser.d.ts +2 -3
- package/ui/FileSelector/LocalFileChooser.js +17 -29
- package/ui/FileSelector/UrlChooser.d.ts +5 -5
- package/ui/FileSelector/UrlChooser.js +6 -7
- package/ui/Icons.d.ts +10 -11
- package/ui/Icons.js +10 -25
- package/ui/LoadingEllipses.d.ts +2 -3
- package/ui/LoadingEllipses.js +4 -7
- package/ui/Logo.d.ts +2 -3
- package/ui/Logo.js +5 -23
- package/ui/Menu.d.ts +3 -4
- package/ui/Menu.js +85 -122
- package/ui/MenuButton.d.ts +2 -3
- package/ui/MenuButton.js +11 -35
- package/ui/PrerenderedCanvas.d.ts +1 -2
- package/ui/PrerenderedCanvas.js +3 -25
- package/ui/RedErrorMessageBox.d.ts +1 -2
- package/ui/RedErrorMessageBox.js +2 -5
- package/ui/ResizeHandle.d.ts +1 -2
- package/ui/ResizeHandle.js +5 -27
- package/ui/ReturnToImportFormDialog.d.ts +1 -2
- package/ui/ReturnToImportFormDialog.js +8 -13
- package/ui/SanitizedHTML.d.ts +2 -3
- package/ui/SanitizedHTML.js +4 -24
- package/ui/Snackbar.d.ts +3 -4
- package/ui/Snackbar.js +41 -21
- package/ui/SnackbarContents.d.ts +5 -0
- package/ui/SnackbarContents.js +16 -0
- package/ui/SnackbarModel.d.ts +1 -26
- package/ui/SnackbarModel.js +22 -39
- package/ui/colors.d.ts +1 -1
- package/ui/colors.js +2 -2
- package/ui/index.d.ts +0 -2
- package/ui/index.js +1 -5
- package/ui/react-colorful.js +17 -10
- package/ui/theme.d.ts +1 -1
- package/ui/theme.js +7 -40
- package/util/Base1DUtils.d.ts +1 -1
- package/util/Base1DUtils.js +0 -12
- package/util/Base1DViewModel.d.ts +4 -81
- package/util/Base1DViewModel.js +4 -108
- package/util/QuickLRU.js +0 -9
- package/util/TimeTraveller.js +0 -4
- package/util/aborting.d.ts +0 -20
- package/util/aborting.js +0 -31
- package/util/analytics.js +1 -12
- package/util/blockTypes.d.ts +0 -11
- package/util/blockTypes.js +0 -13
- package/util/calculateDynamicBlocks.d.ts +1 -20
- package/util/calculateDynamicBlocks.js +1 -22
- package/util/calculateStaticBlocks.d.ts +2 -2
- package/util/calculateStaticBlocks.js +0 -2
- package/util/color/cssColorsLevel4.js +0 -1
- package/util/color/index.d.ts +0 -19
- package/util/color/index.js +0 -30
- package/util/compositeMap.js +0 -2
- package/util/dedupe.js +0 -1
- package/util/formatFastaStrings.d.ts +0 -13
- package/util/formatFastaStrings.js +0 -13
- package/util/idMaker.d.ts +1 -1
- package/util/idMaker.js +16 -12
- package/util/index.d.ts +27 -173
- package/util/index.js +53 -293
- package/util/io/RemoteFileWithRangeCache.d.ts +4 -5
- package/util/io/RemoteFileWithRangeCache.js +12 -14
- package/util/io/index.d.ts +3 -4
- package/util/io/index.js +5 -19
- package/util/jexl.js +3 -13
- package/util/jexlStrings.d.ts +0 -6
- package/util/jexlStrings.js +0 -8
- package/util/layouts/BaseLayout.d.ts +1 -1
- package/util/layouts/GranularRectLayout.d.ts +1 -17
- package/util/layouts/GranularRectLayout.js +4 -81
- package/util/layouts/MultiLayout.d.ts +1 -6
- package/util/layouts/MultiLayout.js +0 -6
- package/util/layouts/PrecomputedLayout.d.ts +1 -4
- package/util/layouts/PrecomputedLayout.js +0 -5
- package/util/layouts/PrecomputedMultiLayout.js +0 -2
- package/util/layouts/SceneGraph.d.ts +0 -12
- package/util/layouts/SceneGraph.js +0 -13
- package/util/makeAbortableReaction.d.ts +2 -0
- package/util/makeAbortableReaction.js +50 -0
- package/util/map-obj.js +0 -4
- package/util/mst-reflection.d.ts +1 -14
- package/util/mst-reflection.js +1 -28
- package/util/nanoid.d.ts +1 -1
- package/util/nanoid.js +0 -31
- package/util/nextTick.d.ts +1 -0
- package/util/nextTick.js +6 -0
- package/util/offscreenCanvasPonyfill.d.ts +0 -1
- package/util/offscreenCanvasPonyfill.js +1 -9
- package/util/offscreenCanvasUtils.d.ts +2 -3
- package/util/offscreenCanvasUtils.js +22 -21
- package/util/range.d.ts +0 -25
- package/util/range.js +0 -34
- package/util/rxjs.d.ts +3 -7
- package/util/rxjs.js +2 -9
- package/util/simpleFeature.d.ts +0 -50
- package/util/simpleFeature.js +0 -35
- package/util/stats.d.ts +3 -26
- package/util/stats.js +0 -25
- package/util/stopToken.d.ts +3 -0
- package/util/stopToken.js +29 -0
- package/util/tracks.d.ts +4 -26
- package/util/tracks.js +8 -33
- package/util/types/index.d.ts +14 -30
- package/util/types/index.js +5 -14
- package/util/types/mst.js +0 -9
- package/util/types/util.d.ts +2 -9
- package/util/useMeasure.d.ts +1 -1
- package/util/useMeasure.js +0 -1
- package/util/when.d.ts +1 -15
- package/util/when.js +3 -70
- package/rpc/remoteAbortSignals.d.ts +0 -36
- package/rpc/remoteAbortSignals.js +0 -79
|
@@ -4,19 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.default = assemblyFactory;
|
|
7
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
8
7
|
const abortable_promise_cache_1 = __importDefault(require("@gmod/abortable-promise-cache"));
|
|
9
|
-
|
|
8
|
+
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
10
9
|
const configuration_1 = require("../configuration");
|
|
11
|
-
const util_1 = require("../util");
|
|
10
|
+
const util_1 = require("../data_adapters/util");
|
|
11
|
+
const util_2 = require("../util");
|
|
12
12
|
const QuickLRU_1 = __importDefault(require("../util/QuickLRU"));
|
|
13
|
-
const dataAdapterCache_1 = require("../data_adapters/dataAdapterCache");
|
|
14
|
-
/* biome-ignore lint/complexity/useRegexLiterals: */
|
|
15
13
|
const refNameRegex = new RegExp('[0-9A-Za-z!#$%&+./:;?@^_|~-][0-9A-Za-z!#$%&*+./:;=?@^_|~-]*');
|
|
16
|
-
// Based on the UCSC Genome Browser chromosome color palette:
|
|
17
|
-
// https://github.com/ucscGenomeBrowser/kent/blob/a50ed53aff81d6fb3e34e6913ce18578292bc24e/src/hg/inc/chromColors.h
|
|
18
|
-
// Some colors darkened to have at least a 3:1 contrast ratio on a white
|
|
19
|
-
// background
|
|
20
14
|
const refNameColors = [
|
|
21
15
|
'rgb(153, 102, 0)',
|
|
22
16
|
'rgb(102, 102, 0)',
|
|
@@ -24,36 +18,35 @@ const refNameColors = [
|
|
|
24
18
|
'rgb(204, 0, 0)',
|
|
25
19
|
'rgb(255, 0, 0)',
|
|
26
20
|
'rgb(255, 0, 204)',
|
|
27
|
-
'rgb(165, 132, 132)',
|
|
28
|
-
'rgb(204, 122, 0)',
|
|
29
|
-
'rgb(178, 142, 0)',
|
|
30
|
-
'rgb(153, 153, 0)',
|
|
31
|
-
'rgb(122, 153, 0)',
|
|
32
|
-
'rgb(0, 165, 0)',
|
|
21
|
+
'rgb(165, 132, 132)',
|
|
22
|
+
'rgb(204, 122, 0)',
|
|
23
|
+
'rgb(178, 142, 0)',
|
|
24
|
+
'rgb(153, 153, 0)',
|
|
25
|
+
'rgb(122, 153, 0)',
|
|
26
|
+
'rgb(0, 165, 0)',
|
|
33
27
|
'rgb(53, 128, 0)',
|
|
34
28
|
'rgb(0, 0, 204)',
|
|
35
|
-
'rgb(96, 145, 242)',
|
|
36
|
-
'rgb(107, 142, 178)',
|
|
37
|
-
'rgb(0, 165, 165)',
|
|
38
|
-
'rgb(122, 153, 153)',
|
|
29
|
+
'rgb(96, 145, 242)',
|
|
30
|
+
'rgb(107, 142, 178)',
|
|
31
|
+
'rgb(0, 165, 165)',
|
|
32
|
+
'rgb(122, 153, 153)',
|
|
39
33
|
'rgb(153, 0, 204)',
|
|
40
34
|
'rgb(204, 51, 255)',
|
|
41
|
-
'rgb(173, 130, 216)',
|
|
35
|
+
'rgb(173, 130, 216)',
|
|
42
36
|
'rgb(102, 102, 102)',
|
|
43
|
-
'rgb(145, 145, 145)',
|
|
44
|
-
'rgb(142, 142, 142)',
|
|
45
|
-
'rgb(142, 142, 107)',
|
|
46
|
-
'rgb(96, 163, 48)',
|
|
37
|
+
'rgb(145, 145, 145)',
|
|
38
|
+
'rgb(142, 142, 142)',
|
|
39
|
+
'rgb(142, 142, 107)',
|
|
40
|
+
'rgb(96, 163, 48)',
|
|
47
41
|
];
|
|
48
|
-
async function loadRefNameMap(assembly, adapterConfig, options,
|
|
42
|
+
async function loadRefNameMap(assembly, adapterConfig, options, stopToken) {
|
|
49
43
|
const { sessionId } = options;
|
|
50
|
-
await (0,
|
|
51
|
-
signal,
|
|
44
|
+
await (0, util_2.when)(() => !!(assembly.regions && assembly.refNameAliases), {
|
|
52
45
|
name: 'when assembly ready',
|
|
53
46
|
});
|
|
54
47
|
const refNames = (await assembly.rpcManager.call(sessionId || 'assemblyRpc', 'CoreGetRefNames', {
|
|
55
48
|
adapterConfig,
|
|
56
|
-
|
|
49
|
+
stopToken,
|
|
57
50
|
...options,
|
|
58
51
|
}, { timeout: 1000000 }));
|
|
59
52
|
const { refNameAliases } = assembly;
|
|
@@ -72,29 +65,21 @@ async function loadRefNameMap(assembly, adapterConfig, options, signal) {
|
|
|
72
65
|
])),
|
|
73
66
|
};
|
|
74
67
|
}
|
|
75
|
-
// Valid refName pattern from https://samtools.github.io/hts-specs/SAMv1.pdf
|
|
76
68
|
function checkRefName(refName) {
|
|
77
69
|
if (!refNameRegex.test(refName)) {
|
|
78
70
|
throw new Error(`Encountered invalid refName: "${refName}"`);
|
|
79
71
|
}
|
|
80
72
|
}
|
|
81
|
-
/**
|
|
82
|
-
* #stateModel Assembly
|
|
83
|
-
*/
|
|
84
73
|
function assemblyFactory(assemblyConfigType, pluginManager) {
|
|
85
74
|
const adapterLoads = new abortable_promise_cache_1.default({
|
|
86
75
|
cache: new QuickLRU_1.default({ maxSize: 1000 }),
|
|
87
|
-
|
|
88
|
-
async fill(args, signal, statusCallback) {
|
|
76
|
+
async fill(args, _stopToken, statusCallback) {
|
|
89
77
|
const { adapterConf, self, options } = args;
|
|
90
|
-
return loadRefNameMap(self, adapterConf, { ...options, statusCallback }
|
|
78
|
+
return loadRefNameMap(self, adapterConf, { ...options, statusCallback });
|
|
91
79
|
},
|
|
92
80
|
});
|
|
93
81
|
return mobx_state_tree_1.types
|
|
94
82
|
.model({
|
|
95
|
-
/**
|
|
96
|
-
* #property
|
|
97
|
-
*/
|
|
98
83
|
configuration: mobx_state_tree_1.types.safeReference(assemblyConfigType),
|
|
99
84
|
})
|
|
100
85
|
.volatile(() => ({
|
|
@@ -106,123 +91,70 @@ function assemblyFactory(assemblyConfigType, pluginManager) {
|
|
|
106
91
|
cytobands: undefined,
|
|
107
92
|
}))
|
|
108
93
|
.views(self => ({
|
|
109
|
-
/**
|
|
110
|
-
* #method
|
|
111
|
-
*/
|
|
112
94
|
getConf(arg) {
|
|
113
95
|
return self.configuration ? (0, configuration_1.getConf)(self, arg) : undefined;
|
|
114
96
|
},
|
|
115
97
|
}))
|
|
116
98
|
.views(self => ({
|
|
117
|
-
/**
|
|
118
|
-
* #getter
|
|
119
|
-
*/
|
|
120
99
|
get initialized() {
|
|
121
|
-
// @ts-expect-error
|
|
122
100
|
self.load();
|
|
123
101
|
return !!self.refNameAliases;
|
|
124
102
|
},
|
|
125
|
-
/**
|
|
126
|
-
* #getter
|
|
127
|
-
*/
|
|
128
103
|
get name() {
|
|
129
104
|
return self.getConf('name') || '';
|
|
130
105
|
},
|
|
131
|
-
/**
|
|
132
|
-
* #getter
|
|
133
|
-
*/
|
|
134
106
|
get regions() {
|
|
135
|
-
// @ts-expect-error
|
|
136
107
|
self.load();
|
|
137
108
|
return self.volatileRegions;
|
|
138
109
|
},
|
|
139
|
-
/**
|
|
140
|
-
* #getter
|
|
141
|
-
*/
|
|
142
110
|
get aliases() {
|
|
143
111
|
return self.getConf('aliases') || [];
|
|
144
112
|
},
|
|
145
|
-
/**
|
|
146
|
-
* #getter
|
|
147
|
-
*/
|
|
148
113
|
get displayName() {
|
|
149
114
|
return self.getConf('displayName');
|
|
150
115
|
},
|
|
151
|
-
/**
|
|
152
|
-
* #getter
|
|
153
|
-
*/
|
|
154
116
|
hasName(name) {
|
|
155
117
|
return this.allAliases.includes(name);
|
|
156
118
|
},
|
|
157
|
-
/**
|
|
158
|
-
* #getter
|
|
159
|
-
*/
|
|
160
119
|
get allAliases() {
|
|
161
120
|
return [this.name, ...this.aliases];
|
|
162
121
|
},
|
|
163
|
-
/**
|
|
164
|
-
* #getter
|
|
165
|
-
* note: lowerCaseRefNameAliases not included here: this allows the list
|
|
166
|
-
* of refnames to be just the "normal casing", but things like
|
|
167
|
-
* getCanonicalRefName can resolve a lower-case name if needed
|
|
168
|
-
*/
|
|
169
122
|
get allRefNames() {
|
|
170
123
|
return !self.refNameAliases
|
|
171
124
|
? undefined
|
|
172
125
|
: Object.keys(self.refNameAliases);
|
|
173
126
|
},
|
|
174
|
-
/**
|
|
175
|
-
* #getter
|
|
176
|
-
*/
|
|
177
127
|
get lowerCaseRefNames() {
|
|
178
128
|
return !self.lowerCaseRefNameAliases
|
|
179
129
|
? undefined
|
|
180
130
|
: Object.keys(self.lowerCaseRefNameAliases);
|
|
181
131
|
},
|
|
182
|
-
/**
|
|
183
|
-
* #getter
|
|
184
|
-
*/
|
|
185
132
|
get allRefNamesWithLowerCase() {
|
|
186
133
|
return this.allRefNames && this.lowerCaseRefNames
|
|
187
134
|
? [...new Set([...this.allRefNames, ...this.lowerCaseRefNames])]
|
|
188
135
|
: undefined;
|
|
189
136
|
},
|
|
190
|
-
/**
|
|
191
|
-
* #getter
|
|
192
|
-
*/
|
|
193
137
|
get rpcManager() {
|
|
194
138
|
return (0, mobx_state_tree_1.getParent)(self, 2).rpcManager;
|
|
195
139
|
},
|
|
196
|
-
/**
|
|
197
|
-
* #getter
|
|
198
|
-
*/
|
|
199
140
|
get refNameColors() {
|
|
200
141
|
const colors = self.getConf('refNameColors') || [];
|
|
201
142
|
return colors.length === 0 ? refNameColors : colors;
|
|
202
143
|
},
|
|
203
144
|
}))
|
|
204
145
|
.views(self => ({
|
|
205
|
-
/**
|
|
206
|
-
* #getter
|
|
207
|
-
*/
|
|
208
146
|
get refNames() {
|
|
209
147
|
var _a;
|
|
210
148
|
return (_a = self.regions) === null || _a === void 0 ? void 0 : _a.map(region => region.refName);
|
|
211
149
|
},
|
|
212
150
|
}))
|
|
213
151
|
.views(self => ({
|
|
214
|
-
/**
|
|
215
|
-
* #method
|
|
216
|
-
*/
|
|
217
152
|
getCanonicalRefName(refName) {
|
|
218
153
|
if (!self.refNameAliases || !self.lowerCaseRefNameAliases) {
|
|
219
154
|
throw new Error('aliases not loaded, we expect them to be loaded before getCanonicalRefName can be called');
|
|
220
155
|
}
|
|
221
156
|
return (self.refNameAliases[refName] || self.lowerCaseRefNameAliases[refName]);
|
|
222
157
|
},
|
|
223
|
-
/**
|
|
224
|
-
* #method
|
|
225
|
-
*/
|
|
226
158
|
getRefNameColor(refName) {
|
|
227
159
|
if (!self.refNames) {
|
|
228
160
|
return undefined;
|
|
@@ -232,9 +164,6 @@ function assemblyFactory(assemblyConfigType, pluginManager) {
|
|
|
232
164
|
? undefined
|
|
233
165
|
: self.refNameColors[idx % self.refNameColors.length];
|
|
234
166
|
},
|
|
235
|
-
/**
|
|
236
|
-
* #method
|
|
237
|
-
*/
|
|
238
167
|
isValidRefName(refName) {
|
|
239
168
|
if (!self.refNameAliases) {
|
|
240
169
|
throw new Error('isValidRefName cannot be called yet, the assembly has not finished loading');
|
|
@@ -243,48 +172,27 @@ function assemblyFactory(assemblyConfigType, pluginManager) {
|
|
|
243
172
|
},
|
|
244
173
|
}))
|
|
245
174
|
.actions(self => ({
|
|
246
|
-
/**
|
|
247
|
-
* #action
|
|
248
|
-
*/
|
|
249
175
|
setLoaded({ regions, refNameAliases, lowerCaseRefNameAliases, cytobands, }) {
|
|
250
176
|
this.setRegions(regions);
|
|
251
177
|
this.setRefNameAliases(refNameAliases, lowerCaseRefNameAliases);
|
|
252
178
|
this.setCytobands(cytobands);
|
|
253
179
|
},
|
|
254
|
-
/**
|
|
255
|
-
* #action
|
|
256
|
-
*/
|
|
257
180
|
setError(e) {
|
|
258
181
|
self.error = e;
|
|
259
182
|
},
|
|
260
|
-
/**
|
|
261
|
-
* #action
|
|
262
|
-
*/
|
|
263
183
|
setRegions(regions) {
|
|
264
184
|
self.volatileRegions = regions;
|
|
265
185
|
},
|
|
266
|
-
/**
|
|
267
|
-
* #action
|
|
268
|
-
*/
|
|
269
186
|
setRefNameAliases(aliases, lowerCaseAliases) {
|
|
270
187
|
self.refNameAliases = aliases;
|
|
271
188
|
self.lowerCaseRefNameAliases = lowerCaseAliases;
|
|
272
189
|
},
|
|
273
|
-
/**
|
|
274
|
-
* #action
|
|
275
|
-
*/
|
|
276
190
|
setCytobands(cytobands) {
|
|
277
191
|
self.cytobands = cytobands;
|
|
278
192
|
},
|
|
279
|
-
/**
|
|
280
|
-
* #action
|
|
281
|
-
*/
|
|
282
193
|
setLoadingP(p) {
|
|
283
194
|
self.loadingP = p;
|
|
284
195
|
},
|
|
285
|
-
/**
|
|
286
|
-
* #action
|
|
287
|
-
*/
|
|
288
196
|
load() {
|
|
289
197
|
if (!self.loadingP) {
|
|
290
198
|
self.loadingP = this.loadPre().catch((e) => {
|
|
@@ -294,9 +202,6 @@ function assemblyFactory(assemblyConfigType, pluginManager) {
|
|
|
294
202
|
}
|
|
295
203
|
return self.loadingP;
|
|
296
204
|
},
|
|
297
|
-
/**
|
|
298
|
-
* #action
|
|
299
|
-
*/
|
|
300
205
|
async loadPre() {
|
|
301
206
|
var _a, _b;
|
|
302
207
|
var _c;
|
|
@@ -323,17 +228,11 @@ function assemblyFactory(assemblyConfigType, pluginManager) {
|
|
|
323
228
|
checkRefName(alias);
|
|
324
229
|
refNameAliases[alias] = refName;
|
|
325
230
|
}
|
|
326
|
-
// the override field is supplied by a RefNameAliasAdapter to make
|
|
327
|
-
// the refName field returned by the adapter to be used as the
|
|
328
|
-
// primary names for this assembly
|
|
329
231
|
if (override) {
|
|
330
232
|
refNameAliases[refName] = refName;
|
|
331
233
|
}
|
|
332
234
|
}
|
|
333
|
-
// add identity to the refNameAliases list
|
|
334
235
|
for (const region of adapterRegionsWithAssembly) {
|
|
335
|
-
// this ||= means that if the refNameAliasAdapter already set a
|
|
336
|
-
// mapping for the primary region to be an alias
|
|
337
236
|
refNameAliases[_c = region.refName] || (refNameAliases[_c] = region.refName);
|
|
338
237
|
}
|
|
339
238
|
const lowerCaseRefNameAliases = Object.fromEntries(Object.entries(refNameAliases).map(([key, val]) => [
|
|
@@ -355,27 +254,17 @@ function assemblyFactory(assemblyConfigType, pluginManager) {
|
|
|
355
254
|
},
|
|
356
255
|
}))
|
|
357
256
|
.views(self => ({
|
|
358
|
-
/**
|
|
359
|
-
* #method
|
|
360
|
-
*/
|
|
361
257
|
getAdapterMapEntry(adapterConf, options) {
|
|
362
|
-
const {
|
|
258
|
+
const { stopToken, statusCallback, ...rest } = options;
|
|
363
259
|
if (!options.sessionId) {
|
|
364
260
|
throw new Error('sessionId is required');
|
|
365
261
|
}
|
|
366
|
-
return adapterLoads.get((0,
|
|
262
|
+
return adapterLoads.get((0, util_1.adapterConfigCacheKey)(adapterConf), {
|
|
367
263
|
adapterConf,
|
|
368
264
|
self,
|
|
369
265
|
options: rest,
|
|
370
|
-
},
|
|
371
|
-
// signal intentionally not passed here, fixes issues like #2221.
|
|
372
|
-
// alternative fix #2540 was proposed but non-working currently
|
|
373
|
-
undefined, statusCallback);
|
|
266
|
+
}, undefined, statusCallback);
|
|
374
267
|
},
|
|
375
|
-
/**
|
|
376
|
-
* #method
|
|
377
|
-
* get Map of `canonical-name -> adapter-specific-name`
|
|
378
|
-
*/
|
|
379
268
|
async getRefNameMapForAdapter(adapterConf, opts) {
|
|
380
269
|
if (!opts.sessionId) {
|
|
381
270
|
throw new Error('sessionId is required');
|
|
@@ -383,32 +272,27 @@ function assemblyFactory(assemblyConfigType, pluginManager) {
|
|
|
383
272
|
const map = await this.getAdapterMapEntry(adapterConf, opts);
|
|
384
273
|
return map.forwardMap;
|
|
385
274
|
},
|
|
386
|
-
/**
|
|
387
|
-
* #method
|
|
388
|
-
* get Map of `adapter-specific-name -> canonical-name`
|
|
389
|
-
*/
|
|
390
275
|
async getReverseRefNameMapForAdapter(adapterConf, opts) {
|
|
391
276
|
const map = await this.getAdapterMapEntry(adapterConf, opts);
|
|
392
277
|
return map.reverseMap;
|
|
393
278
|
},
|
|
394
279
|
}));
|
|
395
280
|
}
|
|
396
|
-
async function getRefNameAliases({ config, pluginManager,
|
|
281
|
+
async function getRefNameAliases({ config, pluginManager, stopToken, }) {
|
|
397
282
|
const type = pluginManager.getAdapterType(config.type);
|
|
398
283
|
const CLASS = await type.getAdapterClass();
|
|
399
284
|
const adapter = new CLASS(config, undefined, pluginManager);
|
|
400
|
-
return adapter.getRefNameAliases({
|
|
285
|
+
return adapter.getRefNameAliases({ stopToken });
|
|
401
286
|
}
|
|
402
287
|
async function getCytobands({ config, pluginManager, }) {
|
|
403
288
|
const type = pluginManager.getAdapterType(config.type);
|
|
404
289
|
const CLASS = await type.getAdapterClass();
|
|
405
290
|
const adapter = new CLASS(config, undefined, pluginManager);
|
|
406
|
-
// @ts-expect-error
|
|
407
291
|
return adapter.getData();
|
|
408
292
|
}
|
|
409
|
-
async function getAssemblyRegions({ config, pluginManager,
|
|
293
|
+
async function getAssemblyRegions({ config, pluginManager, stopToken, }) {
|
|
410
294
|
const type = pluginManager.getAdapterType(config.type);
|
|
411
295
|
const CLASS = await type.getAdapterClass();
|
|
412
296
|
const adapter = new CLASS(config, undefined, pluginManager);
|
|
413
|
-
return adapter.getRegions({
|
|
297
|
+
return adapter.getRegions({ stopToken });
|
|
414
298
|
}
|
|
@@ -1,55 +1,22 @@
|
|
|
1
|
-
import PluginManager from '../PluginManager';
|
|
2
|
-
/**
|
|
3
|
-
* #config BaseAssembly
|
|
4
|
-
* #category assemblyManagement
|
|
5
|
-
* This corresponds to the assemblies section of the config
|
|
6
|
-
*/
|
|
1
|
+
import type PluginManager from '../PluginManager';
|
|
7
2
|
declare function assemblyConfigSchema(pluginManager: PluginManager): import("../configuration/configurationSchema").ConfigurationSchemaType<{
|
|
8
|
-
/**
|
|
9
|
-
* #slot
|
|
10
|
-
* aliases are "reference name aliases" e.g. aliases for hg38 might be
|
|
11
|
-
* "GRCh38"
|
|
12
|
-
*/
|
|
13
3
|
aliases: {
|
|
14
4
|
type: string;
|
|
15
5
|
defaultValue: never[];
|
|
16
6
|
description: string;
|
|
17
7
|
};
|
|
18
|
-
/**
|
|
19
|
-
* #slot
|
|
20
|
-
* sequence refers to a reference sequence track that has an adapter
|
|
21
|
-
* containing, importantly, a sequence adapter such as
|
|
22
|
-
* IndexedFastaAdapter
|
|
23
|
-
*/
|
|
24
8
|
sequence: import("../configuration").AnyConfigurationSchemaType;
|
|
25
|
-
/**
|
|
26
|
-
* #slot
|
|
27
|
-
*/
|
|
28
9
|
refNameColors: {
|
|
29
10
|
type: string;
|
|
30
11
|
defaultValue: never[];
|
|
31
12
|
description: string;
|
|
32
13
|
};
|
|
33
14
|
refNameAliases: import("../configuration/configurationSchema").ConfigurationSchemaType<{
|
|
34
|
-
/**
|
|
35
|
-
* #slot refNameAliases.adapter
|
|
36
|
-
* refNameAliases help resolve e.g. chr1 and 1 as the same entity the
|
|
37
|
-
* data for refNameAliases are fetched from an adapter, that is
|
|
38
|
-
* commonly a tsv like chromAliases.txt from UCSC or similar
|
|
39
|
-
*/
|
|
40
15
|
adapter: import("mobx-state-tree").IAnyModelType;
|
|
41
16
|
}, import("../configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
42
17
|
cytobands: import("../configuration/configurationSchema").ConfigurationSchemaType<{
|
|
43
|
-
/**
|
|
44
|
-
* #slot cytobands.adapter
|
|
45
|
-
* cytoband data is fetched from an adapter, and can be displayed by
|
|
46
|
-
* a view type as ideograms
|
|
47
|
-
*/
|
|
48
18
|
adapter: import("mobx-state-tree").IAnyModelType;
|
|
49
19
|
}, import("../configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
50
|
-
/**
|
|
51
|
-
* #slot
|
|
52
|
-
*/
|
|
53
20
|
displayName: {
|
|
54
21
|
type: string;
|
|
55
22
|
defaultValue: string;
|
|
@@ -1,86 +1,52 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const configuration_1 = require("../configuration");
|
|
4
|
-
/**
|
|
5
|
-
* #config BaseAssembly
|
|
6
|
-
* #category assemblyManagement
|
|
7
|
-
* This corresponds to the assemblies section of the config
|
|
8
|
-
*/
|
|
9
4
|
function assemblyConfigSchema(pluginManager) {
|
|
10
5
|
return (0, configuration_1.ConfigurationSchema)('BaseAssembly', {
|
|
11
|
-
/**
|
|
12
|
-
* #slot
|
|
13
|
-
* aliases are "reference name aliases" e.g. aliases for hg38 might be
|
|
14
|
-
* "GRCh38"
|
|
15
|
-
*/
|
|
16
6
|
aliases: {
|
|
17
7
|
type: 'stringArray',
|
|
18
8
|
defaultValue: [],
|
|
19
9
|
description: 'Other possible names for the assembly',
|
|
20
10
|
},
|
|
21
|
-
/**
|
|
22
|
-
* #slot
|
|
23
|
-
* sequence refers to a reference sequence track that has an adapter
|
|
24
|
-
* containing, importantly, a sequence adapter such as
|
|
25
|
-
* IndexedFastaAdapter
|
|
26
|
-
*/
|
|
27
11
|
sequence: pluginManager.getTrackType('ReferenceSequenceTrack')
|
|
28
12
|
.configSchema,
|
|
29
|
-
/**
|
|
30
|
-
* #slot
|
|
31
|
-
*/
|
|
32
13
|
refNameColors: {
|
|
33
14
|
type: 'stringArray',
|
|
34
15
|
defaultValue: [],
|
|
35
16
|
description: 'Define custom colors for each reference sequence. Will cycle through this list if there are not enough colors for every sequence.',
|
|
36
17
|
},
|
|
37
18
|
refNameAliases: (0, configuration_1.ConfigurationSchema)('RefNameAliases', {
|
|
38
|
-
/**
|
|
39
|
-
* #slot refNameAliases.adapter
|
|
40
|
-
* refNameAliases help resolve e.g. chr1 and 1 as the same entity the
|
|
41
|
-
* data for refNameAliases are fetched from an adapter, that is
|
|
42
|
-
* commonly a tsv like chromAliases.txt from UCSC or similar
|
|
43
|
-
*/
|
|
44
19
|
adapter: pluginManager.pluggableConfigSchemaType('adapter'),
|
|
45
20
|
}, {
|
|
46
21
|
preProcessSnapshot: snap => {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
22
|
+
return !snap.adapter
|
|
23
|
+
? {
|
|
24
|
+
adapter: {
|
|
25
|
+
type: 'RefNameAliasAdapter',
|
|
26
|
+
},
|
|
27
|
+
}
|
|
28
|
+
: snap;
|
|
52
29
|
},
|
|
53
30
|
}),
|
|
54
31
|
cytobands: (0, configuration_1.ConfigurationSchema)('Cytoband', {
|
|
55
|
-
/**
|
|
56
|
-
* #slot cytobands.adapter
|
|
57
|
-
* cytoband data is fetched from an adapter, and can be displayed by
|
|
58
|
-
* a view type as ideograms
|
|
59
|
-
*/
|
|
60
32
|
adapter: pluginManager.pluggableConfigSchemaType('adapter'),
|
|
61
33
|
}, {
|
|
62
34
|
preProcessSnapshot: snap => {
|
|
63
|
-
// allow cytoBand to be unspecified
|
|
64
35
|
return !snap.adapter
|
|
65
|
-
? {
|
|
36
|
+
? {
|
|
37
|
+
adapter: {
|
|
38
|
+
type: 'CytobandAdapter',
|
|
39
|
+
},
|
|
40
|
+
}
|
|
66
41
|
: snap;
|
|
67
42
|
},
|
|
68
43
|
}),
|
|
69
|
-
/**
|
|
70
|
-
* #slot
|
|
71
|
-
*/
|
|
72
44
|
displayName: {
|
|
73
45
|
type: 'string',
|
|
74
46
|
defaultValue: '',
|
|
75
47
|
description: 'A human readable display name for the assembly e.g. "Homo sapiens (hg38)" while the assembly name may just be "hg38"',
|
|
76
48
|
},
|
|
77
49
|
}, {
|
|
78
|
-
/**
|
|
79
|
-
* #identifier name
|
|
80
|
-
* the name acts as a unique identifier in the config, so it cannot be
|
|
81
|
-
* duplicated. it usually a short human readable "id" like hg38, but you
|
|
82
|
-
* can also optionally customize the assembly "displayName" config slot
|
|
83
|
-
*/
|
|
84
50
|
explicitIdentifier: 'name',
|
|
85
51
|
});
|
|
86
52
|
}
|
|
@@ -1,19 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import type { AnyConfigurationModel } from '../configuration';
|
|
2
|
+
import type { Assembly } from './assembly';
|
|
3
|
+
import type PluginManager from '../PluginManager';
|
|
4
|
+
import type RpcManager from '../rpc/RpcManager';
|
|
5
|
+
import type { IAnyType } from 'mobx-state-tree';
|
|
6
6
|
type AdapterConf = Record<string, unknown>;
|
|
7
|
-
/**
|
|
8
|
-
* #stateModel AssemblyManager
|
|
9
|
-
*/
|
|
10
7
|
declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): import("mobx-state-tree").IModelType<{
|
|
11
|
-
/**
|
|
12
|
-
* #property
|
|
13
|
-
* this is automatically managed by an autorun which looks in the parent
|
|
14
|
-
* session.assemblies, session.sessionAssemblies, and
|
|
15
|
-
* session.temporaryAssemblies
|
|
16
|
-
*/
|
|
17
8
|
assemblies: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
18
9
|
configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<IAnyType>>;
|
|
19
10
|
}, {
|
|
@@ -228,9 +219,6 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
228
219
|
}>;
|
|
229
220
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>>;
|
|
230
221
|
} & {
|
|
231
|
-
/**
|
|
232
|
-
* #method
|
|
233
|
-
*/
|
|
234
222
|
get(asmName: string): ({
|
|
235
223
|
configuration: any;
|
|
236
224
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
@@ -372,23 +360,10 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
372
360
|
[x: string]: string;
|
|
373
361
|
}>;
|
|
374
362
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined;
|
|
375
|
-
/**
|
|
376
|
-
* #getter
|
|
377
|
-
*/
|
|
378
363
|
readonly assemblyNamesList: any[];
|
|
379
|
-
/**
|
|
380
|
-
* #getter
|
|
381
|
-
* looks at jbrowse.assemblies, session.sessionAssemblies, and
|
|
382
|
-
* session.temporaryAssemblies to load from
|
|
383
|
-
*/
|
|
384
364
|
readonly assemblyList: AnyConfigurationModel[];
|
|
385
365
|
readonly rpcManager: RpcManager;
|
|
386
366
|
} & {
|
|
387
|
-
/**
|
|
388
|
-
* #method
|
|
389
|
-
* use this method instead of assemblyManager.get(assemblyName)
|
|
390
|
-
* to get an assembly with regions loaded
|
|
391
|
-
*/
|
|
392
367
|
waitForAssembly(assemblyName: string): Promise<({
|
|
393
368
|
configuration: any;
|
|
394
369
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
@@ -530,47 +505,22 @@ declare function assemblyManagerFactory(conf: IAnyType, pm: PluginManager): impo
|
|
|
530
505
|
[x: string]: string;
|
|
531
506
|
}>;
|
|
532
507
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined>;
|
|
533
|
-
/**
|
|
534
|
-
* #method
|
|
535
|
-
*/
|
|
536
508
|
getRefNameMapForAdapter(adapterConf: AdapterConf, assemblyName: string | undefined, opts: {
|
|
537
|
-
|
|
509
|
+
stopToken?: string;
|
|
538
510
|
sessionId: string;
|
|
539
511
|
}): Promise<{
|
|
540
512
|
[x: string]: string;
|
|
541
513
|
} | undefined>;
|
|
542
|
-
/**
|
|
543
|
-
* #method
|
|
544
|
-
*/
|
|
545
514
|
getReverseRefNameMapForAdapter(adapterConf: AdapterConf, assemblyName: string | undefined, opts: {
|
|
546
|
-
|
|
515
|
+
stopToken?: string;
|
|
547
516
|
sessionId: string;
|
|
548
517
|
}): Promise<{
|
|
549
518
|
[x: string]: string;
|
|
550
519
|
} | undefined>;
|
|
551
|
-
/**
|
|
552
|
-
* #method
|
|
553
|
-
*/
|
|
554
520
|
isValidRefName(refName: string, assemblyName: string): boolean;
|
|
555
521
|
} & {
|
|
556
522
|
afterAttach(): void;
|
|
557
|
-
/**
|
|
558
|
-
* #action
|
|
559
|
-
* private: you would generally want to add to manipulate
|
|
560
|
-
* jbrowse.assemblies, session.sessionAssemblies, or
|
|
561
|
-
* session.temporaryAssemblies instead of using this directly
|
|
562
|
-
*/
|
|
563
523
|
removeAssembly(asm: Assembly): void;
|
|
564
|
-
/**
|
|
565
|
-
* #action
|
|
566
|
-
* private: you would generally want to add to manipulate
|
|
567
|
-
* jbrowse.assemblies, session.sessionAssemblies, or
|
|
568
|
-
* session.temporaryAssemblies instead of using this directly
|
|
569
|
-
*
|
|
570
|
-
* this can take an active instance of an assembly, in which case it is
|
|
571
|
-
* referred to, or it can take an identifier e.g. assembly name, which is
|
|
572
|
-
* used as a reference. snapshots cannot be used
|
|
573
|
-
*/
|
|
574
524
|
addAssembly(configuration: any): void;
|
|
575
525
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
576
526
|
export default assemblyManagerFactory;
|