@jbrowse/core 2.4.1 → 2.5.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 +46 -0
- package/BaseFeatureWidget/BaseFeatureDetail/Attributes.d.ts +15 -0
- package/BaseFeatureWidget/BaseFeatureDetail/Attributes.js +69 -0
- package/BaseFeatureWidget/BaseFeatureDetail/BasicField.d.ts +17 -0
- package/BaseFeatureWidget/BaseFeatureDetail/BasicField.js +23 -0
- package/BaseFeatureWidget/BaseFeatureDetail/BasicValue.d.ts +12 -0
- package/BaseFeatureWidget/BaseFeatureDetail/BasicValue.js +26 -0
- package/BaseFeatureWidget/BaseFeatureDetail/DataGrid.d.ts +14 -0
- package/BaseFeatureWidget/BaseFeatureDetail/DataGrid.js +98 -0
- package/BaseFeatureWidget/BaseFeatureDetail/FieldName.d.ts +16 -0
- package/BaseFeatureWidget/BaseFeatureDetail/FieldName.js +32 -0
- package/BaseFeatureWidget/BaseFeatureDetail/UriField.d.ts +17 -0
- package/BaseFeatureWidget/BaseFeatureDetail/UriField.js +31 -0
- package/BaseFeatureWidget/BaseFeatureDetail/UriLink.d.ts +6 -0
- package/BaseFeatureWidget/BaseFeatureDetail/UriLink.js +13 -0
- package/BaseFeatureWidget/{BaseFeatureDetail.d.ts → BaseFeatureDetail/index.d.ts} +5 -7
- package/BaseFeatureWidget/{BaseFeatureDetail.js → BaseFeatureDetail/index.js} +12 -9
- package/BaseFeatureWidget/BaseFeatureDetail/util.d.ts +4 -0
- package/BaseFeatureWidget/BaseFeatureDetail/util.js +23 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/CDNASequence.d.ts +12 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/CDNASequence.js +25 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/CDSSequence.d.ts +5 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/CDSSequence.js +12 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/GenomicSequence.d.ts +5 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/GenomicSequence.js +14 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/ProteinSequence.d.ts +8 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/ProteinSequence.js +18 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.d.ts +2 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/SequenceFeatureDetails.js +146 -0
- package/BaseFeatureWidget/{SequenceFeatureSettingsDialog.d.ts → SequenceFeatureDetails/SequenceFeatureSettingsDialog.d.ts} +0 -1
- package/BaseFeatureWidget/{SequenceFeatureSettingsDialog.js → SequenceFeatureDetails/SequenceFeatureSettingsDialog.js} +1 -1
- package/BaseFeatureWidget/{SequenceHelpDialog.d.ts → SequenceFeatureDetails/SequenceHelpDialog.d.ts} +0 -1
- 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 +2 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/index.js +68 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/util.d.ts +6 -0
- package/BaseFeatureWidget/SequenceFeatureDetails/util.js +11 -0
- package/BaseFeatureWidget/index.d.ts +5 -2
- package/BaseFeatureWidget/index.js +29 -20
- package/BaseFeatureWidget/types.d.ts +2 -2
- package/Plugin.d.ts +1 -1
- package/PluginLoader.js +17 -0
- package/PluginManager.d.ts +6 -5
- package/PluginManager.js +3 -0
- package/ReExports/list.js +1 -0
- package/ReExports/modules.d.ts +6 -5
- package/ReExports/modules.js +7 -4
- 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 +50 -1
- package/assemblyManager/assemblyManager.d.ts +115 -58
- package/assemblyManager/assemblyManager.js +60 -12
- package/configuration/configurationSchema.d.ts +13 -13
- package/configuration/configurationSchema.js +4 -2
- package/configuration/configurationSlot.d.ts +1 -0
- package/configuration/index.d.ts +1 -1
- package/configuration/types.d.ts +13 -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 -5
- 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/TextSearchAdapterType.d.ts +1 -1
- package/pluggableElementTypes/models/BaseTrackModel.d.ts +1 -1
- package/pluggableElementTypes/models/BaseTrackModel.js +3 -2
- package/pluggableElementTypes/models/InternetAccountModel.d.ts +30 -0
- package/pluggableElementTypes/models/InternetAccountModel.js +6 -1
- package/pluggableElementTypes/models/baseConnectionConfig.d.ts +18 -1
- package/pluggableElementTypes/models/baseInternetAccountConfig.d.ts +42 -1
- package/pluggableElementTypes/models/baseTrackConfig.d.ts +118 -1
- package/pluggableElementTypes/models/baseTrackConfig.js +1 -1
- package/pluggableElementTypes/renderers/CircularChordRendererType.d.ts +0 -1
- package/pluggableElementTypes/renderers/FeatureRendererType.d.ts +1 -1
- package/pluggableElementTypes/renderers/RendererType.d.ts +1 -1
- package/pluggableElementTypes/renderers/RpcRenderedSvgGroup.d.ts +0 -1
- package/pluggableElementTypes/renderers/ServerSideRendererType.d.ts +1 -1
- 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/AboutDialog.d.ts +0 -1
- package/ui/AppLogo.d.ts +0 -1
- package/ui/AssemblySelector.d.ts +0 -1
- package/ui/CascadingMenu.d.ts +0 -1
- package/ui/ColorPicker.d.ts +0 -1
- package/ui/Dialog.d.ts +0 -1
- package/ui/Dialog.js +14 -1
- package/ui/DrawerWidget.d.ts +1 -2
- package/ui/DrawerWidget.js +5 -3
- package/ui/DropDownMenu.d.ts +0 -1
- package/ui/ErrorMessage.d.ts +0 -1
- package/ui/FactoryResetDialog.d.ts +0 -1
- package/ui/FatalErrorDialog.d.ts +0 -1
- package/ui/FileSelector/FileSelector.d.ts +0 -1
- package/ui/FileSelector/LocalFileChooser.d.ts +0 -1
- package/ui/FileSelector/UrlChooser.d.ts +0 -1
- package/ui/Icons.d.ts +0 -1
- package/ui/LoadingEllipses.d.ts +0 -1
- package/ui/Logo.d.ts +0 -1
- package/ui/PrerenderedCanvas.d.ts +0 -1
- package/ui/ResizeBar.js +1 -1
- package/ui/ResizeHandle.d.ts +0 -1
- package/ui/ReturnToImportFormDialog.d.ts +0 -1
- package/ui/SanitizedHTML.d.ts +0 -1
- package/ui/SanitizedHTML.js +6 -0
- package/ui/Snackbar.d.ts +0 -1
- package/ui/Tooltip.d.ts +0 -1
- package/ui/ViewContainer.d.ts +2 -3
- package/ui/ViewContainer.js +7 -39
- package/ui/ViewContainerTitle.d.ts +5 -0
- package/ui/ViewContainerTitle.js +42 -0
- package/ui/ViewLauncher.d.ts +0 -1
- package/ui/ViewMenu.d.ts +1 -2
- package/ui/ViewPanel.d.ts +0 -1
- package/ui/react-colorful.d.ts +1 -1
- package/ui/theme.js +3 -18
- package/util/index.d.ts +9 -4
- package/util/index.js +30 -6
- package/util/io/index.d.ts +3 -1
- package/util/io/index.js +9 -4
- package/util/layouts/PrecomputedMultiLayout.d.ts +1 -1
- package/util/mst-reflection.d.ts +12 -17
- package/util/mst-reflection.js +13 -12
- package/util/stats.d.ts +5 -5
- package/util/types/index.d.ts +4 -1
- package/util/types/mst.d.ts +12 -9
- package/util/useMeasure.d.ts +5 -0
- package/util/useMeasure.js +34 -0
- 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 -237
- package/data_adapters/BaseAdapter.d.ts +0 -138
- /package/BaseFeatureWidget/{test_data → SequenceFeatureDetails/test_data}/DLGAP3.d.ts +0 -0
- /package/BaseFeatureWidget/{test_data → SequenceFeatureDetails/test_data}/DLGAP3.js +0 -0
- /package/BaseFeatureWidget/{test_data → SequenceFeatureDetails/test_data}/NCDN.d.ts +0 -0
- /package/BaseFeatureWidget/{test_data → SequenceFeatureDetails/test_data}/NCDN.js +0 -0
package/configuration/util.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyConfigurationModel, AnyConfigurationSchemaType } from './
|
|
1
|
+
import { AnyConfigurationModel, AnyConfigurationSchemaType, ConfigurationSlotName, ConfigurationSchemaForModel } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* given a configuration model (an instance of a ConfigurationSchema),
|
|
4
4
|
* read the configuration variable at the given path
|
|
@@ -8,7 +8,7 @@ import { AnyConfigurationModel, AnyConfigurationSchemaType } from './configurati
|
|
|
8
8
|
* @param args - extra arguments e.g. for a feature callback,
|
|
9
9
|
* will be sent to each of the slotNames
|
|
10
10
|
*/
|
|
11
|
-
export declare function readConfObject(confObject:
|
|
11
|
+
export declare function readConfObject<CONFMODEL extends AnyConfigurationModel>(confObject: CONFMODEL, slotPath?: ConfigurationSlotName<ConfigurationSchemaForModel<CONFMODEL>> | string[], args?: Record<string, unknown>): any;
|
|
12
12
|
/**
|
|
13
13
|
* helper method for readConfObject, reads the config from a mst model
|
|
14
14
|
*
|
|
@@ -17,7 +17,9 @@ export declare function readConfObject(confObject: AnyConfigurationModel, slotPa
|
|
|
17
17
|
* @param args - extra arguments e.g. for a feature callback,
|
|
18
18
|
* will be sent to each of the slotNames
|
|
19
19
|
*/
|
|
20
|
-
export declare function getConf
|
|
20
|
+
export declare function getConf<CONFMODEL extends AnyConfigurationModel>(model: {
|
|
21
|
+
configuration: CONFMODEL;
|
|
22
|
+
}, slotPath?: Parameters<typeof readConfObject<CONFMODEL>>[1], args?: Parameters<typeof readConfObject<CONFMODEL>>[2]): any;
|
|
21
23
|
/**
|
|
22
24
|
* given a union of explicitly typed configuration schema types,
|
|
23
25
|
* extract an array of the type names contained in the union
|
package/configuration/util.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isConfigurationSlotType = exports.isConfigurationModel = exports.isConfigurationSchemaType = exports.isBareConfigurationSchemaType = exports.getTypeNamesFromExplicitlyTypedUnion = exports.getConf = exports.readConfObject = void 0;
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
4
5
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
5
6
|
const mst_reflection_1 = require("../util/mst-reflection");
|
|
6
7
|
/**
|
|
@@ -12,9 +13,7 @@ const mst_reflection_1 = require("../util/mst-reflection");
|
|
|
12
13
|
* @param args - extra arguments e.g. for a feature callback,
|
|
13
14
|
* will be sent to each of the slotNames
|
|
14
15
|
*/
|
|
15
|
-
function readConfObject(confObject, slotPath =
|
|
16
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17
|
-
args = {}) {
|
|
16
|
+
function readConfObject(confObject, slotPath, args = {}) {
|
|
18
17
|
if (!confObject) {
|
|
19
18
|
throw new TypeError('must provide conf object to read');
|
|
20
19
|
}
|
|
@@ -32,7 +31,7 @@ args = {}) {
|
|
|
32
31
|
if (!slot) {
|
|
33
32
|
return undefined;
|
|
34
33
|
// if we want to be very strict about config slots, we could uncomment the below
|
|
35
|
-
// instead of returning
|
|
34
|
+
// instead of returning undefined
|
|
36
35
|
//
|
|
37
36
|
// const modelType = getType(model)
|
|
38
37
|
// const schemaType = model.configuration && getType(model.configuration)
|
|
@@ -54,19 +53,22 @@ args = {}) {
|
|
|
54
53
|
}
|
|
55
54
|
return slot;
|
|
56
55
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
56
|
+
if (Array.isArray(slotPath)) {
|
|
57
|
+
const slotName = slotPath[0];
|
|
58
|
+
if (slotPath.length > 1) {
|
|
59
|
+
const newPath = slotPath.slice(1);
|
|
60
|
+
let subConf = confObject[slotName];
|
|
61
|
+
// check for the subconf being a map if we don't find it immediately
|
|
62
|
+
if (!subConf &&
|
|
63
|
+
(0, mobx_state_tree_1.isStateTreeNode)(confObject) &&
|
|
64
|
+
(0, mobx_state_tree_1.isMapType)((0, mobx_state_tree_1.getType)(confObject))) {
|
|
65
|
+
subConf = confObject.get(slotName);
|
|
66
|
+
}
|
|
67
|
+
return subConf ? readConfObject(subConf, newPath, args) : undefined;
|
|
66
68
|
}
|
|
67
|
-
return
|
|
69
|
+
return readConfObject(confObject, slotName, args);
|
|
68
70
|
}
|
|
69
|
-
|
|
71
|
+
throw new TypeError('slotPath must be a string or array');
|
|
70
72
|
}
|
|
71
73
|
exports.readConfObject = readConfObject;
|
|
72
74
|
/**
|
|
@@ -77,9 +79,7 @@ exports.readConfObject = readConfObject;
|
|
|
77
79
|
* @param args - extra arguments e.g. for a feature callback,
|
|
78
80
|
* will be sent to each of the slotNames
|
|
79
81
|
*/
|
|
80
|
-
function getConf(model, slotPath
|
|
81
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
82
|
-
args = {}) {
|
|
82
|
+
function getConf(model, slotPath, args) {
|
|
83
83
|
if (!model) {
|
|
84
84
|
throw new TypeError('must provide a model object');
|
|
85
85
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AnyConfigurationModel } from '../../configuration';
|
|
2
|
+
import { getSubAdapterType } from '../dataAdapterCache';
|
|
3
|
+
import { AugmentedRegion as Region } from '../../util/types';
|
|
4
|
+
import PluginManager from '../../PluginManager';
|
|
5
|
+
export declare abstract class BaseAdapter {
|
|
6
|
+
config: AnyConfigurationModel;
|
|
7
|
+
getSubAdapter?: getSubAdapterType | undefined;
|
|
8
|
+
pluginManager?: PluginManager | undefined;
|
|
9
|
+
id: string;
|
|
10
|
+
static capabilities: string[];
|
|
11
|
+
constructor(config?: AnyConfigurationModel, getSubAdapter?: getSubAdapterType | undefined, pluginManager?: PluginManager | undefined);
|
|
12
|
+
/**
|
|
13
|
+
* Same as `readConfObject(this.config, arg)`.
|
|
14
|
+
* @deprecated Does not offer the same TS type checking as `readConfObject`, consider using that instead.
|
|
15
|
+
*/
|
|
16
|
+
getConf(arg: string | string[]): any;
|
|
17
|
+
/**
|
|
18
|
+
* Called to provide a hint that data tied to a certain region will not be
|
|
19
|
+
* needed for the foreseeable future and can be purged from caches, etc
|
|
20
|
+
* @param region - Region
|
|
21
|
+
*/
|
|
22
|
+
abstract freeResources(region: Region): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.BaseAdapter = void 0;
|
|
7
|
+
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
8
|
+
// locals
|
|
9
|
+
const configuration_1 = require("../../configuration");
|
|
10
|
+
const idMaker_1 = __importDefault(require("../../util/idMaker"));
|
|
11
|
+
const configuration_2 = require("../../configuration");
|
|
12
|
+
const EmptyConfig = (0, configuration_2.ConfigurationSchema)('empty', {});
|
|
13
|
+
class BaseAdapter {
|
|
14
|
+
constructor(config = EmptyConfig.create(), getSubAdapter, pluginManager) {
|
|
15
|
+
this.config = config;
|
|
16
|
+
this.getSubAdapter = getSubAdapter;
|
|
17
|
+
this.pluginManager = pluginManager;
|
|
18
|
+
// note: we use switch on jest here for more simple feature IDs
|
|
19
|
+
// in test environment
|
|
20
|
+
if (typeof jest === 'undefined') {
|
|
21
|
+
const data = (0, mobx_state_tree_1.isStateTreeNode)(config) ? (0, mobx_state_tree_1.getSnapshot)(config) : config;
|
|
22
|
+
this.id = `${(0, idMaker_1.default)(data)}`;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
this.id = 'test';
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Same as `readConfObject(this.config, arg)`.
|
|
30
|
+
* @deprecated Does not offer the same TS type checking as `readConfObject`, consider using that instead.
|
|
31
|
+
*/
|
|
32
|
+
getConf(arg) {
|
|
33
|
+
return (0, configuration_1.readConfObject)(this.config, arg);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
BaseAdapter.capabilities = [];
|
|
37
|
+
exports.BaseAdapter = BaseAdapter;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { BaseAdapter } from './BaseAdapter';
|
|
3
|
+
import { BaseOptions } from './BaseOptions';
|
|
4
|
+
import { FeatureDensityStats } from './types';
|
|
5
|
+
import { Feature } from '../../util/simpleFeature';
|
|
6
|
+
import { AugmentedRegion as Region } from '../../util/types';
|
|
7
|
+
/**
|
|
8
|
+
* Base class for feature adapters to extend. Defines some methods that
|
|
9
|
+
* subclasses must implement.
|
|
10
|
+
*/
|
|
11
|
+
export declare abstract class BaseFeatureDataAdapter extends BaseAdapter {
|
|
12
|
+
/**
|
|
13
|
+
* Get all reference sequence names used in the data source
|
|
14
|
+
* Example:
|
|
15
|
+
* public async getRefNames(opts?: BaseOptions): Promise\<string[]\> \}
|
|
16
|
+
* await this.setup()
|
|
17
|
+
* const \{ refNames \} = this.metadata
|
|
18
|
+
* return refNames
|
|
19
|
+
* \}
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
* NOTE: If an adapter is unable to determine the reference sequence names,
|
|
23
|
+
* the array will be empty
|
|
24
|
+
* @param opts - Feature adapter options
|
|
25
|
+
*/
|
|
26
|
+
abstract getRefNames(opts?: BaseOptions): Promise<string[]>;
|
|
27
|
+
/**
|
|
28
|
+
* Get features from the data source that overlap a region
|
|
29
|
+
* Example:
|
|
30
|
+
* public getFeatures(
|
|
31
|
+
* region: Region,
|
|
32
|
+
* opts: BaseOptions,
|
|
33
|
+
* ): Observable<Feature> \{
|
|
34
|
+
* return ObservableCreate(observer =\> \{
|
|
35
|
+
* const records = getRecords(assembly, refName, start, end)
|
|
36
|
+
* records.forEach(record =\> \{
|
|
37
|
+
* observer.next(this.recordToFeature(record))
|
|
38
|
+
* \})
|
|
39
|
+
* observer.complete()
|
|
40
|
+
* \})
|
|
41
|
+
* \}
|
|
42
|
+
* @param region - Region
|
|
43
|
+
* @param opts - Feature adapter options
|
|
44
|
+
* @returns Observable of Feature objects in the region
|
|
45
|
+
*/
|
|
46
|
+
abstract getFeatures(region: Region, opts?: BaseOptions): Observable<Feature>;
|
|
47
|
+
/**
|
|
48
|
+
* Return "header info" that is fetched from the data file, or other info
|
|
49
|
+
* that would not simply be in the config of the file. The return value can
|
|
50
|
+
* be `{tag:string, data: any}[]` e.g. list of tags with their values which
|
|
51
|
+
* is how VCF,BAM,CRAM return values for getInfo or it can be a nested JSON
|
|
52
|
+
* object
|
|
53
|
+
*/
|
|
54
|
+
getHeader(_opts?: BaseOptions): Promise<unknown>;
|
|
55
|
+
/**
|
|
56
|
+
* Return info that is primarily used for interpreting the data that is there,
|
|
57
|
+
* primarily in reference to being used for augmenting feature details panels
|
|
58
|
+
*/
|
|
59
|
+
getMetadata(_opts?: BaseOptions): Promise<unknown>;
|
|
60
|
+
/**
|
|
61
|
+
* Checks if the store has data for the given assembly and reference
|
|
62
|
+
* sequence, and then gets the features in the region if it does.
|
|
63
|
+
*/
|
|
64
|
+
getFeaturesInRegion(region: Region, opts?: BaseOptions): Observable<Feature>;
|
|
65
|
+
/**
|
|
66
|
+
* Checks if the store has data for the given assembly and reference
|
|
67
|
+
* sequence, and then gets the features in the region if it does.
|
|
68
|
+
*
|
|
69
|
+
* Currently this just calls getFeatureInRegion for each region. Adapters that
|
|
70
|
+
* are frequently called on multiple regions simultaneously may want to
|
|
71
|
+
* implement a more efficient custom version of this method.
|
|
72
|
+
*
|
|
73
|
+
* Currently this just calls getFeatureInRegion for each region. Adapters that
|
|
74
|
+
* are frequently called on multiple regions simultaneously may want to
|
|
75
|
+
* implement a more efficient custom version of this method.
|
|
76
|
+
*
|
|
77
|
+
* @param regions - Regions
|
|
78
|
+
* @param opts - Feature adapter options
|
|
79
|
+
* @returns Observable of Feature objects in the regions
|
|
80
|
+
*/
|
|
81
|
+
getFeaturesInMultipleRegions(regions: Region[], opts?: BaseOptions): Observable<Feature>;
|
|
82
|
+
/**
|
|
83
|
+
* Check if the store has data for the given reference name.
|
|
84
|
+
* @param refName - Name of the reference sequence
|
|
85
|
+
* @returns Whether data source has data for the given reference name
|
|
86
|
+
*/
|
|
87
|
+
hasDataForRefName(refName: string, opts?: BaseOptions): Promise<boolean>;
|
|
88
|
+
/**
|
|
89
|
+
* Calculates the minimum score, maximum score, and other statistics from
|
|
90
|
+
* features over a region, primarily used for quantitative tracks
|
|
91
|
+
*/
|
|
92
|
+
getRegionQuantitativeStats(region: Region, opts?: BaseOptions): Promise<import("../../util/stats").QuantitativeStats>;
|
|
93
|
+
/**
|
|
94
|
+
* Calculates the minimum score, maximum score, and other statistics from
|
|
95
|
+
* features over multiple regions, primarily used for quantitative tracks
|
|
96
|
+
*/
|
|
97
|
+
getMultiRegionQuantitativeStats(regions?: Region[], opts?: BaseOptions): Promise<import("../../util/stats").QuantitativeStats>;
|
|
98
|
+
/**
|
|
99
|
+
* Calculates the "feature density" of a region. The primary purpose of this
|
|
100
|
+
* API is to alert the user if they are going to be downloading too much
|
|
101
|
+
* information, and give them a hint to zoom in to see more. The default
|
|
102
|
+
* implementation samples from the regions, downloads feature data with
|
|
103
|
+
* getFeatures, and returns an object with the form \{featureDensity:number\}
|
|
104
|
+
*
|
|
105
|
+
* Derived classes can override this to return alternative calculations for
|
|
106
|
+
* featureDensity, or they can also return an object containing a byte size
|
|
107
|
+
* calculation with the format \{bytes:number, fetchSizeLimit:number\} where
|
|
108
|
+
* fetchSizeLimit is the adapter-defined limit for what it thinks is 'too much
|
|
109
|
+
* data' (e.g. CRAM and
|
|
110
|
+
* BAM may vary on what they think too much data is)
|
|
111
|
+
*/
|
|
112
|
+
getRegionFeatureDensityStats(region: Region, opts?: BaseOptions): Promise<FeatureDensityStats>;
|
|
113
|
+
/**
|
|
114
|
+
* Calculates the "feature density" of a set of regions. The primary purpose
|
|
115
|
+
* of this API is to alert the user if they are going to be downloading too
|
|
116
|
+
* much information, and give them a hint to zoom in to see more. The default
|
|
117
|
+
* implementation samples from the regions, downloads feature data with
|
|
118
|
+
* getFeatures, and returns an object with the form \{featureDensity:number\}
|
|
119
|
+
*
|
|
120
|
+
* Derived classes can override this to return alternative calculations for
|
|
121
|
+
* featureDensity, or they can also return an object containing a byte size
|
|
122
|
+
* calculation with the format \{bytes:number, fetchSizeLimit:number\} where
|
|
123
|
+
* fetchSizeLimit is the adapter-defined limit for what it thinks is 'too much
|
|
124
|
+
* data' (e.g. CRAM and
|
|
125
|
+
* BAM may vary on what they think too much data is)
|
|
126
|
+
*/
|
|
127
|
+
getMultiRegionFeatureDensityStats(regions: Region[], opts?: BaseOptions): Promise<FeatureDensityStats>;
|
|
128
|
+
}
|
|
@@ -1,57 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
3
|
+
exports.BaseFeatureDataAdapter = void 0;
|
|
7
4
|
const rxjs_1 = require("rxjs");
|
|
8
5
|
const operators_1 = require("rxjs/operators");
|
|
9
|
-
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
10
6
|
// locals
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const stats_1 = require("
|
|
15
|
-
const idMaker_1 = __importDefault(require("../util/idMaker"));
|
|
16
|
-
const EmptyConfig = (0, configuration_1.ConfigurationSchema)('empty', {});
|
|
17
|
-
class BaseAdapter {
|
|
18
|
-
constructor(config = EmptyConfig.create(), getSubAdapter, pluginManager) {
|
|
19
|
-
this.config = config;
|
|
20
|
-
this.getSubAdapter = getSubAdapter;
|
|
21
|
-
this.pluginManager = pluginManager;
|
|
22
|
-
// note: we use switch on jest here for more simple feature IDs
|
|
23
|
-
// in test environment
|
|
24
|
-
if (typeof jest === 'undefined') {
|
|
25
|
-
const data = (0, mobx_state_tree_1.isStateTreeNode)(config) ? (0, mobx_state_tree_1.getSnapshot)(config) : config;
|
|
26
|
-
this.id = `${(0, idMaker_1.default)(data)}`;
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
this.id = 'test';
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
getConf(arg) {
|
|
33
|
-
return (0, configuration_1.readConfObject)(this.config, arg);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
exports.BaseAdapter = BaseAdapter;
|
|
37
|
-
BaseAdapter.capabilities = [];
|
|
7
|
+
const BaseAdapter_1 = require("./BaseAdapter");
|
|
8
|
+
const rxjs_2 = require("../../util/rxjs");
|
|
9
|
+
const util_1 = require("../../util");
|
|
10
|
+
const stats_1 = require("../../util/stats");
|
|
38
11
|
/**
|
|
39
12
|
* Base class for feature adapters to extend. Defines some methods that
|
|
40
13
|
* subclasses must implement.
|
|
41
14
|
*/
|
|
42
|
-
class BaseFeatureDataAdapter extends BaseAdapter {
|
|
43
|
-
// public abstract getFeatures(
|
|
44
|
-
// region: Region,
|
|
45
|
-
// opts: BaseOptions,
|
|
46
|
-
// ): Observable<Feature> {
|
|
47
|
-
// return ObservableCreate(observer => {
|
|
48
|
-
// const records = getRecords(assembly, refName, start, end)
|
|
49
|
-
// records.forEach(record => {
|
|
50
|
-
// observer.next(this.recordToFeature(record))
|
|
51
|
-
// })
|
|
52
|
-
// observer.complete()
|
|
53
|
-
// })
|
|
54
|
-
// }
|
|
15
|
+
class BaseFeatureDataAdapter extends BaseAdapter_1.BaseAdapter {
|
|
55
16
|
/**
|
|
56
17
|
* Return "header info" that is fetched from the data file, or other info
|
|
57
18
|
* that would not simply be in the config of the file. The return value can
|
|
@@ -89,9 +50,9 @@ class BaseFeatureDataAdapter extends BaseAdapter {
|
|
|
89
50
|
* Checks if the store has data for the given assembly and reference
|
|
90
51
|
* sequence, and then gets the features in the region if it does.
|
|
91
52
|
*
|
|
92
|
-
* Currently this just calls getFeatureInRegion for each region. Adapters
|
|
93
|
-
*
|
|
94
|
-
*
|
|
53
|
+
* Currently this just calls getFeatureInRegion for each region. Adapters that
|
|
54
|
+
* are frequently called on multiple regions simultaneously may want to
|
|
55
|
+
* implement a more efficient custom version of this method.
|
|
95
56
|
*
|
|
96
57
|
* Currently this just calls getFeatureInRegion for each region. Adapters that
|
|
97
58
|
* are frequently called on multiple regions simultaneously may want to
|
|
@@ -102,9 +63,7 @@ class BaseFeatureDataAdapter extends BaseAdapter {
|
|
|
102
63
|
* @returns Observable of Feature objects in the regions
|
|
103
64
|
*/
|
|
104
65
|
getFeaturesInMultipleRegions(regions, opts = {}) {
|
|
105
|
-
return (0, rxjs_1.merge)(...regions.map(region =>
|
|
106
|
-
return this.getFeaturesInRegion(region, opts);
|
|
107
|
-
}));
|
|
66
|
+
return (0, rxjs_1.merge)(...regions.map(region => this.getFeaturesInRegion(region, opts)));
|
|
108
67
|
}
|
|
109
68
|
/**
|
|
110
69
|
* Check if the store has data for the given reference name.
|
|
@@ -115,15 +74,23 @@ class BaseFeatureDataAdapter extends BaseAdapter {
|
|
|
115
74
|
const refNames = await this.getRefNames(opts);
|
|
116
75
|
return refNames.includes(refName);
|
|
117
76
|
}
|
|
118
|
-
|
|
77
|
+
/**
|
|
78
|
+
* Calculates the minimum score, maximum score, and other statistics from
|
|
79
|
+
* features over a region, primarily used for quantitative tracks
|
|
80
|
+
*/
|
|
81
|
+
async getRegionQuantitativeStats(region, opts) {
|
|
119
82
|
const feats = this.getFeatures(region, opts);
|
|
120
83
|
return (0, stats_1.scoresToStats)(region, feats);
|
|
121
84
|
}
|
|
122
|
-
|
|
85
|
+
/**
|
|
86
|
+
* Calculates the minimum score, maximum score, and other statistics from
|
|
87
|
+
* features over multiple regions, primarily used for quantitative tracks
|
|
88
|
+
*/
|
|
89
|
+
async getMultiRegionQuantitativeStats(regions = [], opts) {
|
|
123
90
|
if (!regions.length) {
|
|
124
91
|
return (0, stats_1.blankStats)();
|
|
125
92
|
}
|
|
126
|
-
const feats = await Promise.all(regions.map(region => this.
|
|
93
|
+
const feats = await Promise.all(regions.map(region => this.getRegionQuantitativeStats(region, opts)));
|
|
127
94
|
const scoreMax = (0, util_1.max)(feats.map(a => a.scoreMax));
|
|
128
95
|
const scoreMin = (0, util_1.min)(feats.map(a => a.scoreMin));
|
|
129
96
|
const scoreSum = (0, util_1.sum)(feats.map(a => a.scoreSum));
|
|
@@ -139,21 +106,30 @@ class BaseFeatureDataAdapter extends BaseAdapter {
|
|
|
139
106
|
scoreSum,
|
|
140
107
|
});
|
|
141
108
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
109
|
+
/**
|
|
110
|
+
* Calculates the "feature density" of a region. The primary purpose of this
|
|
111
|
+
* API is to alert the user if they are going to be downloading too much
|
|
112
|
+
* information, and give them a hint to zoom in to see more. The default
|
|
113
|
+
* implementation samples from the regions, downloads feature data with
|
|
114
|
+
* getFeatures, and returns an object with the form \{featureDensity:number\}
|
|
115
|
+
*
|
|
116
|
+
* Derived classes can override this to return alternative calculations for
|
|
117
|
+
* featureDensity, or they can also return an object containing a byte size
|
|
118
|
+
* calculation with the format \{bytes:number, fetchSizeLimit:number\} where
|
|
119
|
+
* fetchSizeLimit is the adapter-defined limit for what it thinks is 'too much
|
|
120
|
+
* data' (e.g. CRAM and
|
|
121
|
+
* BAM may vary on what they think too much data is)
|
|
122
|
+
*/
|
|
123
|
+
getRegionFeatureDensityStats(region, opts) {
|
|
147
124
|
let lastTime = +Date.now();
|
|
148
125
|
const statsFromInterval = async (length, expansionTime) => {
|
|
149
126
|
const { start, end } = region;
|
|
150
127
|
const sampleCenter = start * 0.75 + end * 0.25;
|
|
151
|
-
const
|
|
128
|
+
const features = await (0, rxjs_1.firstValueFrom)(this.getFeatures({
|
|
152
129
|
...region,
|
|
153
130
|
start: Math.max(0, Math.round(sampleCenter - length / 2)),
|
|
154
131
|
end: Math.min(Math.round(sampleCenter + length / 2), end),
|
|
155
|
-
};
|
|
156
|
-
const features = await (0, rxjs_1.firstValueFrom)(this.getFeatures(query, opts).pipe((0, operators_1.toArray)()));
|
|
132
|
+
}, opts).pipe((0, operators_1.toArray)()));
|
|
157
133
|
return maybeRecordStats(length, { featureDensity: features.length / length }, features.length, expansionTime);
|
|
158
134
|
};
|
|
159
135
|
const maybeRecordStats = async (interval, stats, statsSampleFeatures, expansionTime) => {
|
|
@@ -174,31 +150,25 @@ class BaseFeatureDataAdapter extends BaseAdapter {
|
|
|
174
150
|
};
|
|
175
151
|
return statsFromInterval(1000, 0);
|
|
176
152
|
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
153
|
+
/**
|
|
154
|
+
* Calculates the "feature density" of a set of regions. The primary purpose
|
|
155
|
+
* of this API is to alert the user if they are going to be downloading too
|
|
156
|
+
* much information, and give them a hint to zoom in to see more. The default
|
|
157
|
+
* implementation samples from the regions, downloads feature data with
|
|
158
|
+
* getFeatures, and returns an object with the form \{featureDensity:number\}
|
|
159
|
+
*
|
|
160
|
+
* Derived classes can override this to return alternative calculations for
|
|
161
|
+
* featureDensity, or they can also return an object containing a byte size
|
|
162
|
+
* calculation with the format \{bytes:number, fetchSizeLimit:number\} where
|
|
163
|
+
* fetchSizeLimit is the adapter-defined limit for what it thinks is 'too much
|
|
164
|
+
* data' (e.g. CRAM and
|
|
165
|
+
* BAM may vary on what they think too much data is)
|
|
166
|
+
*/
|
|
167
|
+
async getMultiRegionFeatureDensityStats(regions, opts) {
|
|
168
|
+
if (!regions.length) {
|
|
169
|
+
throw new Error('No regions supplied');
|
|
170
|
+
}
|
|
171
|
+
return this.getRegionFeatureDensityStats(regions[0], opts);
|
|
182
172
|
}
|
|
183
173
|
}
|
|
184
|
-
exports.
|
|
185
|
-
function isSequenceAdapter(thing) {
|
|
186
|
-
return 'getRegions' in thing && 'getFeatures' in thing;
|
|
187
|
-
}
|
|
188
|
-
exports.isSequenceAdapter = isSequenceAdapter;
|
|
189
|
-
function isRegionsAdapter(thing) {
|
|
190
|
-
return 'getRegions' in thing;
|
|
191
|
-
}
|
|
192
|
-
exports.isRegionsAdapter = isRegionsAdapter;
|
|
193
|
-
function isFeatureAdapter(thing) {
|
|
194
|
-
return 'getFeatures' in thing;
|
|
195
|
-
}
|
|
196
|
-
exports.isFeatureAdapter = isFeatureAdapter;
|
|
197
|
-
function isRefNameAliasAdapter(thing) {
|
|
198
|
-
return 'getRefNameAliases' in thing;
|
|
199
|
-
}
|
|
200
|
-
exports.isRefNameAliasAdapter = isRefNameAliasAdapter;
|
|
201
|
-
function isTextSearchAdapter(thing) {
|
|
202
|
-
return 'searchIndex' in thing;
|
|
203
|
-
}
|
|
204
|
-
exports.isTextSearchAdapter = isTextSearchAdapter;
|
|
174
|
+
exports.BaseFeatureDataAdapter = BaseFeatureDataAdapter;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface BaseOptions {
|
|
2
|
+
signal?: AbortSignal;
|
|
3
|
+
bpPerPx?: number;
|
|
4
|
+
sessionId?: string;
|
|
5
|
+
statusCallback?: (message: string) => void;
|
|
6
|
+
headers?: Record<string, string>;
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
}
|
|
9
|
+
export type SearchType = 'full' | 'prefix' | 'exact';
|
|
10
|
+
export interface BaseTextSearchArgs {
|
|
11
|
+
queryString: string;
|
|
12
|
+
searchType?: SearchType;
|
|
13
|
+
signal?: AbortSignal;
|
|
14
|
+
limit?: number;
|
|
15
|
+
pageNumber?: number;
|
|
16
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseAdapter } from './BaseAdapter';
|
|
2
|
+
import { BaseOptions } from './types';
|
|
3
|
+
export interface Alias {
|
|
4
|
+
refName: string;
|
|
5
|
+
aliases: string[];
|
|
6
|
+
}
|
|
7
|
+
export interface BaseRefNameAliasAdapter extends BaseAdapter {
|
|
8
|
+
getRefNameAliases(opts: BaseOptions): Promise<Alias[]>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { NoAssemblyRegion } from '../../util';
|
|
2
|
+
import { BaseOptions } from './types';
|
|
3
|
+
import { RegionsAdapter } from '../BaseAdapter';
|
|
4
|
+
import { BaseFeatureDataAdapter } from './BaseFeatureDataAdapter';
|
|
5
|
+
export declare abstract class BaseSequenceAdapter extends BaseFeatureDataAdapter implements RegionsAdapter {
|
|
6
|
+
getMultiRegionFeatureDensityStats(): Promise<{
|
|
7
|
+
featureDensity: number;
|
|
8
|
+
}>;
|
|
9
|
+
/**
|
|
10
|
+
* Fetches a list of 'regions' with refName, start, and extends
|
|
11
|
+
*/
|
|
12
|
+
abstract getRegions(opts: BaseOptions): Promise<NoAssemblyRegion[]>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BaseSequenceAdapter = void 0;
|
|
4
|
+
const BaseFeatureDataAdapter_1 = require("./BaseFeatureDataAdapter");
|
|
5
|
+
class BaseSequenceAdapter extends BaseFeatureDataAdapter_1.BaseFeatureDataAdapter {
|
|
6
|
+
async getMultiRegionFeatureDensityStats() {
|
|
7
|
+
return { featureDensity: 0 };
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.BaseSequenceAdapter = BaseSequenceAdapter;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import BaseResult from '../../TextSearch/BaseResults';
|
|
2
|
+
import { BaseTextSearchArgs } from './types';
|
|
3
|
+
import { BaseAdapter } from './BaseAdapter';
|
|
4
|
+
export interface BaseTextSearchAdapter extends BaseAdapter {
|
|
5
|
+
searchIndex(args: BaseTextSearchArgs): Promise<BaseResult[]>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AnyConfigurationModel } from '../../configuration';
|
|
2
|
+
import PluginManager from '../../PluginManager';
|
|
3
|
+
import { getSubAdapterType } from '../dataAdapterCache';
|
|
4
|
+
import { AnyDataAdapter } from './util';
|
|
5
|
+
export * from './util';
|
|
6
|
+
export * from './types';
|
|
7
|
+
export { BaseAdapter } from './BaseAdapter';
|
|
8
|
+
export { BaseFeatureDataAdapter } from './BaseFeatureDataAdapter';
|
|
9
|
+
export { BaseSequenceAdapter } from './BaseSequenceAdapter';
|
|
10
|
+
export type { BaseTextSearchAdapter } from './BaseTextSearchAdapter';
|
|
11
|
+
export type { BaseRefNameAliasAdapter } from './BaseRefNameAliasAdapter';
|
|
12
|
+
export type { RegionsAdapter } from './RegionsAdapter';
|
|
13
|
+
export interface AnyAdapter {
|
|
14
|
+
new (config: AnyConfigurationModel, getSubAdapter?: getSubAdapterType, pluginManager?: PluginManager | undefined): AnyDataAdapter;
|
|
15
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.BaseSequenceAdapter = exports.BaseFeatureDataAdapter = exports.BaseAdapter = void 0;
|
|
18
|
+
__exportStar(require("./util"), exports);
|
|
19
|
+
__exportStar(require("./types"), exports);
|
|
20
|
+
var BaseAdapter_1 = require("./BaseAdapter");
|
|
21
|
+
Object.defineProperty(exports, "BaseAdapter", { enumerable: true, get: function () { return BaseAdapter_1.BaseAdapter; } });
|
|
22
|
+
var BaseFeatureDataAdapter_1 = require("./BaseFeatureDataAdapter");
|
|
23
|
+
Object.defineProperty(exports, "BaseFeatureDataAdapter", { enumerable: true, get: function () { return BaseFeatureDataAdapter_1.BaseFeatureDataAdapter; } });
|
|
24
|
+
var BaseSequenceAdapter_1 = require("./BaseSequenceAdapter");
|
|
25
|
+
Object.defineProperty(exports, "BaseSequenceAdapter", { enumerable: true, get: function () { return BaseSequenceAdapter_1.BaseSequenceAdapter; } });
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface BaseOptions {
|
|
2
|
+
signal?: AbortSignal;
|
|
3
|
+
bpPerPx?: number;
|
|
4
|
+
sessionId?: string;
|
|
5
|
+
statusCallback?: (message: string) => void;
|
|
6
|
+
headers?: Record<string, string>;
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
}
|
|
9
|
+
export type SearchType = 'full' | 'prefix' | 'exact';
|
|
10
|
+
export interface BaseTextSearchArgs {
|
|
11
|
+
queryString: string;
|
|
12
|
+
searchType?: SearchType;
|
|
13
|
+
signal?: AbortSignal;
|
|
14
|
+
limit?: number;
|
|
15
|
+
pageNumber?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface FeatureDensityStats {
|
|
18
|
+
featureDensity?: number;
|
|
19
|
+
fetchSizeLimit?: number;
|
|
20
|
+
bytes?: number;
|
|
21
|
+
}
|