@jbrowse/plugin-sequence 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/dist/BgzipFastaAdapter/configSchema.d.ts +0 -12
- package/dist/BgzipFastaAdapter/configSchema.js +1 -16
- package/dist/BgzipFastaAdapter/index.d.ts +1 -1
- package/dist/BgzipFastaAdapter/index.js +28 -16
- package/dist/ChromSizesAdapter/ChromSizesAdapter.d.ts +2 -1
- package/dist/ChromSizesAdapter/ChromSizesAdapter.js +1 -1
- package/dist/ChromSizesAdapter/configSchema.d.ts +0 -3
- package/dist/ChromSizesAdapter/configSchema.js +1 -7
- package/dist/ChromSizesAdapter/index.d.ts +1 -1
- package/dist/ChromSizesAdapter/index.js +17 -7
- package/dist/DivSequenceRenderer/components/DivSequenceRendering.d.ts +4 -5
- package/dist/DivSequenceRenderer/components/DivSequenceRendering.js +29 -48
- package/dist/DivSequenceRenderer/configSchema.d.ts +0 -3
- package/dist/DivSequenceRenderer/configSchema.js +1 -7
- package/dist/DivSequenceRenderer/index.d.ts +1 -1
- package/dist/DivSequenceRenderer/index.js +0 -1
- package/dist/IndexedFastaAdapter/IndexedFastaAdapter.d.ts +6 -10
- package/dist/IndexedFastaAdapter/IndexedFastaAdapter.js +46 -40
- package/dist/IndexedFastaAdapter/configSchema.d.ts +0 -9
- package/dist/IndexedFastaAdapter/configSchema.js +1 -13
- package/dist/IndexedFastaAdapter/index.d.ts +1 -1
- package/dist/IndexedFastaAdapter/index.js +28 -16
- package/dist/LinearReferenceSequenceDisplay/configSchema.d.ts +0 -3
- package/dist/LinearReferenceSequenceDisplay/configSchema.js +1 -7
- package/dist/LinearReferenceSequenceDisplay/index.d.ts +1 -1
- package/dist/LinearReferenceSequenceDisplay/model.d.ts +17 -98
- package/dist/LinearReferenceSequenceDisplay/model.js +4 -65
- package/dist/ReferenceSequenceTrack/configSchema.d.ts +1 -27
- package/dist/ReferenceSequenceTrack/configSchema.js +2 -42
- package/dist/ReferenceSequenceTrack/index.d.ts +1 -1
- package/dist/SequenceSearchAdapter/SequenceSearchAdapter.d.ts +3 -2
- package/dist/SequenceSearchAdapter/SequenceSearchAdapter.js +2 -2
- package/dist/SequenceSearchAdapter/configSchema.d.ts +0 -15
- package/dist/SequenceSearchAdapter/configSchema.js +1 -19
- package/dist/SequenceSearchAdapter/index.d.ts +1 -1
- package/dist/SequenceSearchAdapter/index.js +28 -16
- package/dist/TwoBitAdapter/TwoBitAdapter.d.ts +22 -19
- package/dist/TwoBitAdapter/TwoBitAdapter.js +35 -37
- package/dist/TwoBitAdapter/configSchema.d.ts +0 -6
- package/dist/TwoBitAdapter/configSchema.js +1 -10
- package/dist/TwoBitAdapter/index.d.ts +1 -1
- package/dist/TwoBitAdapter/index.js +17 -7
- package/dist/UnindexedFastaAdapter/UnindexedFastaAdapter.d.ts +4 -3
- package/dist/UnindexedFastaAdapter/UnindexedFastaAdapter.js +3 -3
- package/dist/UnindexedFastaAdapter/configSchema.d.ts +0 -6
- package/dist/UnindexedFastaAdapter/configSchema.js +1 -10
- package/dist/UnindexedFastaAdapter/index.d.ts +1 -1
- package/dist/UnindexedFastaAdapter/index.js +28 -16
- package/dist/createExtensionPoints.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -5
- package/esm/BgzipFastaAdapter/configSchema.d.ts +0 -12
- package/esm/BgzipFastaAdapter/configSchema.js +1 -16
- package/esm/BgzipFastaAdapter/index.d.ts +1 -1
- package/esm/BgzipFastaAdapter/index.js +11 -9
- package/esm/ChromSizesAdapter/ChromSizesAdapter.d.ts +2 -1
- package/esm/ChromSizesAdapter/ChromSizesAdapter.js +2 -2
- package/esm/ChromSizesAdapter/configSchema.d.ts +0 -3
- package/esm/ChromSizesAdapter/configSchema.js +1 -7
- package/esm/ChromSizesAdapter/index.d.ts +1 -1
- package/esm/DivSequenceRenderer/components/DivSequenceRendering.d.ts +4 -5
- package/esm/DivSequenceRenderer/components/DivSequenceRendering.js +29 -45
- package/esm/DivSequenceRenderer/configSchema.d.ts +0 -3
- package/esm/DivSequenceRenderer/configSchema.js +1 -7
- package/esm/DivSequenceRenderer/index.d.ts +1 -1
- package/esm/DivSequenceRenderer/index.js +0 -1
- package/esm/IndexedFastaAdapter/IndexedFastaAdapter.d.ts +6 -10
- package/esm/IndexedFastaAdapter/IndexedFastaAdapter.js +47 -41
- package/esm/IndexedFastaAdapter/configSchema.d.ts +0 -9
- package/esm/IndexedFastaAdapter/configSchema.js +1 -13
- package/esm/IndexedFastaAdapter/index.d.ts +1 -1
- package/esm/IndexedFastaAdapter/index.js +11 -9
- package/esm/LinearReferenceSequenceDisplay/configSchema.d.ts +0 -3
- package/esm/LinearReferenceSequenceDisplay/configSchema.js +1 -7
- package/esm/LinearReferenceSequenceDisplay/index.d.ts +1 -1
- package/esm/LinearReferenceSequenceDisplay/model.d.ts +17 -98
- package/esm/LinearReferenceSequenceDisplay/model.js +5 -66
- package/esm/ReferenceSequenceTrack/configSchema.d.ts +1 -27
- package/esm/ReferenceSequenceTrack/configSchema.js +2 -42
- package/esm/ReferenceSequenceTrack/index.d.ts +1 -1
- package/esm/SequenceSearchAdapter/SequenceSearchAdapter.d.ts +3 -2
- package/esm/SequenceSearchAdapter/SequenceSearchAdapter.js +3 -3
- package/esm/SequenceSearchAdapter/configSchema.d.ts +0 -15
- package/esm/SequenceSearchAdapter/configSchema.js +1 -19
- package/esm/SequenceSearchAdapter/index.d.ts +1 -1
- package/esm/SequenceSearchAdapter/index.js +11 -9
- package/esm/TwoBitAdapter/TwoBitAdapter.d.ts +22 -19
- package/esm/TwoBitAdapter/TwoBitAdapter.js +35 -37
- package/esm/TwoBitAdapter/configSchema.d.ts +0 -6
- package/esm/TwoBitAdapter/configSchema.js +1 -10
- package/esm/TwoBitAdapter/index.d.ts +1 -1
- package/esm/UnindexedFastaAdapter/UnindexedFastaAdapter.d.ts +4 -3
- package/esm/UnindexedFastaAdapter/UnindexedFastaAdapter.js +4 -4
- package/esm/UnindexedFastaAdapter/configSchema.d.ts +0 -6
- package/esm/UnindexedFastaAdapter/configSchema.js +1 -10
- package/esm/UnindexedFastaAdapter/index.d.ts +1 -1
- package/esm/UnindexedFastaAdapter/index.js +11 -9
- package/esm/createExtensionPoints.d.ts +1 -1
- package/esm/createExtensionPoints.js +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.js +5 -5
- package/package.json +4 -4
|
@@ -1,43 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
4
|
-
|
|
5
|
-
* #config SequenceSearchAdapter
|
|
6
|
-
*/
|
|
7
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
4
|
+
function x() { }
|
|
8
5
|
const configSchema = (0, configuration_1.ConfigurationSchema)('SequenceSearchAdapter', {
|
|
9
|
-
/**
|
|
10
|
-
* #slot
|
|
11
|
-
*/
|
|
12
6
|
search: {
|
|
13
7
|
type: 'string',
|
|
14
8
|
defaultValue: '',
|
|
15
9
|
description: 'Search string or regex to search for',
|
|
16
10
|
},
|
|
17
|
-
/**
|
|
18
|
-
* #slot
|
|
19
|
-
*/
|
|
20
11
|
sequenceAdapter: {
|
|
21
12
|
type: 'frozen',
|
|
22
13
|
defaultValue: null,
|
|
23
14
|
},
|
|
24
|
-
/**
|
|
25
|
-
* #slot
|
|
26
|
-
*/
|
|
27
15
|
searchForward: {
|
|
28
16
|
type: 'boolean',
|
|
29
17
|
defaultValue: true,
|
|
30
18
|
},
|
|
31
|
-
/**
|
|
32
|
-
* #slot
|
|
33
|
-
*/
|
|
34
19
|
searchReverse: {
|
|
35
20
|
type: 'boolean',
|
|
36
21
|
defaultValue: true,
|
|
37
22
|
},
|
|
38
|
-
/**
|
|
39
|
-
* #slot
|
|
40
|
-
*/
|
|
41
23
|
caseInsensitive: {
|
|
42
24
|
type: 'boolean',
|
|
43
25
|
defaultValue: true,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function SequenceSearchAdapterF(pluginManager: PluginManager): void;
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -30,13 +40,15 @@ exports.default = SequenceSearchAdapterF;
|
|
|
30
40
|
const AdapterType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/AdapterType"));
|
|
31
41
|
const configSchema_1 = __importDefault(require("./configSchema"));
|
|
32
42
|
function SequenceSearchAdapterF(pluginManager) {
|
|
33
|
-
pluginManager.addAdapterType(() =>
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
43
|
+
pluginManager.addAdapterType(() => {
|
|
44
|
+
return new AdapterType_1.default({
|
|
45
|
+
name: 'SequenceSearchAdapter',
|
|
46
|
+
displayName: 'Sequence search adapter',
|
|
47
|
+
adapterMetadata: {
|
|
48
|
+
hiddenFromGUI: true,
|
|
49
|
+
},
|
|
50
|
+
configSchema: configSchema_1.default,
|
|
51
|
+
getAdapterClass: () => Promise.resolve().then(() => __importStar(require('./SequenceSearchAdapter'))).then(r => r.default),
|
|
52
|
+
});
|
|
53
|
+
});
|
|
42
54
|
}
|
|
@@ -1,26 +1,29 @@
|
|
|
1
|
+
import { TwoBitFile } from '@gmod/twobit';
|
|
1
2
|
import { BaseSequenceAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
5
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
6
|
-
import { getSubAdapterType } from '@jbrowse/core/data_adapters/dataAdapterCache';
|
|
3
|
+
import type { Feature } from '@jbrowse/core/util/simpleFeature';
|
|
4
|
+
import type { NoAssemblyRegion } from '@jbrowse/core/util/types';
|
|
7
5
|
export default class TwoBitAdapter extends BaseSequenceAdapter {
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
protected setupP?: Promise<{
|
|
7
|
+
twobit: TwoBitFile;
|
|
8
|
+
chromSizesData: Record<string, number> | undefined;
|
|
9
|
+
}>;
|
|
10
10
|
private initChromSizes;
|
|
11
|
-
|
|
11
|
+
setupPre(): Promise<{
|
|
12
|
+
twobit: TwoBitFile;
|
|
13
|
+
chromSizesData: {
|
|
14
|
+
[k: string]: number;
|
|
15
|
+
} | undefined;
|
|
16
|
+
}>;
|
|
17
|
+
setup(): Promise<{
|
|
18
|
+
twobit: TwoBitFile;
|
|
19
|
+
chromSizesData: Record<string, number> | undefined;
|
|
20
|
+
}>;
|
|
12
21
|
getRefNames(): Promise<string[]>;
|
|
13
|
-
getRegions(): Promise<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
*/
|
|
22
|
+
getRegions(): Promise<{
|
|
23
|
+
refName: string;
|
|
24
|
+
start: number;
|
|
25
|
+
end: number;
|
|
26
|
+
}[]>;
|
|
19
27
|
getFeatures({ refName, start, end }: NoAssemblyRegion): import("rxjs").Observable<Feature>;
|
|
20
|
-
/**
|
|
21
|
-
* called to provide a hint that data tied to a certain region
|
|
22
|
-
* will not be needed for the foreseeable future and can be purged
|
|
23
|
-
* from caches, etc
|
|
24
|
-
*/
|
|
25
28
|
freeResources(): void;
|
|
26
29
|
}
|
|
@@ -3,18 +3,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const twobit_1 = require("@gmod/twobit");
|
|
7
|
+
const configuration_1 = require("@jbrowse/core/configuration");
|
|
6
8
|
const BaseAdapter_1 = require("@jbrowse/core/data_adapters/BaseAdapter");
|
|
7
9
|
const io_1 = require("@jbrowse/core/util/io");
|
|
8
10
|
const rxjs_1 = require("@jbrowse/core/util/rxjs");
|
|
9
11
|
const simpleFeature_1 = __importDefault(require("@jbrowse/core/util/simpleFeature"));
|
|
10
|
-
const twobit_1 = require("@gmod/twobit");
|
|
11
|
-
const configuration_1 = require("@jbrowse/core/configuration");
|
|
12
12
|
class TwoBitAdapter extends BaseAdapter_1.BaseSequenceAdapter {
|
|
13
13
|
async initChromSizes() {
|
|
14
14
|
const conf = (0, configuration_1.readConfObject)(this.config, 'chromSizesLocation');
|
|
15
|
-
// check against default and empty in case someone makes the field blank in
|
|
16
|
-
// config editor, may want better way to check "optional config slots" in
|
|
17
|
-
// future
|
|
18
15
|
if (conf.uri !== '/path/to/default.chrom.sizes' && conf.uri !== '') {
|
|
19
16
|
const file = (0, io_1.openLocation)(conf, this.pluginManager);
|
|
20
17
|
const data = await file.readFile('utf8');
|
|
@@ -28,23 +25,31 @@ class TwoBitAdapter extends BaseAdapter_1.BaseSequenceAdapter {
|
|
|
28
25
|
}
|
|
29
26
|
return undefined;
|
|
30
27
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
28
|
+
async setupPre() {
|
|
29
|
+
return {
|
|
30
|
+
twobit: new twobit_1.TwoBitFile({
|
|
31
|
+
filehandle: (0, io_1.openLocation)(this.getConf('twoBitLocation'), this.pluginManager),
|
|
32
|
+
}),
|
|
33
|
+
chromSizesData: await this.initChromSizes(),
|
|
34
|
+
};
|
|
38
35
|
}
|
|
39
|
-
async
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
async setup() {
|
|
37
|
+
if (!this.setupP) {
|
|
38
|
+
this.setupP = this.setupPre().catch((e) => {
|
|
39
|
+
this.setupP = undefined;
|
|
40
|
+
throw e;
|
|
41
|
+
});
|
|
43
42
|
}
|
|
44
|
-
return this.
|
|
43
|
+
return this.setupP;
|
|
44
|
+
}
|
|
45
|
+
async getRefNames() {
|
|
46
|
+
const { chromSizesData, twobit } = await this.setup();
|
|
47
|
+
return chromSizesData
|
|
48
|
+
? Object.keys(chromSizesData)
|
|
49
|
+
: twobit.getSequenceNames();
|
|
45
50
|
}
|
|
46
51
|
async getRegions() {
|
|
47
|
-
const chromSizesData = await this.
|
|
52
|
+
const { chromSizesData, twobit } = await this.setup();
|
|
48
53
|
if (chromSizesData) {
|
|
49
54
|
return Object.keys(chromSizesData).map(refName => ({
|
|
50
55
|
refName,
|
|
@@ -52,23 +57,21 @@ class TwoBitAdapter extends BaseAdapter_1.BaseSequenceAdapter {
|
|
|
52
57
|
end: chromSizesData[refName],
|
|
53
58
|
}));
|
|
54
59
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
refName
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
else {
|
|
61
|
+
const refSizes = await twobit.getSequenceSizes();
|
|
62
|
+
return Object.keys(refSizes).map(refName => ({
|
|
63
|
+
refName,
|
|
64
|
+
start: 0,
|
|
65
|
+
end: refSizes[refName],
|
|
66
|
+
}));
|
|
67
|
+
}
|
|
61
68
|
}
|
|
62
|
-
/**
|
|
63
|
-
* Fetch features for a certain region
|
|
64
|
-
* @param param -
|
|
65
|
-
* @returns Observable of Feature objects in the region
|
|
66
|
-
*/
|
|
67
69
|
getFeatures({ refName, start, end }) {
|
|
68
70
|
return (0, rxjs_1.ObservableCreate)(async (observer) => {
|
|
69
|
-
const
|
|
71
|
+
const { twobit } = await this.setup();
|
|
72
|
+
const size = await twobit.getSequenceSize(refName);
|
|
70
73
|
const regionEnd = size !== undefined ? Math.min(size, end) : end;
|
|
71
|
-
const seq = await
|
|
74
|
+
const seq = await twobit.getSequence(refName, start, regionEnd);
|
|
72
75
|
if (seq) {
|
|
73
76
|
observer.next(new simpleFeature_1.default({
|
|
74
77
|
id: `${refName} ${start}-${regionEnd}`,
|
|
@@ -78,11 +81,6 @@ class TwoBitAdapter extends BaseAdapter_1.BaseSequenceAdapter {
|
|
|
78
81
|
observer.complete();
|
|
79
82
|
});
|
|
80
83
|
}
|
|
81
|
-
|
|
82
|
-
* called to provide a hint that data tied to a certain region
|
|
83
|
-
* will not be needed for the foreseeable future and can be purged
|
|
84
|
-
* from caches, etc
|
|
85
|
-
*/
|
|
86
|
-
freeResources( /* { region } */) { }
|
|
84
|
+
freeResources() { }
|
|
87
85
|
}
|
|
88
86
|
exports.default = TwoBitAdapter;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
declare const TwoBitAdapter: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
|
-
/**
|
|
3
|
-
* #slot
|
|
4
|
-
*/
|
|
5
2
|
twoBitLocation: {
|
|
6
3
|
type: string;
|
|
7
4
|
defaultValue: {
|
|
@@ -9,9 +6,6 @@ declare const TwoBitAdapter: import("@jbrowse/core/configuration/configurationSc
|
|
|
9
6
|
locationType: string;
|
|
10
7
|
};
|
|
11
8
|
};
|
|
12
|
-
/**
|
|
13
|
-
* #slot
|
|
14
|
-
*/
|
|
15
9
|
chromSizesLocation: {
|
|
16
10
|
type: string;
|
|
17
11
|
defaultValue: {
|
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
4
|
-
|
|
5
|
-
* #config TwoBitAdapter
|
|
6
|
-
*/
|
|
7
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
4
|
+
function x() { }
|
|
8
5
|
const TwoBitAdapter = (0, configuration_1.ConfigurationSchema)('TwoBitAdapter', {
|
|
9
|
-
/**
|
|
10
|
-
* #slot
|
|
11
|
-
*/
|
|
12
6
|
twoBitLocation: {
|
|
13
7
|
type: 'fileLocation',
|
|
14
8
|
defaultValue: { uri: '/path/to/my.2bit', locationType: 'UriLocation' },
|
|
15
9
|
},
|
|
16
|
-
/**
|
|
17
|
-
* #slot
|
|
18
|
-
*/
|
|
19
10
|
chromSizesLocation: {
|
|
20
11
|
type: 'fileLocation',
|
|
21
12
|
defaultValue: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function TwoBitAdapterF(pluginManager: PluginManager): void;
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { BaseSequenceAdapter
|
|
2
|
-
import {
|
|
3
|
-
import { Feature } from '@jbrowse/core/util';
|
|
1
|
+
import { BaseSequenceAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
2
|
+
import type { BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
3
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
4
|
+
import type { NoAssemblyRegion } from '@jbrowse/core/util/types';
|
|
4
5
|
declare function parseSmallFasta(text: string): Map<string, {
|
|
5
6
|
readonly description: string;
|
|
6
7
|
readonly sequence: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const configuration_1 = require("@jbrowse/core/configuration");
|
|
3
4
|
const BaseAdapter_1 = require("@jbrowse/core/data_adapters/BaseAdapter");
|
|
5
|
+
const util_1 = require("@jbrowse/core/util");
|
|
4
6
|
const io_1 = require("@jbrowse/core/util/io");
|
|
5
7
|
const rxjs_1 = require("@jbrowse/core/util/rxjs");
|
|
6
|
-
const util_1 = require("@jbrowse/core/util");
|
|
7
|
-
const configuration_1 = require("@jbrowse/core/configuration");
|
|
8
8
|
function parseSmallFasta(text) {
|
|
9
9
|
return new Map(text
|
|
10
10
|
.split('>')
|
|
@@ -82,6 +82,6 @@ class UnindexedFastaAdapter extends BaseAdapter_1.BaseSequenceAdapter {
|
|
|
82
82
|
observer.complete();
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
|
-
freeResources(
|
|
85
|
+
freeResources() { }
|
|
86
86
|
}
|
|
87
87
|
exports.default = UnindexedFastaAdapter;
|
|
@@ -4,9 +4,6 @@ declare const UnindexedFastaAdapter: import("@jbrowse/core/configuration/configu
|
|
|
4
4
|
defaultValue: string;
|
|
5
5
|
contextVariable: string[];
|
|
6
6
|
};
|
|
7
|
-
/**
|
|
8
|
-
* #slot
|
|
9
|
-
*/
|
|
10
7
|
fastaLocation: {
|
|
11
8
|
type: string;
|
|
12
9
|
defaultValue: {
|
|
@@ -14,9 +11,6 @@ declare const UnindexedFastaAdapter: import("@jbrowse/core/configuration/configu
|
|
|
14
11
|
locationType: string;
|
|
15
12
|
};
|
|
16
13
|
};
|
|
17
|
-
/**
|
|
18
|
-
* #slot
|
|
19
|
-
*/
|
|
20
14
|
metadataLocation: {
|
|
21
15
|
description: string;
|
|
22
16
|
type: string;
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
4
|
-
|
|
5
|
-
* #config UnindexedFastaAdapter
|
|
6
|
-
*/
|
|
7
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
4
|
+
function x() { }
|
|
8
5
|
const UnindexedFastaAdapter = (0, configuration_1.ConfigurationSchema)('UnindexedFastaAdapter', {
|
|
9
6
|
rewriteRefNames: {
|
|
10
7
|
type: 'string',
|
|
11
8
|
defaultValue: '',
|
|
12
9
|
contextVariable: ['refName'],
|
|
13
10
|
},
|
|
14
|
-
/**
|
|
15
|
-
* #slot
|
|
16
|
-
*/
|
|
17
11
|
fastaLocation: {
|
|
18
12
|
type: 'fileLocation',
|
|
19
13
|
defaultValue: {
|
|
@@ -21,9 +15,6 @@ const UnindexedFastaAdapter = (0, configuration_1.ConfigurationSchema)('Unindexe
|
|
|
21
15
|
locationType: 'UriLocation',
|
|
22
16
|
},
|
|
23
17
|
},
|
|
24
|
-
/**
|
|
25
|
-
* #slot
|
|
26
|
-
*/
|
|
27
18
|
metadataLocation: {
|
|
28
19
|
description: 'Optional metadata file',
|
|
29
20
|
type: 'fileLocation',
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function UnindexedFastaAdapterF(pluginManager: PluginManager): void;
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -30,13 +40,15 @@ exports.default = UnindexedFastaAdapterF;
|
|
|
30
40
|
const AdapterType_1 = __importDefault(require("@jbrowse/core/pluggableElementTypes/AdapterType"));
|
|
31
41
|
const configSchema_1 = __importDefault(require("./configSchema"));
|
|
32
42
|
function UnindexedFastaAdapterF(pluginManager) {
|
|
33
|
-
pluginManager.addAdapterType(() =>
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
43
|
+
pluginManager.addAdapterType(() => {
|
|
44
|
+
return new AdapterType_1.default({
|
|
45
|
+
name: 'UnindexedFastaAdapter',
|
|
46
|
+
displayName: 'Unindexed FASTA adapter',
|
|
47
|
+
configSchema: configSchema_1.default,
|
|
48
|
+
adapterMetadata: {
|
|
49
|
+
hiddenFromGUI: true,
|
|
50
|
+
},
|
|
51
|
+
getAdapterClass: () => Promise.resolve().then(() => __importStar(require('./UnindexedFastaAdapter'))).then(r => r.default),
|
|
52
|
+
});
|
|
53
|
+
});
|
|
42
54
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function ExtensionPointsF(pluginManager: PluginManager): void;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Plugin from '@jbrowse/core/Plugin';
|
|
2
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
2
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
3
3
|
export default class SequencePlugin extends Plugin {
|
|
4
4
|
name: string;
|
|
5
5
|
install(pluginManager: PluginManager): void;
|
package/dist/index.js
CHANGED
|
@@ -4,15 +4,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const Plugin_1 = __importDefault(require("@jbrowse/core/Plugin"));
|
|
7
|
-
const TwoBitAdapter_1 = __importDefault(require("./TwoBitAdapter"));
|
|
8
|
-
const DivSequenceRenderer_1 = __importDefault(require("./DivSequenceRenderer"));
|
|
9
7
|
const BgzipFastaAdapter_1 = __importDefault(require("./BgzipFastaAdapter"));
|
|
10
8
|
const ChromSizesAdapter_1 = __importDefault(require("./ChromSizesAdapter"));
|
|
9
|
+
const DivSequenceRenderer_1 = __importDefault(require("./DivSequenceRenderer"));
|
|
11
10
|
const IndexedFastaAdapter_1 = __importDefault(require("./IndexedFastaAdapter"));
|
|
12
|
-
const UnindexedFastaAdapter_1 = __importDefault(require("./UnindexedFastaAdapter"));
|
|
13
|
-
const SequenceSearchAdapter_1 = __importDefault(require("./SequenceSearchAdapter"));
|
|
14
|
-
const ReferenceSequenceTrack_1 = __importDefault(require("./ReferenceSequenceTrack"));
|
|
15
11
|
const LinearReferenceSequenceDisplay_1 = __importDefault(require("./LinearReferenceSequenceDisplay"));
|
|
12
|
+
const ReferenceSequenceTrack_1 = __importDefault(require("./ReferenceSequenceTrack"));
|
|
13
|
+
const SequenceSearchAdapter_1 = __importDefault(require("./SequenceSearchAdapter"));
|
|
14
|
+
const TwoBitAdapter_1 = __importDefault(require("./TwoBitAdapter"));
|
|
15
|
+
const UnindexedFastaAdapter_1 = __importDefault(require("./UnindexedFastaAdapter"));
|
|
16
16
|
const createExtensionPoints_1 = __importDefault(require("./createExtensionPoints"));
|
|
17
17
|
class SequencePlugin extends Plugin_1.default {
|
|
18
18
|
constructor() {
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
declare const BgzipFastaAdapter: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
|
-
/**
|
|
3
|
-
* #slot
|
|
4
|
-
*/
|
|
5
2
|
fastaLocation: {
|
|
6
3
|
type: string;
|
|
7
4
|
defaultValue: {
|
|
@@ -9,9 +6,6 @@ declare const BgzipFastaAdapter: import("@jbrowse/core/configuration/configurati
|
|
|
9
6
|
locationType: string;
|
|
10
7
|
};
|
|
11
8
|
};
|
|
12
|
-
/**
|
|
13
|
-
* #slot
|
|
14
|
-
*/
|
|
15
9
|
faiLocation: {
|
|
16
10
|
type: string;
|
|
17
11
|
defaultValue: {
|
|
@@ -19,9 +13,6 @@ declare const BgzipFastaAdapter: import("@jbrowse/core/configuration/configurati
|
|
|
19
13
|
locationType: string;
|
|
20
14
|
};
|
|
21
15
|
};
|
|
22
|
-
/**
|
|
23
|
-
* #slot
|
|
24
|
-
*/
|
|
25
16
|
metadataLocation: {
|
|
26
17
|
description: string;
|
|
27
18
|
type: string;
|
|
@@ -30,9 +21,6 @@ declare const BgzipFastaAdapter: import("@jbrowse/core/configuration/configurati
|
|
|
30
21
|
locationType: string;
|
|
31
22
|
};
|
|
32
23
|
};
|
|
33
|
-
/**
|
|
34
|
-
* #slot
|
|
35
|
-
*/
|
|
36
24
|
gziLocation: {
|
|
37
25
|
type: string;
|
|
38
26
|
defaultValue: {
|
|
@@ -1,19 +1,10 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
|
-
|
|
3
|
-
* #config BgzipFastaAdapter
|
|
4
|
-
*/
|
|
5
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
2
|
+
function x() { }
|
|
6
3
|
const BgzipFastaAdapter = ConfigurationSchema('BgzipFastaAdapter', {
|
|
7
|
-
/**
|
|
8
|
-
* #slot
|
|
9
|
-
*/
|
|
10
4
|
fastaLocation: {
|
|
11
5
|
type: 'fileLocation',
|
|
12
6
|
defaultValue: { uri: '/path/to/seq.fa.gz', locationType: 'UriLocation' },
|
|
13
7
|
},
|
|
14
|
-
/**
|
|
15
|
-
* #slot
|
|
16
|
-
*/
|
|
17
8
|
faiLocation: {
|
|
18
9
|
type: 'fileLocation',
|
|
19
10
|
defaultValue: {
|
|
@@ -21,9 +12,6 @@ const BgzipFastaAdapter = ConfigurationSchema('BgzipFastaAdapter', {
|
|
|
21
12
|
locationType: 'UriLocation',
|
|
22
13
|
},
|
|
23
14
|
},
|
|
24
|
-
/**
|
|
25
|
-
* #slot
|
|
26
|
-
*/
|
|
27
15
|
metadataLocation: {
|
|
28
16
|
description: 'Optional metadata file',
|
|
29
17
|
type: 'fileLocation',
|
|
@@ -32,9 +20,6 @@ const BgzipFastaAdapter = ConfigurationSchema('BgzipFastaAdapter', {
|
|
|
32
20
|
locationType: 'UriLocation',
|
|
33
21
|
},
|
|
34
22
|
},
|
|
35
|
-
/**
|
|
36
|
-
* #slot
|
|
37
|
-
*/
|
|
38
23
|
gziLocation: {
|
|
39
24
|
type: 'fileLocation',
|
|
40
25
|
defaultValue: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export default function BgzipFastaAdapterF(pluginManager: PluginManager): void;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import AdapterType from '@jbrowse/core/pluggableElementTypes/AdapterType';
|
|
2
2
|
import configSchema from './configSchema';
|
|
3
3
|
export default function BgzipFastaAdapterF(pluginManager) {
|
|
4
|
-
pluginManager.addAdapterType(() =>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
pluginManager.addAdapterType(() => {
|
|
5
|
+
return new AdapterType({
|
|
6
|
+
name: 'BgzipFastaAdapter',
|
|
7
|
+
displayName: 'Bgzip-indexed FASTA adapter',
|
|
8
|
+
configSchema,
|
|
9
|
+
adapterMetadata: {
|
|
10
|
+
hiddenFromGUI: true,
|
|
11
|
+
},
|
|
12
|
+
getAdapterClass: () => import('./BgzipFastaAdapter').then(r => r.default),
|
|
13
|
+
});
|
|
14
|
+
});
|
|
13
15
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
2
|
+
import type { RegionsAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
2
3
|
export default class ChromSizesAdapter extends BaseAdapter implements RegionsAdapter {
|
|
3
4
|
protected setupP?: Promise<Record<string, number>>;
|
|
4
5
|
setupPre(): Promise<{
|