@jbrowse/plugin-sequence 2.16.1 → 2.18.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 +11 -9
- 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/DivSequenceRenderer/components/DivSequenceRendering.d.ts +3 -3
- package/dist/DivSequenceRenderer/components/DivSequenceRendering.js +4 -10
- 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 +11 -9
- 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 +11 -88
- 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 +11 -9
- 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/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 +11 -9
- 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 +3 -3
- package/esm/DivSequenceRenderer/components/DivSequenceRendering.js +4 -10
- 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 +11 -88
- 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 +3 -3
|
@@ -1,28 +1,29 @@
|
|
|
1
|
+
import AbortablePromiseCache from '@gmod/abortable-promise-cache';
|
|
1
2
|
import { IndexedFasta } from '@gmod/indexedfasta';
|
|
2
|
-
import { BaseSequenceAdapter
|
|
3
|
+
import { BaseSequenceAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
4
|
+
import { SimpleFeature, updateStatus2 } from '@jbrowse/core/util';
|
|
5
|
+
import QuickLRU from '@jbrowse/core/util/QuickLRU';
|
|
3
6
|
import { openLocation } from '@jbrowse/core/util/io';
|
|
4
7
|
import { ObservableCreate } from '@jbrowse/core/util/rxjs';
|
|
5
|
-
import {
|
|
6
|
-
import AbortablePromiseCache from '@gmod/abortable-promise-cache';
|
|
7
|
-
import QuickLRU from '@jbrowse/core/util/QuickLRU';
|
|
8
|
+
import { checkStopToken } from '@jbrowse/core/util/stopToken';
|
|
8
9
|
export default class IndexedFastaAdapter extends BaseSequenceAdapter {
|
|
9
10
|
constructor() {
|
|
10
11
|
super(...arguments);
|
|
11
12
|
this.seqCache = new AbortablePromiseCache({
|
|
12
13
|
cache: new QuickLRU({ maxSize: 200 }),
|
|
13
|
-
fill: async (args
|
|
14
|
+
fill: async (args) => {
|
|
14
15
|
const { refName, start, end, fasta } = args;
|
|
15
|
-
return fasta.getSequence(refName, start, end
|
|
16
|
+
return fasta.getSequence(refName, start, end);
|
|
16
17
|
},
|
|
17
18
|
});
|
|
18
19
|
}
|
|
19
|
-
async getRefNames(
|
|
20
|
+
async getRefNames(_opts) {
|
|
20
21
|
const { fasta } = await this.setup();
|
|
21
|
-
return fasta.getSequenceNames(
|
|
22
|
+
return fasta.getSequenceNames();
|
|
22
23
|
}
|
|
23
|
-
async getRegions(
|
|
24
|
+
async getRegions(_opts) {
|
|
24
25
|
const { fasta } = await this.setup();
|
|
25
|
-
const seqSizes = await fasta.getSequenceSizes(
|
|
26
|
+
const seqSizes = await fasta.getSequenceSizes();
|
|
26
27
|
return Object.keys(seqSizes).map(refName => ({
|
|
27
28
|
refName,
|
|
28
29
|
start: 0,
|
|
@@ -55,40 +56,45 @@ export default class IndexedFastaAdapter extends BaseSequenceAdapter {
|
|
|
55
56
|
return this.setupP;
|
|
56
57
|
}
|
|
57
58
|
getFeatures(region, opts) {
|
|
59
|
+
const { statusCallback = () => { }, stopToken } = opts || {};
|
|
58
60
|
const { refName, start, end } = region;
|
|
59
61
|
return ObservableCreate(async (observer) => {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
62
|
+
await updateStatus2('Downloading sequence', statusCallback, stopToken, async () => {
|
|
63
|
+
const { fasta } = await this.setup();
|
|
64
|
+
const size = await fasta.getSequenceSize(refName);
|
|
65
|
+
const regionEnd = Math.min(size, end);
|
|
66
|
+
const chunks = [];
|
|
67
|
+
const chunkSize = 128000;
|
|
68
|
+
const s = start - (start % chunkSize);
|
|
69
|
+
const e = end + (chunkSize - (end % chunkSize));
|
|
70
|
+
for (let chunkStart = s; chunkStart < e; chunkStart += chunkSize) {
|
|
71
|
+
const r = {
|
|
72
|
+
refName,
|
|
73
|
+
start: chunkStart,
|
|
74
|
+
end: chunkStart + chunkSize,
|
|
75
|
+
};
|
|
76
|
+
checkStopToken(stopToken);
|
|
77
|
+
chunks.push(await this.seqCache.get(JSON.stringify(r), { ...r, fasta }));
|
|
78
|
+
}
|
|
79
|
+
const seq = chunks
|
|
80
|
+
.filter(f => !!f)
|
|
81
|
+
.join('')
|
|
82
|
+
.slice(start - s)
|
|
83
|
+
.slice(0, end - start);
|
|
84
|
+
if (seq) {
|
|
85
|
+
observer.next(new SimpleFeature({
|
|
86
|
+
id: `${refName}-${start}-${regionEnd}`,
|
|
87
|
+
data: {
|
|
88
|
+
refName,
|
|
89
|
+
start,
|
|
90
|
+
end: regionEnd,
|
|
91
|
+
seq,
|
|
92
|
+
},
|
|
93
|
+
}));
|
|
94
|
+
}
|
|
95
|
+
});
|
|
85
96
|
observer.complete();
|
|
86
97
|
});
|
|
87
98
|
}
|
|
88
|
-
|
|
89
|
-
* called to provide a hint that data tied to a certain region
|
|
90
|
-
* will not be needed for the foreseeable future and can be purged
|
|
91
|
-
* from caches, etc
|
|
92
|
-
*/
|
|
93
|
-
freeResources( /* { region } */) { }
|
|
99
|
+
freeResources() { }
|
|
94
100
|
}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
declare const IndexedFastaAdapter: 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 IndexedFastaAdapter: import("@jbrowse/core/configuration/configura
|
|
|
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 IndexedFastaAdapter: import("@jbrowse/core/configuration/configura
|
|
|
19
13
|
locationType: string;
|
|
20
14
|
};
|
|
21
15
|
};
|
|
22
|
-
/**
|
|
23
|
-
* #slot
|
|
24
|
-
*/
|
|
25
16
|
metadataLocation: {
|
|
26
17
|
description: string;
|
|
27
18
|
type: string;
|
|
@@ -1,26 +1,14 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
|
-
|
|
3
|
-
* #config IndexedFastaAdapter
|
|
4
|
-
*/
|
|
5
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
2
|
+
function x() { }
|
|
6
3
|
const IndexedFastaAdapter = ConfigurationSchema('IndexedFastaAdapter', {
|
|
7
|
-
/**
|
|
8
|
-
* #slot
|
|
9
|
-
*/
|
|
10
4
|
fastaLocation: {
|
|
11
5
|
type: 'fileLocation',
|
|
12
6
|
defaultValue: { uri: '/path/to/seq.fa', locationType: 'UriLocation' },
|
|
13
7
|
},
|
|
14
|
-
/**
|
|
15
|
-
* #slot
|
|
16
|
-
*/
|
|
17
8
|
faiLocation: {
|
|
18
9
|
type: 'fileLocation',
|
|
19
10
|
defaultValue: { uri: '/path/to/seq.fa.fai', locationType: 'UriLocation' },
|
|
20
11
|
},
|
|
21
|
-
/**
|
|
22
|
-
* #slot
|
|
23
|
-
*/
|
|
24
12
|
metadataLocation: {
|
|
25
13
|
description: 'Optional metadata file',
|
|
26
14
|
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 IndexedFastaAdapterF(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 IndexedFastaAdapterF(pluginManager) {
|
|
4
|
-
pluginManager.addAdapterType(() =>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
pluginManager.addAdapterType(() => {
|
|
5
|
+
return new AdapterType({
|
|
6
|
+
name: 'IndexedFastaAdapter',
|
|
7
|
+
displayName: 'Indexed FASTA adapter',
|
|
8
|
+
configSchema,
|
|
9
|
+
adapterMetadata: {
|
|
10
|
+
hiddenFromGUI: true,
|
|
11
|
+
},
|
|
12
|
+
getAdapterClass: () => import('./IndexedFastaAdapter').then(r => r.default),
|
|
13
|
+
});
|
|
14
|
+
});
|
|
13
15
|
}
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
2
|
import { default as divSequenceRendererConfigSchema } from '../DivSequenceRenderer/configSchema';
|
|
3
|
-
|
|
4
|
-
* #config LinearReferenceSequenceDisplay
|
|
5
|
-
*/
|
|
6
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
3
|
+
function x() { }
|
|
7
4
|
export const configSchema = ConfigurationSchema('LinearReferenceSequenceDisplay', {
|
|
8
|
-
/**
|
|
9
|
-
* #slot
|
|
10
|
-
*/
|
|
11
5
|
renderer: divSequenceRendererConfigSchema,
|
|
12
6
|
}, { explicitIdentifier: 'displayId', explicitlyTyped: 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 LinearReferenceSequenceDisplayF(pluginManager: PluginManager): void;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
2
|
-
/**
|
|
3
|
-
* #stateModel LinearReferenceSequenceDisplay
|
|
4
|
-
* base model `BaseLinearDisplay`
|
|
5
|
-
*/
|
|
1
|
+
import type { AnyConfigurationSchemaType } from '@jbrowse/core/configuration';
|
|
6
2
|
export declare function modelFactory(configSchema: AnyConfigurationSchemaType): import("mobx-state-tree").IModelType<{
|
|
7
3
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
8
4
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
@@ -15,23 +11,12 @@ export declare function modelFactory(configSchema: AnyConfigurationSchemaType):
|
|
|
15
11
|
} & {
|
|
16
12
|
blockState: import("mobx-state-tree").IMapType<import("mobx-state-tree").IModelType<{
|
|
17
13
|
key: import("mobx-state-tree").ISimpleType<string>;
|
|
18
|
-
region: import("mobx-state-tree").
|
|
19
|
-
refName: import("mobx-state-tree").ISimpleType<string>;
|
|
20
|
-
start: import("mobx-state-tree").ISimpleType<number>;
|
|
21
|
-
end: import("mobx-state-tree" /**
|
|
22
|
-
* #property
|
|
23
|
-
*/).ISimpleType<number>;
|
|
24
|
-
reversed: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
25
|
-
} & {
|
|
26
|
-
assemblyName: import("mobx-state-tree").ISimpleType<string>;
|
|
27
|
-
}, {
|
|
28
|
-
setRefName(newRefName: string): void;
|
|
29
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
14
|
+
region: import("mobx-state-tree").IType<import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region>;
|
|
30
15
|
reloadFlag: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
31
16
|
isLeftEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
32
17
|
isRightEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
33
18
|
}, {
|
|
34
|
-
|
|
19
|
+
stopToken: string | undefined;
|
|
35
20
|
filled: boolean;
|
|
36
21
|
reactElement: React.ReactElement | undefined;
|
|
37
22
|
features: Map<string, import("@jbrowse/core/util").Feature> | undefined;
|
|
@@ -55,15 +40,9 @@ export declare function modelFactory(configSchema: AnyConfigurationSchemaType):
|
|
|
55
40
|
doReload(): void;
|
|
56
41
|
afterAttach(): void;
|
|
57
42
|
setStatus(message: string): void;
|
|
58
|
-
setLoading(
|
|
43
|
+
setLoading(newStopToken: string): void;
|
|
59
44
|
setMessage(messageText: string): void;
|
|
60
|
-
setRendered(props:
|
|
61
|
-
reactElement: React.ReactElement;
|
|
62
|
-
features: Map<string, import("@jbrowse/core/util").Feature>;
|
|
63
|
-
layout: any;
|
|
64
|
-
maxHeightReached: boolean;
|
|
65
|
-
renderProps: any;
|
|
66
|
-
} | undefined): void;
|
|
45
|
+
setRendered(props: import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/models/serverSideRenderedBlock").RenderedProps | undefined): void;
|
|
67
46
|
setError(error: unknown): void;
|
|
68
47
|
reload(): void;
|
|
69
48
|
beforeDestroy(): void;
|
|
@@ -191,6 +170,7 @@ export declare function modelFactory(configSchema: AnyConfigurationSchemaType):
|
|
|
191
170
|
readonly regionTooLarge: boolean;
|
|
192
171
|
readonly regionTooLargeReason: string;
|
|
193
172
|
} & {
|
|
173
|
+
readonly statsReadyAndRegionNotTooLarge: boolean;
|
|
194
174
|
regionCannotBeRenderedText(_region: import("@jbrowse/core/util").Region): "" | "Force load to see features";
|
|
195
175
|
regionCannotBeRendered(_region: import("@jbrowse/core/util").Region): import("react").JSX.Element | null;
|
|
196
176
|
} & {
|
|
@@ -228,67 +208,25 @@ export declare function modelFactory(configSchema: AnyConfigurationSchemaType):
|
|
|
228
208
|
renderSvg(opts: import("@jbrowse/plugin-linear-genome-view").ExportSvgDisplayOptions): Promise<import("react").JSX.Element>;
|
|
229
209
|
afterAttach(): void;
|
|
230
210
|
} & {
|
|
231
|
-
/**
|
|
232
|
-
* #property
|
|
233
|
-
*/
|
|
234
211
|
rowHeight: number;
|
|
235
212
|
} & {
|
|
236
|
-
/**
|
|
237
|
-
* #getter
|
|
238
|
-
*/
|
|
239
213
|
readonly sequenceType: any;
|
|
240
|
-
/**
|
|
241
|
-
* #getter
|
|
242
|
-
* showReverse setting, it is NOT disabled for non-dna sequences
|
|
243
|
-
*/
|
|
244
214
|
readonly showForwardActual: boolean;
|
|
245
|
-
/**
|
|
246
|
-
* #getter
|
|
247
|
-
* showReverse setting, is disabled for non-dna sequences
|
|
248
|
-
*/
|
|
249
215
|
readonly showReverseActual: boolean;
|
|
250
|
-
/**
|
|
251
|
-
* #getter
|
|
252
|
-
* showTranslation setting is disabled for non-dna sequences
|
|
253
|
-
*/
|
|
254
216
|
readonly showTranslationActual: boolean;
|
|
255
217
|
} & {
|
|
256
|
-
/**
|
|
257
|
-
* #getter
|
|
258
|
-
*/
|
|
259
218
|
readonly sequenceHeight: number;
|
|
260
219
|
} & {
|
|
261
|
-
/**
|
|
262
|
-
* #method
|
|
263
|
-
*/
|
|
264
220
|
renderProps(): any;
|
|
265
221
|
} & {
|
|
266
|
-
/**
|
|
267
|
-
* #method
|
|
268
|
-
*/
|
|
269
222
|
regionCannotBeRendered(): "Zoom in to see sequence" | undefined;
|
|
270
|
-
/**
|
|
271
|
-
* #getter
|
|
272
|
-
*/
|
|
273
223
|
readonly rendererTypeName: any;
|
|
274
224
|
} & {
|
|
275
|
-
/**
|
|
276
|
-
* #action
|
|
277
|
-
*/
|
|
278
225
|
toggleShowForward(): void;
|
|
279
|
-
/**
|
|
280
|
-
* #action
|
|
281
|
-
*/
|
|
282
226
|
toggleShowReverse(): void;
|
|
283
|
-
/**
|
|
284
|
-
* #action
|
|
285
|
-
*/
|
|
286
227
|
toggleShowTranslation(): void;
|
|
287
228
|
afterAttach(): void;
|
|
288
229
|
} & {
|
|
289
|
-
/**
|
|
290
|
-
* #method
|
|
291
|
-
*/
|
|
292
230
|
trackMenuItems(): {
|
|
293
231
|
label: string;
|
|
294
232
|
type: string;
|
|
@@ -309,21 +247,12 @@ export declare function modelFactory(configSchema: AnyConfigurationSchemaType):
|
|
|
309
247
|
} & {
|
|
310
248
|
blockState: import("mobx-state-tree").IMapType<import("mobx-state-tree").IModelType<{
|
|
311
249
|
key: import("mobx-state-tree").ISimpleType<string>;
|
|
312
|
-
region: import("mobx-state-tree").
|
|
313
|
-
refName: import("mobx-state-tree").ISimpleType<string>;
|
|
314
|
-
start: import("mobx-state-tree").ISimpleType<number>;
|
|
315
|
-
end: import("mobx-state-tree").ISimpleType<number>;
|
|
316
|
-
reversed: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
317
|
-
} & {
|
|
318
|
-
assemblyName: import("mobx-state-tree").ISimpleType<string>;
|
|
319
|
-
}, {
|
|
320
|
-
setRefName(newRefName: string): void;
|
|
321
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
250
|
+
region: import("mobx-state-tree").IType<import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region, import("@jbrowse/core/util").Region>;
|
|
322
251
|
reloadFlag: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
323
252
|
isLeftEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
324
253
|
isRightEndOfDisplayedRegion: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
325
254
|
}, {
|
|
326
|
-
|
|
255
|
+
stopToken: string | undefined;
|
|
327
256
|
filled: boolean;
|
|
328
257
|
reactElement: React.ReactElement | undefined;
|
|
329
258
|
features: Map<string, import("@jbrowse/core/util").Feature> | undefined;
|
|
@@ -347,15 +276,9 @@ export declare function modelFactory(configSchema: AnyConfigurationSchemaType):
|
|
|
347
276
|
doReload(): void;
|
|
348
277
|
afterAttach(): void;
|
|
349
278
|
setStatus(message: string): void;
|
|
350
|
-
setLoading(
|
|
279
|
+
setLoading(newStopToken: string): void;
|
|
351
280
|
setMessage(messageText: string): void;
|
|
352
|
-
setRendered(props:
|
|
353
|
-
reactElement: React.ReactElement;
|
|
354
|
-
features: Map<string, import("@jbrowse/core/util").Feature>;
|
|
355
|
-
layout: any;
|
|
356
|
-
maxHeightReached: boolean;
|
|
357
|
-
renderProps: any;
|
|
358
|
-
} | undefined): void;
|
|
281
|
+
setRendered(props: import("@jbrowse/plugin-linear-genome-view/src/BaseLinearDisplay/models/serverSideRenderedBlock").RenderedProps | undefined): void;
|
|
359
282
|
setError(error: unknown): void;
|
|
360
283
|
reload(): void;
|
|
361
284
|
beforeDestroy(): void;
|
|
@@ -392,8 +315,8 @@ export declare function modelFactory(configSchema: AnyConfigurationSchemaType):
|
|
|
392
315
|
type: string;
|
|
393
316
|
id: string;
|
|
394
317
|
configuration: import("mobx-state-tree").ModelSnapshotType<Record<string, any>>;
|
|
395
|
-
heightPreConfig: number | undefined;
|
|
396
318
|
rpcDriverName: string | undefined;
|
|
319
|
+
heightPreConfig: number | undefined;
|
|
397
320
|
userBpPerPxLimit: number | undefined;
|
|
398
321
|
userByteSizeLimit: number | undefined;
|
|
399
322
|
} & import("mobx-state-tree")._NotCustomized>;
|
|
@@ -1,76 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BaseLinearDisplay, } from '@jbrowse/plugin-linear-genome-view';
|
|
3
|
-
import { ConfigurationReference, getConf, } from '@jbrowse/core/configuration';
|
|
4
|
-
import { getParentRenderProps } from '@jbrowse/core/util/tracks';
|
|
1
|
+
import { ConfigurationReference, getConf } from '@jbrowse/core/configuration';
|
|
5
2
|
import { getContainingTrack, getContainingView } from '@jbrowse/core/util';
|
|
3
|
+
import { getParentRenderProps } from '@jbrowse/core/util/tracks';
|
|
4
|
+
import { BaseLinearDisplay } from '@jbrowse/plugin-linear-genome-view';
|
|
6
5
|
import { autorun } from 'mobx';
|
|
7
|
-
|
|
8
|
-
* #stateModel LinearReferenceSequenceDisplay
|
|
9
|
-
* base model `BaseLinearDisplay`
|
|
10
|
-
*/
|
|
6
|
+
import { addDisposer, types } from 'mobx-state-tree';
|
|
11
7
|
export function modelFactory(configSchema) {
|
|
12
8
|
return types
|
|
13
9
|
.compose('LinearReferenceSequenceDisplay', BaseLinearDisplay, types.model({
|
|
14
|
-
/**
|
|
15
|
-
* #property
|
|
16
|
-
*/
|
|
17
10
|
type: types.literal('LinearReferenceSequenceDisplay'),
|
|
18
|
-
/**
|
|
19
|
-
* #property
|
|
20
|
-
*/
|
|
21
11
|
configuration: ConfigurationReference(configSchema),
|
|
22
|
-
/**
|
|
23
|
-
* #property
|
|
24
|
-
*/
|
|
25
12
|
showForward: true,
|
|
26
|
-
/**
|
|
27
|
-
* #property
|
|
28
|
-
*/
|
|
29
13
|
showReverse: true,
|
|
30
|
-
/**
|
|
31
|
-
* #property
|
|
32
|
-
*/
|
|
33
14
|
showTranslation: true,
|
|
34
15
|
}))
|
|
35
16
|
.volatile(() => ({
|
|
36
|
-
/**
|
|
37
|
-
* #property
|
|
38
|
-
*/
|
|
39
17
|
rowHeight: 15,
|
|
40
18
|
}))
|
|
41
19
|
.views(self => ({
|
|
42
|
-
/**
|
|
43
|
-
* #getter
|
|
44
|
-
*/
|
|
45
20
|
get sequenceType() {
|
|
46
21
|
return getConf(getContainingTrack(self), 'sequenceType');
|
|
47
22
|
},
|
|
48
|
-
/**
|
|
49
|
-
* #getter
|
|
50
|
-
* showReverse setting, it is NOT disabled for non-dna sequences
|
|
51
|
-
*/
|
|
52
23
|
get showForwardActual() {
|
|
53
24
|
return self.showForward;
|
|
54
25
|
},
|
|
55
|
-
/**
|
|
56
|
-
* #getter
|
|
57
|
-
* showReverse setting, is disabled for non-dna sequences
|
|
58
|
-
*/
|
|
59
26
|
get showReverseActual() {
|
|
60
27
|
return this.sequenceType === 'dna' ? self.showReverse : false;
|
|
61
28
|
},
|
|
62
|
-
/**
|
|
63
|
-
* #getter
|
|
64
|
-
* showTranslation setting is disabled for non-dna sequences
|
|
65
|
-
*/
|
|
66
29
|
get showTranslationActual() {
|
|
67
30
|
return this.sequenceType === 'dna' ? self.showTranslation : false;
|
|
68
31
|
},
|
|
69
32
|
}))
|
|
70
33
|
.views(self => ({
|
|
71
|
-
/**
|
|
72
|
-
* #getter
|
|
73
|
-
*/
|
|
74
34
|
get sequenceHeight() {
|
|
75
35
|
const { rowHeight, showTranslationActual, showReverseActual, showForwardActual, } = self;
|
|
76
36
|
const r1 = showReverseActual && showTranslationActual ? rowHeight * 3 : 0;
|
|
@@ -84,9 +44,6 @@ export function modelFactory(configSchema) {
|
|
|
84
44
|
.views(self => {
|
|
85
45
|
const { renderProps: superRenderProps } = self;
|
|
86
46
|
return {
|
|
87
|
-
/**
|
|
88
|
-
* #method
|
|
89
|
-
*/
|
|
90
47
|
renderProps() {
|
|
91
48
|
const { rpcDriverName, showForwardActual, showReverseActual, showTranslationActual, rowHeight, sequenceHeight, sequenceType, } = self;
|
|
92
49
|
return {
|
|
@@ -105,36 +62,21 @@ export function modelFactory(configSchema) {
|
|
|
105
62
|
};
|
|
106
63
|
})
|
|
107
64
|
.views(self => ({
|
|
108
|
-
|
|
109
|
-
* #method
|
|
110
|
-
*/
|
|
111
|
-
regionCannotBeRendered( /* region */) {
|
|
65
|
+
regionCannotBeRendered() {
|
|
112
66
|
const view = getContainingView(self);
|
|
113
67
|
return view.bpPerPx > 3 ? 'Zoom in to see sequence' : undefined;
|
|
114
68
|
},
|
|
115
|
-
/**
|
|
116
|
-
* #getter
|
|
117
|
-
*/
|
|
118
69
|
get rendererTypeName() {
|
|
119
70
|
return self.configuration.renderer.type;
|
|
120
71
|
},
|
|
121
72
|
}))
|
|
122
73
|
.actions(self => ({
|
|
123
|
-
/**
|
|
124
|
-
* #action
|
|
125
|
-
*/
|
|
126
74
|
toggleShowForward() {
|
|
127
75
|
self.showForward = !self.showForward;
|
|
128
76
|
},
|
|
129
|
-
/**
|
|
130
|
-
* #action
|
|
131
|
-
*/
|
|
132
77
|
toggleShowReverse() {
|
|
133
78
|
self.showReverse = !self.showReverse;
|
|
134
79
|
},
|
|
135
|
-
/**
|
|
136
|
-
* #action
|
|
137
|
-
*/
|
|
138
80
|
toggleShowTranslation() {
|
|
139
81
|
self.showTranslation = !self.showTranslation;
|
|
140
82
|
},
|
|
@@ -151,9 +93,6 @@ export function modelFactory(configSchema) {
|
|
|
151
93
|
},
|
|
152
94
|
}))
|
|
153
95
|
.views(self => ({
|
|
154
|
-
/**
|
|
155
|
-
* #method
|
|
156
|
-
*/
|
|
157
96
|
trackMenuItems() {
|
|
158
97
|
return [
|
|
159
98
|
...(self.sequenceType === 'dna'
|
|
@@ -1,60 +1,34 @@
|
|
|
1
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
2
2
|
export declare function createReferenceSeqTrackConfig(pluginManager: PluginManager): import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
3
|
-
/**
|
|
4
|
-
* #slot
|
|
5
|
-
* configuration for track adapter
|
|
6
|
-
*/
|
|
7
3
|
adapter: import("mobx-state-tree").IAnyModelType;
|
|
8
|
-
/**
|
|
9
|
-
* #slot
|
|
10
|
-
* configuration for the displays e.g. LinearReferenceSequenceDisplay
|
|
11
|
-
*/
|
|
12
4
|
displays: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyModelType>;
|
|
13
|
-
/**
|
|
14
|
-
* #slot
|
|
15
|
-
*/
|
|
16
5
|
name: {
|
|
17
6
|
type: string;
|
|
18
7
|
description: string;
|
|
19
8
|
defaultValue: string;
|
|
20
9
|
};
|
|
21
|
-
/**
|
|
22
|
-
* #slot
|
|
23
|
-
*/
|
|
24
10
|
sequenceType: {
|
|
25
11
|
type: string;
|
|
26
12
|
description: string;
|
|
27
13
|
defaultValue: string;
|
|
28
14
|
};
|
|
29
|
-
/**
|
|
30
|
-
* #slot
|
|
31
|
-
*/
|
|
32
15
|
description: {
|
|
33
16
|
description: string;
|
|
34
17
|
type: string;
|
|
35
18
|
defaultValue: string;
|
|
36
19
|
};
|
|
37
|
-
/**
|
|
38
|
-
* #slot
|
|
39
|
-
*/
|
|
40
20
|
metadata: {
|
|
41
21
|
type: string;
|
|
42
22
|
description: string;
|
|
43
23
|
defaultValue: {};
|
|
44
24
|
};
|
|
45
25
|
formatAbout: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
46
|
-
/**
|
|
47
|
-
* #slot formatAbout.config
|
|
48
|
-
*/
|
|
49
26
|
config: {
|
|
50
27
|
type: string;
|
|
51
28
|
description: string;
|
|
52
29
|
defaultValue: {};
|
|
53
30
|
contextVariable: string[];
|
|
54
31
|
};
|
|
55
|
-
/**
|
|
56
|
-
* #slot formatAbout.hideUris
|
|
57
|
-
*/
|
|
58
32
|
hideUris: {
|
|
59
33
|
type: string;
|
|
60
34
|
defaultValue: boolean;
|