@jbrowse/plugin-sequence 1.4.1 → 1.5.2
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/dist/BgzipFastaAdapter/BgzipFastaAdapter.d.ts +3 -1
- package/dist/ChromSizesAdapter/ChromSizesAdapter.d.ts +3 -1
- package/dist/IndexedFastaAdapter/IndexedFastaAdapter.d.ts +3 -1
- package/dist/LinearReferenceSequenceDisplay/model.d.ts +8 -8
- package/dist/TwoBitAdapter/TwoBitAdapter.d.ts +3 -1
- package/dist/plugin-sequence.cjs.development.js +174 -57
- package/dist/plugin-sequence.cjs.development.js.map +1 -1
- package/dist/plugin-sequence.cjs.production.min.js +1 -1
- package/dist/plugin-sequence.cjs.production.min.js.map +1 -1
- package/dist/plugin-sequence.esm.js +174 -57
- package/dist/plugin-sequence.esm.js.map +1 -1
- package/package.json +5 -5
- package/src/BgzipFastaAdapter/BgzipFastaAdapter.test.ts +3 -0
- package/src/BgzipFastaAdapter/BgzipFastaAdapter.ts +11 -5
- package/src/BgzipFastaAdapter/configSchema.ts +9 -3
- package/src/ChromSizesAdapter/ChromSizesAdapter.test.ts +1 -0
- package/src/ChromSizesAdapter/ChromSizesAdapter.ts +12 -3
- package/src/ChromSizesAdapter/configSchema.ts +4 -1
- package/src/IndexedFastaAdapter/IndexedFastaAdapter.test.ts +2 -0
- package/src/IndexedFastaAdapter/IndexedFastaAdapter.ts +10 -4
- package/src/IndexedFastaAdapter/configSchema.ts +2 -2
- package/src/TwoBitAdapter/TwoBitAdapter.test.ts +2 -0
- package/src/TwoBitAdapter/TwoBitAdapter.ts +15 -5
- package/src/TwoBitAdapter/configSchema.ts +5 -2
- package/src/index.ts +136 -0
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { AnyConfigurationModel } from '@jbrowse/core/configuration/configurationSchema';
|
|
2
2
|
import IndexedFasta from '../IndexedFastaAdapter/IndexedFastaAdapter';
|
|
3
|
+
import PluginManager from '@jbrowse/core/PluginManager';
|
|
4
|
+
import { getSubAdapterType } from '@jbrowse/core/data_adapters/dataAdapterCache';
|
|
3
5
|
export default class extends IndexedFasta {
|
|
4
|
-
constructor(config: AnyConfigurationModel);
|
|
6
|
+
constructor(config: AnyConfigurationModel, getSubAdapter?: getSubAdapterType, pluginManager?: PluginManager);
|
|
5
7
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { RegionsAdapter, BaseAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
2
2
|
import { Instance } from 'mobx-state-tree';
|
|
3
3
|
import MyConfigSchema from './configSchema';
|
|
4
|
+
import PluginManager from '@jbrowse/core/PluginManager';
|
|
5
|
+
import { getSubAdapterType } from '@jbrowse/core/data_adapters/dataAdapterCache';
|
|
4
6
|
export default class extends BaseAdapter implements RegionsAdapter {
|
|
5
7
|
protected refSeqs: Promise<Record<string, number>>;
|
|
6
8
|
protected source: string;
|
|
7
|
-
constructor(config: Instance<typeof MyConfigSchema
|
|
9
|
+
constructor(config: Instance<typeof MyConfigSchema>, getSubAdapter?: getSubAdapterType, pluginManager?: PluginManager);
|
|
8
10
|
private init;
|
|
9
11
|
getRegions(): Promise<{
|
|
10
12
|
refName: string;
|
|
@@ -3,10 +3,12 @@ import { BaseFeatureDataAdapter, SequenceAdapter, BaseOptions } from '@jbrowse/c
|
|
|
3
3
|
import { NoAssemblyRegion } from '@jbrowse/core/util/types';
|
|
4
4
|
import { Feature } from '@jbrowse/core/util/simpleFeature';
|
|
5
5
|
import { AnyConfigurationModel } from '@jbrowse/core/configuration/configurationSchema';
|
|
6
|
+
import PluginManager from '@jbrowse/core/PluginManager';
|
|
7
|
+
import { getSubAdapterType } from '@jbrowse/core/data_adapters/dataAdapterCache';
|
|
6
8
|
export default class extends BaseFeatureDataAdapter implements SequenceAdapter {
|
|
7
9
|
protected fasta: typeof IndexedFasta;
|
|
8
10
|
private seqCache;
|
|
9
|
-
constructor(config: AnyConfigurationModel);
|
|
11
|
+
constructor(config: AnyConfigurationModel, getSubAdapter?: getSubAdapterType, pluginManager?: PluginManager);
|
|
10
12
|
getRefNames(opts?: BaseOptions): any;
|
|
11
13
|
getRegions(opts?: BaseOptions): Promise<{
|
|
12
14
|
refName: string;
|
|
@@ -28,7 +28,7 @@ export declare function modelFactory(configSchema: AnyConfigurationSchemaType):
|
|
|
28
28
|
features: Map<string, import("@jbrowse/core/util/simpleFeature").Feature> | undefined;
|
|
29
29
|
layout: any;
|
|
30
30
|
status: string;
|
|
31
|
-
error:
|
|
31
|
+
error: unknown;
|
|
32
32
|
message: string | undefined;
|
|
33
33
|
maxHeightReached: boolean;
|
|
34
34
|
ReactComponent: ({ model, }: {
|
|
@@ -48,7 +48,7 @@ export declare function modelFactory(configSchema: AnyConfigurationSchemaType):
|
|
|
48
48
|
maxHeightReached: boolean;
|
|
49
49
|
renderProps: any;
|
|
50
50
|
} | undefined): void;
|
|
51
|
-
setError(error:
|
|
51
|
+
setError(error: unknown): void;
|
|
52
52
|
reload(): void;
|
|
53
53
|
beforeDestroy(): void;
|
|
54
54
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
@@ -62,7 +62,7 @@ export declare function modelFactory(configSchema: AnyConfigurationSchemaType):
|
|
|
62
62
|
height: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
63
63
|
}, {
|
|
64
64
|
rendererTypeName: string;
|
|
65
|
-
error:
|
|
65
|
+
error: unknown;
|
|
66
66
|
} & {
|
|
67
67
|
readonly RenderingComponent: import("react").FC<{
|
|
68
68
|
model: import("mobx-state-tree").ModelInstanceTypeProps<{
|
|
@@ -71,14 +71,14 @@ export declare function modelFactory(configSchema: AnyConfigurationSchemaType):
|
|
|
71
71
|
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
72
72
|
}> & {
|
|
73
73
|
rendererTypeName: string;
|
|
74
|
-
error:
|
|
74
|
+
error: unknown;
|
|
75
75
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
76
76
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
77
77
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
78
78
|
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
79
79
|
}, {
|
|
80
80
|
rendererTypeName: string;
|
|
81
|
-
error:
|
|
81
|
+
error: unknown;
|
|
82
82
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
83
83
|
onHorizontalScroll?: Function | undefined;
|
|
84
84
|
blockState?: Record<string, any> | undefined;
|
|
@@ -90,14 +90,14 @@ export declare function modelFactory(configSchema: AnyConfigurationSchemaType):
|
|
|
90
90
|
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
91
91
|
}> & {
|
|
92
92
|
rendererTypeName: string;
|
|
93
|
-
error:
|
|
93
|
+
error: unknown;
|
|
94
94
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
95
95
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
96
96
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
97
97
|
rpcDriverName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
98
98
|
}, {
|
|
99
99
|
rendererTypeName: string;
|
|
100
|
-
error:
|
|
100
|
+
error: unknown;
|
|
101
101
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
102
102
|
}> | null;
|
|
103
103
|
readonly adapterConfig: any;
|
|
@@ -109,7 +109,7 @@ export declare function modelFactory(configSchema: AnyConfigurationSchemaType):
|
|
|
109
109
|
readonly viewMenuActions: import("@jbrowse/core/ui").MenuItem[];
|
|
110
110
|
regionCannotBeRendered(): undefined;
|
|
111
111
|
} & {
|
|
112
|
-
setError(error?:
|
|
112
|
+
setError(error?: unknown): void;
|
|
113
113
|
setRpcDriverName(rpcDriverName: string): void;
|
|
114
114
|
reload(): void;
|
|
115
115
|
} & {
|
|
@@ -2,11 +2,13 @@ import { BaseFeatureDataAdapter, SequenceAdapter } from '@jbrowse/core/data_adap
|
|
|
2
2
|
import { NoAssemblyRegion } from '@jbrowse/core/util/types';
|
|
3
3
|
import { Feature } from '@jbrowse/core/util/simpleFeature';
|
|
4
4
|
import { AnyConfigurationModel } from '@jbrowse/core/configuration/configurationSchema';
|
|
5
|
+
import PluginManager from '@jbrowse/core/PluginManager';
|
|
6
|
+
import { getSubAdapterType } from '@jbrowse/core/data_adapters/dataAdapterCache';
|
|
5
7
|
export default class TwoBitAdapter extends BaseFeatureDataAdapter implements SequenceAdapter {
|
|
6
8
|
private twobit;
|
|
7
9
|
protected chromSizesData: Promise<Record<string, number> | undefined>;
|
|
8
10
|
private initChromSizes;
|
|
9
|
-
constructor(config: AnyConfigurationModel);
|
|
11
|
+
constructor(config: AnyConfigurationModel, getSubAdapter?: getSubAdapterType, pluginManager?: PluginManager);
|
|
10
12
|
getRefNames(): Promise<any>;
|
|
11
13
|
getRegions(): Promise<NoAssemblyRegion[]>;
|
|
12
14
|
/**
|
|
@@ -10,6 +10,7 @@ var FeatureRendererType = _interopDefault(require('@jbrowse/core/pluggableElemen
|
|
|
10
10
|
var TrackType = _interopDefault(require('@jbrowse/core/pluggableElementTypes/TrackType'));
|
|
11
11
|
var Plugin = _interopDefault(require('@jbrowse/core/Plugin'));
|
|
12
12
|
var pluginLinearGenomeView = require('@jbrowse/plugin-linear-genome-view');
|
|
13
|
+
var tracks = require('@jbrowse/core/util/tracks');
|
|
13
14
|
var configuration = require('@jbrowse/core/configuration');
|
|
14
15
|
var color = require('@jbrowse/core/util/color');
|
|
15
16
|
var ui = require('@jbrowse/core/ui');
|
|
@@ -193,6 +194,8 @@ function _assertThisInitialized(self) {
|
|
|
193
194
|
function _possibleConstructorReturn(self, call) {
|
|
194
195
|
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
195
196
|
return call;
|
|
197
|
+
} else if (call !== void 0) {
|
|
198
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
196
199
|
}
|
|
197
200
|
|
|
198
201
|
return _assertThisInitialized(self);
|
|
@@ -296,19 +299,22 @@ var bgzipFastaAdapterConfigSchema = /*#__PURE__*/configuration.ConfigurationSche
|
|
|
296
299
|
fastaLocation: {
|
|
297
300
|
type: 'fileLocation',
|
|
298
301
|
defaultValue: {
|
|
299
|
-
uri: '/path/to/seq.fa.gz'
|
|
302
|
+
uri: '/path/to/seq.fa.gz',
|
|
303
|
+
locationType: 'UriLocation'
|
|
300
304
|
}
|
|
301
305
|
},
|
|
302
306
|
faiLocation: {
|
|
303
307
|
type: 'fileLocation',
|
|
304
308
|
defaultValue: {
|
|
305
|
-
uri: '/path/to/seq.fa.gz.fai'
|
|
309
|
+
uri: '/path/to/seq.fa.gz.fai',
|
|
310
|
+
locationType: 'UriLocation'
|
|
306
311
|
}
|
|
307
312
|
},
|
|
308
313
|
gziLocation: {
|
|
309
314
|
type: 'fileLocation',
|
|
310
315
|
defaultValue: {
|
|
311
|
-
uri: '/path/to/seq.fa.gz.gzi'
|
|
316
|
+
uri: '/path/to/seq.fa.gz.gzi',
|
|
317
|
+
locationType: 'UriLocation'
|
|
312
318
|
}
|
|
313
319
|
}
|
|
314
320
|
}, {
|
|
@@ -319,7 +325,8 @@ var chromSizesAdapterConfigSchema = /*#__PURE__*/configuration.ConfigurationSche
|
|
|
319
325
|
chromSizesLocation: {
|
|
320
326
|
type: 'fileLocation',
|
|
321
327
|
defaultValue: {
|
|
322
|
-
uri: '/path/to/species.chrom.sizes'
|
|
328
|
+
uri: '/path/to/species.chrom.sizes',
|
|
329
|
+
locationType: 'UriLocation'
|
|
323
330
|
}
|
|
324
331
|
}
|
|
325
332
|
}, {
|
|
@@ -551,13 +558,15 @@ var indexedFastaAdapterConfigSchema = /*#__PURE__*/configuration.ConfigurationSc
|
|
|
551
558
|
fastaLocation: {
|
|
552
559
|
type: 'fileLocation',
|
|
553
560
|
defaultValue: {
|
|
554
|
-
uri: '/path/to/seq.fa'
|
|
561
|
+
uri: '/path/to/seq.fa',
|
|
562
|
+
locationType: 'UriLocation'
|
|
555
563
|
}
|
|
556
564
|
},
|
|
557
565
|
faiLocation: {
|
|
558
566
|
type: 'fileLocation',
|
|
559
567
|
defaultValue: {
|
|
560
|
-
uri: '/path/to/seq.fa.fai'
|
|
568
|
+
uri: '/path/to/seq.fa.fai',
|
|
569
|
+
locationType: 'UriLocation'
|
|
561
570
|
}
|
|
562
571
|
}
|
|
563
572
|
}, {
|
|
@@ -594,9 +603,7 @@ function modelFactory(configSchema) {
|
|
|
594
603
|
showTranslation: showTranslation
|
|
595
604
|
});
|
|
596
605
|
},
|
|
597
|
-
regionCannotBeRendered: function regionCannotBeRendered()
|
|
598
|
-
/* region */
|
|
599
|
-
{
|
|
606
|
+
regionCannotBeRendered: function regionCannotBeRendered() {
|
|
600
607
|
var view = util.getContainingView(self);
|
|
601
608
|
|
|
602
609
|
if (view && view.bpPerPx >= 1) {
|
|
@@ -657,13 +664,15 @@ var twoBitAdapterConfigSchema = /*#__PURE__*/configuration.ConfigurationSchema('
|
|
|
657
664
|
twoBitLocation: {
|
|
658
665
|
type: 'fileLocation',
|
|
659
666
|
defaultValue: {
|
|
660
|
-
uri: '/path/to/my.2bit'
|
|
667
|
+
uri: '/path/to/my.2bit',
|
|
668
|
+
locationType: 'UriLocation'
|
|
661
669
|
}
|
|
662
670
|
},
|
|
663
671
|
chromSizesLocation: {
|
|
664
672
|
type: 'fileLocation',
|
|
665
673
|
defaultValue: {
|
|
666
|
-
uri: '/path/to/default.chrom.sizes'
|
|
674
|
+
uri: '/path/to/default.chrom.sizes',
|
|
675
|
+
locationType: 'UriLocation'
|
|
667
676
|
},
|
|
668
677
|
description: 'An optional chrom.sizes file can be supplied to speed up loading since parsing the twobit file can take time'
|
|
669
678
|
}
|
|
@@ -813,6 +822,12 @@ var SequencePlugin = /*#__PURE__*/function (_Plugin) {
|
|
|
813
822
|
return new AdapterType({
|
|
814
823
|
name: 'TwoBitAdapter',
|
|
815
824
|
configSchema: twoBitAdapterConfigSchema,
|
|
825
|
+
adapterMetadata: {
|
|
826
|
+
category: null,
|
|
827
|
+
hiddenFromGUI: true,
|
|
828
|
+
displayName: null,
|
|
829
|
+
description: null
|
|
830
|
+
},
|
|
816
831
|
getAdapterClass: function getAdapterClass() {
|
|
817
832
|
return Promise.resolve().then(function () { return TwoBitAdapter$1; }).then(function (r) {
|
|
818
833
|
return r["default"];
|
|
@@ -820,10 +835,41 @@ var SequencePlugin = /*#__PURE__*/function (_Plugin) {
|
|
|
820
835
|
}
|
|
821
836
|
});
|
|
822
837
|
});
|
|
838
|
+
pluginManager.addToExtensionPoint('Core-guessAdapterForLocation', function (adapterGuesser) {
|
|
839
|
+
return function (file, index, adapterHint) {
|
|
840
|
+
var regexGuess = /\.2bit$/i;
|
|
841
|
+
var adapterName = 'TwoBitAdapter';
|
|
842
|
+
var fileName = tracks.getFileName(file);
|
|
843
|
+
|
|
844
|
+
if (regexGuess.test(fileName) || adapterHint === adapterName) {
|
|
845
|
+
return {
|
|
846
|
+
type: adapterName,
|
|
847
|
+
twoBitLocation: file
|
|
848
|
+
};
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
return adapterGuesser(file, index, adapterHint);
|
|
852
|
+
};
|
|
853
|
+
});
|
|
854
|
+
pluginManager.addToExtensionPoint('Core-guessTrackTypeForLocation', function (trackTypeGuesser) {
|
|
855
|
+
return function (adapterName) {
|
|
856
|
+
if (adapterName === 'TwoBitAdapter') {
|
|
857
|
+
return 'ReferenceSequenceTrack';
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
return trackTypeGuesser(adapterName);
|
|
861
|
+
};
|
|
862
|
+
});
|
|
823
863
|
pluginManager.addAdapterType(function () {
|
|
824
864
|
return new AdapterType({
|
|
825
865
|
name: 'ChromSizesAdapter',
|
|
826
866
|
configSchema: chromSizesAdapterConfigSchema,
|
|
867
|
+
adapterMetadata: {
|
|
868
|
+
category: null,
|
|
869
|
+
hiddenFromGUI: true,
|
|
870
|
+
displayName: null,
|
|
871
|
+
description: null
|
|
872
|
+
},
|
|
827
873
|
getAdapterClass: function getAdapterClass() {
|
|
828
874
|
return Promise.resolve().then(function () { return ChromSizesAdapter; }).then(function (r) {
|
|
829
875
|
return r["default"];
|
|
@@ -835,6 +881,12 @@ var SequencePlugin = /*#__PURE__*/function (_Plugin) {
|
|
|
835
881
|
return new AdapterType({
|
|
836
882
|
name: 'IndexedFastaAdapter',
|
|
837
883
|
configSchema: indexedFastaAdapterConfigSchema,
|
|
884
|
+
adapterMetadata: {
|
|
885
|
+
category: null,
|
|
886
|
+
hiddenFromGUI: true,
|
|
887
|
+
displayName: null,
|
|
888
|
+
description: null
|
|
889
|
+
},
|
|
838
890
|
getAdapterClass: function getAdapterClass() {
|
|
839
891
|
return Promise.resolve().then(function () { return IndexedFastaAdapter; }).then(function (r) {
|
|
840
892
|
return r["default"];
|
|
@@ -842,10 +894,42 @@ var SequencePlugin = /*#__PURE__*/function (_Plugin) {
|
|
|
842
894
|
}
|
|
843
895
|
});
|
|
844
896
|
});
|
|
897
|
+
pluginManager.addToExtensionPoint('Core-guessAdapterForLocation', function (adapterGuesser) {
|
|
898
|
+
return function (file, index, adapterHint) {
|
|
899
|
+
var regexGuess = /\.(fa|fasta|fas|fna|mfa)$/i;
|
|
900
|
+
var adapterName = 'IndexedFastaAdapter';
|
|
901
|
+
var fileName = tracks.getFileName(file);
|
|
902
|
+
|
|
903
|
+
if (regexGuess.test(fileName) || adapterHint === adapterName) {
|
|
904
|
+
return {
|
|
905
|
+
type: adapterName,
|
|
906
|
+
fastaLocation: file,
|
|
907
|
+
faiLocation: index || tracks.makeIndex(file, '.fai')
|
|
908
|
+
};
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
return adapterGuesser(file, index, adapterHint);
|
|
912
|
+
};
|
|
913
|
+
});
|
|
914
|
+
pluginManager.addToExtensionPoint('Core-guessTrackTypeForLocation', function (trackTypeGuesser) {
|
|
915
|
+
return function (adapterName) {
|
|
916
|
+
if (adapterName === 'IndexedFastaAdapter') {
|
|
917
|
+
return 'ReferenceSequenceTrack';
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
return trackTypeGuesser(adapterName);
|
|
921
|
+
};
|
|
922
|
+
});
|
|
845
923
|
pluginManager.addAdapterType(function () {
|
|
846
924
|
return new AdapterType({
|
|
847
925
|
name: 'BgzipFastaAdapter',
|
|
848
926
|
configSchema: bgzipFastaAdapterConfigSchema,
|
|
927
|
+
adapterMetadata: {
|
|
928
|
+
category: null,
|
|
929
|
+
hiddenFromGUI: true,
|
|
930
|
+
displayName: null,
|
|
931
|
+
description: null
|
|
932
|
+
},
|
|
849
933
|
getAdapterClass: function getAdapterClass() {
|
|
850
934
|
return Promise.resolve().then(function () { return BgzipFastaAdapter; }).then(function (r) {
|
|
851
935
|
return r["default"];
|
|
@@ -853,9 +937,41 @@ var SequencePlugin = /*#__PURE__*/function (_Plugin) {
|
|
|
853
937
|
}
|
|
854
938
|
});
|
|
855
939
|
});
|
|
940
|
+
pluginManager.addToExtensionPoint('Core-guessAdapterForLocation', function (adapterGuesser) {
|
|
941
|
+
return function (file, index, adapterHint) {
|
|
942
|
+
var regexGuess = /\.(fa|fasta|fas|fna|mfa)\.b?gz$/i;
|
|
943
|
+
var adapterName = 'BgzipFastaAdapter';
|
|
944
|
+
var fileName = tracks.getFileName(file);
|
|
945
|
+
|
|
946
|
+
if (regexGuess.test(fileName) || adapterHint === adapterName) {
|
|
947
|
+
return {
|
|
948
|
+
type: adapterName,
|
|
949
|
+
faiLocation: tracks.makeIndex(file, '.fai'),
|
|
950
|
+
gziLocation: tracks.makeIndex(file, '.gzi')
|
|
951
|
+
};
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
return adapterGuesser(file, index, adapterHint);
|
|
955
|
+
};
|
|
956
|
+
});
|
|
957
|
+
pluginManager.addToExtensionPoint('Core-guessTrackTypeForLocation', function (trackTypeGuesser) {
|
|
958
|
+
return function (adapterName) {
|
|
959
|
+
if (adapterName === 'BgzipFastaAdapter') {
|
|
960
|
+
return 'ReferenceSequenceTrack';
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
return trackTypeGuesser(adapterName);
|
|
964
|
+
};
|
|
965
|
+
});
|
|
856
966
|
pluginManager.addAdapterType(function () {
|
|
857
967
|
return new AdapterType(_objectSpread2({
|
|
858
|
-
name: 'GCContentAdapter'
|
|
968
|
+
name: 'GCContentAdapter',
|
|
969
|
+
adapterMetadata: {
|
|
970
|
+
category: null,
|
|
971
|
+
hiddenFromGUI: true,
|
|
972
|
+
displayName: null,
|
|
973
|
+
description: null
|
|
974
|
+
}
|
|
859
975
|
}, pluginManager.load(GCContentAdapterF)));
|
|
860
976
|
});
|
|
861
977
|
pluginManager.addTrackType(function () {
|
|
@@ -988,11 +1104,9 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
988
1104
|
|
|
989
1105
|
|
|
990
1106
|
var IteratorPrototype = {};
|
|
991
|
-
|
|
992
|
-
IteratorPrototype[iteratorSymbol] = function () {
|
|
1107
|
+
define(IteratorPrototype, iteratorSymbol, function () {
|
|
993
1108
|
return this;
|
|
994
|
-
};
|
|
995
|
-
|
|
1109
|
+
});
|
|
996
1110
|
var getProto = Object.getPrototypeOf;
|
|
997
1111
|
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
998
1112
|
|
|
@@ -1003,8 +1117,9 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
1003
1117
|
}
|
|
1004
1118
|
|
|
1005
1119
|
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
1006
|
-
GeneratorFunction.prototype =
|
|
1007
|
-
|
|
1120
|
+
GeneratorFunction.prototype = GeneratorFunctionPrototype;
|
|
1121
|
+
define(Gp, "constructor", GeneratorFunctionPrototype);
|
|
1122
|
+
define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
|
|
1008
1123
|
GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"); // Helper for defining the .next, .throw, and .return methods of the
|
|
1009
1124
|
// Iterator interface in terms of a single ._invoke method.
|
|
1010
1125
|
|
|
@@ -1109,11 +1224,9 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
1109
1224
|
}
|
|
1110
1225
|
|
|
1111
1226
|
defineIteratorMethods(AsyncIterator.prototype);
|
|
1112
|
-
|
|
1113
|
-
AsyncIterator.prototype[asyncIteratorSymbol] = function () {
|
|
1227
|
+
define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
1114
1228
|
return this;
|
|
1115
|
-
};
|
|
1116
|
-
|
|
1229
|
+
});
|
|
1117
1230
|
exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of
|
|
1118
1231
|
// AsyncIterator objects; they just return a Promise for the value of
|
|
1119
1232
|
// the final result produced by the iterator.
|
|
@@ -1290,13 +1403,12 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
1290
1403
|
// object to not be returned from this call. This ensures that doesn't happen.
|
|
1291
1404
|
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
1292
1405
|
|
|
1293
|
-
Gp
|
|
1406
|
+
define(Gp, iteratorSymbol, function () {
|
|
1294
1407
|
return this;
|
|
1295
|
-
};
|
|
1296
|
-
|
|
1297
|
-
Gp.toString = function () {
|
|
1408
|
+
});
|
|
1409
|
+
define(Gp, "toString", function () {
|
|
1298
1410
|
return "[object Generator]";
|
|
1299
|
-
};
|
|
1411
|
+
});
|
|
1300
1412
|
|
|
1301
1413
|
function pushTryEntry(locs) {
|
|
1302
1414
|
var entry = {
|
|
@@ -1608,14 +1720,19 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
1608
1720
|
} catch (accidentalStrictMode) {
|
|
1609
1721
|
// This module should not be running in strict mode, so the above
|
|
1610
1722
|
// assignment should always work unless something is misconfigured. Just
|
|
1611
|
-
// in case runtime.js accidentally runs in strict mode,
|
|
1723
|
+
// in case runtime.js accidentally runs in strict mode, in modern engines
|
|
1724
|
+
// we can explicitly access globalThis. In older engines we can escape
|
|
1612
1725
|
// strict mode using a global Function call. This could conceivably fail
|
|
1613
1726
|
// if a Content Security Policy forbids using Function, but in that case
|
|
1614
1727
|
// the proper solution is to fix the accidental strict mode problem. If
|
|
1615
1728
|
// you've misconfigured your bundler to force strict mode and applied a
|
|
1616
1729
|
// CSP to forbid Function, and you're not willing to fix either of those
|
|
1617
1730
|
// problems, please detail your unique predicament in a GitHub issue.
|
|
1618
|
-
|
|
1731
|
+
if (typeof globalThis === "object") {
|
|
1732
|
+
globalThis.regeneratorRuntime = runtime;
|
|
1733
|
+
} else {
|
|
1734
|
+
Function("r", "regeneratorRuntime = r")(runtime);
|
|
1735
|
+
}
|
|
1619
1736
|
}
|
|
1620
1737
|
});
|
|
1621
1738
|
|
|
@@ -1824,9 +1941,9 @@ var default_1 = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
|
1824
1941
|
|
|
1825
1942
|
}, {
|
|
1826
1943
|
key: "freeResources",
|
|
1827
|
-
value: function
|
|
1828
|
-
|
|
1829
|
-
{}
|
|
1944
|
+
value: function
|
|
1945
|
+
/* { region } */
|
|
1946
|
+
freeResources() {}
|
|
1830
1947
|
}]);
|
|
1831
1948
|
|
|
1832
1949
|
return default_1;
|
|
@@ -1843,15 +1960,15 @@ var TwoBitAdapter = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
|
1843
1960
|
|
|
1844
1961
|
var _super = /*#__PURE__*/_createSuper(TwoBitAdapter);
|
|
1845
1962
|
|
|
1846
|
-
function TwoBitAdapter(config) {
|
|
1963
|
+
function TwoBitAdapter(config, getSubAdapter, pluginManager) {
|
|
1847
1964
|
var _this;
|
|
1848
1965
|
|
|
1849
1966
|
_classCallCheck(this, TwoBitAdapter);
|
|
1850
1967
|
|
|
1851
|
-
_this = _super.call(this, config);
|
|
1968
|
+
_this = _super.call(this, config, getSubAdapter, pluginManager);
|
|
1852
1969
|
_this.chromSizesData = _this.initChromSizes();
|
|
1853
1970
|
_this.twobit = new twobit.TwoBitFile({
|
|
1854
|
-
filehandle: io.openLocation(configuration.readConfObject(config, 'twoBitLocation'))
|
|
1971
|
+
filehandle: io.openLocation(configuration.readConfObject(config, 'twoBitLocation'), _this.pluginManager)
|
|
1855
1972
|
});
|
|
1856
1973
|
return _this;
|
|
1857
1974
|
}
|
|
@@ -1874,7 +1991,7 @@ var TwoBitAdapter = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
|
1874
1991
|
break;
|
|
1875
1992
|
}
|
|
1876
1993
|
|
|
1877
|
-
file = io.openLocation(conf);
|
|
1994
|
+
file = io.openLocation(conf, this.pluginManager);
|
|
1878
1995
|
_context.next = 5;
|
|
1879
1996
|
return file.readFile('utf8');
|
|
1880
1997
|
|
|
@@ -2071,9 +2188,9 @@ var TwoBitAdapter = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
|
2071
2188
|
|
|
2072
2189
|
}, {
|
|
2073
2190
|
key: "freeResources",
|
|
2074
|
-
value: function
|
|
2075
|
-
|
|
2076
|
-
{}
|
|
2191
|
+
value: function
|
|
2192
|
+
/* { region } */
|
|
2193
|
+
freeResources() {}
|
|
2077
2194
|
}]);
|
|
2078
2195
|
|
|
2079
2196
|
return TwoBitAdapter;
|
|
@@ -2089,19 +2206,19 @@ var _default = /*#__PURE__*/function (_BaseAdapter) {
|
|
|
2089
2206
|
|
|
2090
2207
|
var _super = /*#__PURE__*/_createSuper(_default);
|
|
2091
2208
|
|
|
2092
|
-
function _default(config) {
|
|
2209
|
+
function _default(config, getSubAdapter, pluginManager) {
|
|
2093
2210
|
var _this;
|
|
2094
2211
|
|
|
2095
2212
|
_classCallCheck(this, _default);
|
|
2096
2213
|
|
|
2097
|
-
_this = _super.call(this, config);
|
|
2214
|
+
_this = _super.call(this, config, getSubAdapter, pluginManager);
|
|
2098
2215
|
var chromSizesLocation = configuration.readConfObject(config, 'chromSizesLocation');
|
|
2099
2216
|
|
|
2100
2217
|
if (!chromSizesLocation) {
|
|
2101
2218
|
throw new Error('must provide chromSizesLocation');
|
|
2102
2219
|
}
|
|
2103
2220
|
|
|
2104
|
-
var file = io.openLocation(chromSizesLocation);
|
|
2221
|
+
var file = io.openLocation(chromSizesLocation, _this.pluginManager);
|
|
2105
2222
|
_this.source = file.toString();
|
|
2106
2223
|
_this.refSeqs = _this.init(file);
|
|
2107
2224
|
return _this;
|
|
@@ -2200,9 +2317,9 @@ var _default = /*#__PURE__*/function (_BaseAdapter) {
|
|
|
2200
2317
|
}
|
|
2201
2318
|
}, {
|
|
2202
2319
|
key: "freeResources",
|
|
2203
|
-
value: function
|
|
2204
|
-
|
|
2205
|
-
{}
|
|
2320
|
+
value: function
|
|
2321
|
+
/* { region } */
|
|
2322
|
+
freeResources() {}
|
|
2206
2323
|
}]);
|
|
2207
2324
|
|
|
2208
2325
|
return _default;
|
|
@@ -2218,12 +2335,12 @@ var _default$1 = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
|
2218
2335
|
|
|
2219
2336
|
var _super = /*#__PURE__*/_createSuper(_default);
|
|
2220
2337
|
|
|
2221
|
-
function _default(config) {
|
|
2338
|
+
function _default(config, getSubAdapter, pluginManager) {
|
|
2222
2339
|
var _this;
|
|
2223
2340
|
|
|
2224
2341
|
_classCallCheck(this, _default);
|
|
2225
2342
|
|
|
2226
|
-
_this = _super.call(this, config);
|
|
2343
|
+
_this = _super.call(this, config, getSubAdapter, pluginManager);
|
|
2227
2344
|
_this.seqCache = new AbortablePromiseCache({
|
|
2228
2345
|
cache: new LRU({
|
|
2229
2346
|
maxSize: 200
|
|
@@ -2258,8 +2375,8 @@ var _default$1 = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
|
2258
2375
|
var fastaLocation = configuration.readConfObject(config, 'fastaLocation');
|
|
2259
2376
|
var faiLocation = configuration.readConfObject(config, 'faiLocation');
|
|
2260
2377
|
var fastaOpts = {
|
|
2261
|
-
fasta: io.openLocation(fastaLocation),
|
|
2262
|
-
fai: io.openLocation(faiLocation)
|
|
2378
|
+
fasta: io.openLocation(fastaLocation, _this.pluginManager),
|
|
2379
|
+
fai: io.openLocation(faiLocation, _this.pluginManager)
|
|
2263
2380
|
};
|
|
2264
2381
|
_this.fasta = new indexedfasta.IndexedFasta(fastaOpts);
|
|
2265
2382
|
return _this;
|
|
@@ -2388,9 +2505,9 @@ var _default$1 = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
|
2388
2505
|
|
|
2389
2506
|
}, {
|
|
2390
2507
|
key: "freeResources",
|
|
2391
|
-
value: function
|
|
2392
|
-
|
|
2393
|
-
{}
|
|
2508
|
+
value: function
|
|
2509
|
+
/* { region } */
|
|
2510
|
+
freeResources() {}
|
|
2394
2511
|
}]);
|
|
2395
2512
|
|
|
2396
2513
|
return _default;
|
|
@@ -2406,12 +2523,12 @@ var _default$2 = /*#__PURE__*/function (_IndexedFasta) {
|
|
|
2406
2523
|
|
|
2407
2524
|
var _super = /*#__PURE__*/_createSuper(_default);
|
|
2408
2525
|
|
|
2409
|
-
function _default(config) {
|
|
2526
|
+
function _default(config, getSubAdapter, pluginManager) {
|
|
2410
2527
|
var _this;
|
|
2411
2528
|
|
|
2412
2529
|
_classCallCheck(this, _default);
|
|
2413
2530
|
|
|
2414
|
-
_this = _super.call(this, config);
|
|
2531
|
+
_this = _super.call(this, config, getSubAdapter, pluginManager);
|
|
2415
2532
|
var fastaLocation = configuration.readConfObject(config, 'fastaLocation');
|
|
2416
2533
|
var faiLocation = configuration.readConfObject(config, 'faiLocation');
|
|
2417
2534
|
var gziLocation = configuration.readConfObject(config, 'gziLocation');
|
|
@@ -2429,9 +2546,9 @@ var _default$2 = /*#__PURE__*/function (_IndexedFasta) {
|
|
|
2429
2546
|
}
|
|
2430
2547
|
|
|
2431
2548
|
var fastaOpts = {
|
|
2432
|
-
fasta: io.openLocation(fastaLocation),
|
|
2433
|
-
fai: io.openLocation(faiLocation),
|
|
2434
|
-
gzi: io.openLocation(gziLocation)
|
|
2549
|
+
fasta: io.openLocation(fastaLocation, _this.pluginManager),
|
|
2550
|
+
fai: io.openLocation(faiLocation, _this.pluginManager),
|
|
2551
|
+
gzi: io.openLocation(gziLocation, _this.pluginManager)
|
|
2435
2552
|
};
|
|
2436
2553
|
_this.fasta = new indexedfasta.BgzipIndexedFasta(fastaOpts);
|
|
2437
2554
|
return _this;
|