@jbrowse/plugin-alignments 3.0.2 → 3.0.4
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/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +3 -4
- package/dist/LinearPileupDisplay/doAfterAttach.js +1 -1
- package/dist/LinearSNPCoverageDisplay/model.js +2 -2
- package/dist/PileupRenderer/PileupLayoutSession.d.ts +9 -19
- package/dist/PileupRenderer/PileupLayoutSession.js +14 -15
- package/dist/PileupRenderer/PileupRenderer.d.ts +1 -1
- package/dist/PileupRenderer/PileupRenderer.js +1 -1
- package/esm/LinearPileupDisplay/SharedLinearPileupDisplayMixin.js +3 -4
- package/esm/LinearPileupDisplay/doAfterAttach.js +2 -2
- package/esm/LinearSNPCoverageDisplay/model.js +2 -2
- package/esm/PileupRenderer/PileupLayoutSession.d.ts +9 -19
- package/esm/PileupRenderer/PileupLayoutSession.js +13 -14
- package/esm/PileupRenderer/PileupRenderer.d.ts +1 -1
- package/esm/PileupRenderer/PileupRenderer.js +1 -1
- package/package.json +6 -6
|
@@ -267,7 +267,7 @@ function SharedLinearPileupDisplayMixin(configSchema) {
|
|
|
267
267
|
const { feature } = (await rpcManager.call(sessionId, 'CoreGetFeatureDetails', {
|
|
268
268
|
featureId: f,
|
|
269
269
|
sessionId,
|
|
270
|
-
layoutId: (0, util_1.
|
|
270
|
+
layoutId: (0, util_1.getContainingTrack)(self).id,
|
|
271
271
|
rendererType: 'PileupRenderer',
|
|
272
272
|
}));
|
|
273
273
|
if ((0, mobx_state_tree_1.isAlive)(self) && feature) {
|
|
@@ -296,7 +296,7 @@ function SharedLinearPileupDisplayMixin(configSchema) {
|
|
|
296
296
|
const { feature } = (await rpcManager.call(sessionId, 'CoreGetFeatureDetails', {
|
|
297
297
|
featureId: f,
|
|
298
298
|
sessionId,
|
|
299
|
-
layoutId: (0, util_1.
|
|
299
|
+
layoutId: (0, util_1.getContainingTrack)(self).id,
|
|
300
300
|
rendererType: 'PileupRenderer',
|
|
301
301
|
}));
|
|
302
302
|
if (feature) {
|
|
@@ -489,11 +489,10 @@ function SharedLinearPileupDisplayMixin(configSchema) {
|
|
|
489
489
|
}
|
|
490
490
|
else {
|
|
491
491
|
const sessionId = (0, tracks_1.getRpcSessionId)(self);
|
|
492
|
-
const view = (0, util_1.getContainingView)(self);
|
|
493
492
|
const { feature } = (await session.rpcManager.call(sessionId, 'CoreGetFeatureDetails', {
|
|
494
493
|
featureId,
|
|
495
494
|
sessionId,
|
|
496
|
-
layoutId:
|
|
495
|
+
layoutId: (0, util_1.getContainingTrack)(self).id,
|
|
497
496
|
rendererType: 'PileupRenderer',
|
|
498
497
|
}));
|
|
499
498
|
if ((0, mobx_state_tree_1.isAlive)(self) &&
|
|
@@ -37,7 +37,7 @@ function doAfterAttach(model) {
|
|
|
37
37
|
adapterConfig,
|
|
38
38
|
rendererType: rendererType.name,
|
|
39
39
|
sessionId: (0, tracks_1.getRpcSessionId)(model),
|
|
40
|
-
layoutId:
|
|
40
|
+
layoutId: (0, util_1.getContainingTrack)(model).id,
|
|
41
41
|
timeout: 1000000,
|
|
42
42
|
statusCallback: (arg) => {
|
|
43
43
|
model.setMessage(arg);
|
|
@@ -168,11 +168,11 @@ function stateModelFactory(pluginManager, configSchema) {
|
|
|
168
168
|
}
|
|
169
169
|
const view = (0, util_1.getContainingView)(self);
|
|
170
170
|
const { staticBlocks } = view;
|
|
171
|
-
const { colorBy
|
|
171
|
+
const { colorBy } = self;
|
|
172
172
|
if ((colorBy === null || colorBy === void 0 ? void 0 : colorBy.type) === 'modifications') {
|
|
173
173
|
const vals = await (0, getUniqueModifications_1.getUniqueModifications)({
|
|
174
174
|
model: self,
|
|
175
|
-
adapterConfig,
|
|
175
|
+
adapterConfig: (0, configuration_1.getConf)(self.parentTrack, 'adapter'),
|
|
176
176
|
blocks: staticBlocks,
|
|
177
177
|
});
|
|
178
178
|
if ((0, mobx_state_tree_1.isAlive)(self)) {
|
|
@@ -1,33 +1,23 @@
|
|
|
1
|
-
import { LayoutSession } from '@jbrowse/core/pluggableElementTypes/renderers/
|
|
1
|
+
import { LayoutSession } from '@jbrowse/core/pluggableElementTypes/renderers/LayoutSession';
|
|
2
2
|
import type { FilterBy, SortedBy } from '../shared/types';
|
|
3
|
-
import type {
|
|
4
|
-
import type SerializableFilterChain from '@jbrowse/core/pluggableElementTypes/renderers/util/serializableFilterChain';
|
|
3
|
+
import type { CachedLayout, LayoutSessionProps } from '@jbrowse/core/pluggableElementTypes/renderers/LayoutSession';
|
|
5
4
|
import type GranularRectLayout from '@jbrowse/core/util/layouts/GranularRectLayout';
|
|
6
5
|
import type MultiLayout from '@jbrowse/core/util/layouts/MultiLayout';
|
|
7
|
-
export interface PileupLayoutSessionProps {
|
|
8
|
-
config: AnyConfigurationModel;
|
|
9
|
-
bpPerPx: number;
|
|
10
|
-
filters: SerializableFilterChain;
|
|
6
|
+
export interface PileupLayoutSessionProps extends LayoutSessionProps {
|
|
11
7
|
filterBy: FilterBy;
|
|
12
8
|
sortedBy: SortedBy;
|
|
13
9
|
showSoftClip: boolean;
|
|
14
10
|
}
|
|
15
11
|
type MyMultiLayout = MultiLayout<GranularRectLayout<unknown>, unknown>;
|
|
16
|
-
interface CachedPileupLayout {
|
|
17
|
-
|
|
18
|
-
config: AnyConfigurationModel;
|
|
19
|
-
filters?: SerializableFilterChain;
|
|
20
|
-
filterBy?: FilterBy;
|
|
21
|
-
sortedBy?: SortedBy;
|
|
22
|
-
showSoftClip: boolean;
|
|
12
|
+
interface CachedPileupLayout extends CachedLayout {
|
|
13
|
+
props: PileupLayoutSessionProps;
|
|
23
14
|
}
|
|
24
15
|
export declare class PileupLayoutSession extends LayoutSession {
|
|
25
|
-
|
|
26
|
-
filterBy?: FilterBy;
|
|
27
|
-
showSoftClip: boolean;
|
|
28
|
-
constructor(args: PileupLayoutSessionProps);
|
|
29
|
-
cachedLayoutIsValid(cachedLayout: CachedPileupLayout): boolean;
|
|
16
|
+
props: PileupLayoutSessionProps;
|
|
30
17
|
cachedLayout: CachedPileupLayout | undefined;
|
|
18
|
+
constructor(props: PileupLayoutSessionProps);
|
|
19
|
+
update(props: PileupLayoutSessionProps): this;
|
|
20
|
+
cachedLayoutIsValid(cachedLayout: CachedPileupLayout): boolean;
|
|
31
21
|
get layout(): MyMultiLayout;
|
|
32
22
|
}
|
|
33
23
|
export {};
|
|
@@ -4,30 +4,29 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.PileupLayoutSession = void 0;
|
|
7
|
-
const
|
|
8
|
-
const BoxRendererType_1 = require("@jbrowse/core/pluggableElementTypes/renderers/BoxRendererType");
|
|
7
|
+
const LayoutSession_1 = require("@jbrowse/core/pluggableElementTypes/renderers/LayoutSession");
|
|
9
8
|
const fast_deep_equal_1 = __importDefault(require("fast-deep-equal"));
|
|
10
|
-
class PileupLayoutSession extends
|
|
11
|
-
constructor(
|
|
12
|
-
super(
|
|
13
|
-
this.
|
|
14
|
-
|
|
9
|
+
class PileupLayoutSession extends LayoutSession_1.LayoutSession {
|
|
10
|
+
constructor(props) {
|
|
11
|
+
super(props);
|
|
12
|
+
this.props = props;
|
|
13
|
+
}
|
|
14
|
+
update(props) {
|
|
15
|
+
super.update(props);
|
|
16
|
+
this.props = props;
|
|
17
|
+
return this;
|
|
15
18
|
}
|
|
16
19
|
cachedLayoutIsValid(cachedLayout) {
|
|
17
20
|
return (super.cachedLayoutIsValid(cachedLayout) &&
|
|
18
|
-
this.showSoftClip === cachedLayout.showSoftClip &&
|
|
19
|
-
(0, fast_deep_equal_1.default)(this.sortedBy, cachedLayout.sortedBy) &&
|
|
20
|
-
(0, fast_deep_equal_1.default)(this.filterBy, cachedLayout.filterBy));
|
|
21
|
+
this.props.showSoftClip === cachedLayout.props.showSoftClip &&
|
|
22
|
+
(0, fast_deep_equal_1.default)(this.props.sortedBy, cachedLayout.props.sortedBy) &&
|
|
23
|
+
(0, fast_deep_equal_1.default)(this.props.filterBy, cachedLayout.props.filterBy));
|
|
21
24
|
}
|
|
22
25
|
get layout() {
|
|
23
26
|
if (!this.cachedLayout || !this.cachedLayoutIsValid(this.cachedLayout)) {
|
|
24
27
|
this.cachedLayout = {
|
|
25
28
|
layout: this.makeLayout(),
|
|
26
|
-
|
|
27
|
-
filters: this.filters,
|
|
28
|
-
filterBy: this.filterBy,
|
|
29
|
-
sortedBy: this.sortedBy,
|
|
30
|
-
showSoftClip: this.showSoftClip,
|
|
29
|
+
props: this.props,
|
|
31
30
|
};
|
|
32
31
|
}
|
|
33
32
|
return this.cachedLayout.layout;
|
|
@@ -43,6 +43,6 @@ export default class PileupRenderer extends BoxRendererType {
|
|
|
43
43
|
reactElement?: React.ReactElement;
|
|
44
44
|
html?: string;
|
|
45
45
|
}>;
|
|
46
|
-
|
|
46
|
+
createLayoutSession(args: PileupLayoutSessionProps): PileupLayoutSession;
|
|
47
47
|
}
|
|
48
48
|
export type { RenderArgs, RenderArgsSerialized, RenderResults, ResultsDeserialized, ResultsSerialized, } from '@jbrowse/core/pluggableElementTypes/renderers/BoxRendererType';
|
|
@@ -228,7 +228,7 @@ export function SharedLinearPileupDisplayMixin(configSchema) {
|
|
|
228
228
|
const { feature } = (await rpcManager.call(sessionId, 'CoreGetFeatureDetails', {
|
|
229
229
|
featureId: f,
|
|
230
230
|
sessionId,
|
|
231
|
-
layoutId:
|
|
231
|
+
layoutId: getContainingTrack(self).id,
|
|
232
232
|
rendererType: 'PileupRenderer',
|
|
233
233
|
}));
|
|
234
234
|
if (isAlive(self) && feature) {
|
|
@@ -257,7 +257,7 @@ export function SharedLinearPileupDisplayMixin(configSchema) {
|
|
|
257
257
|
const { feature } = (await rpcManager.call(sessionId, 'CoreGetFeatureDetails', {
|
|
258
258
|
featureId: f,
|
|
259
259
|
sessionId,
|
|
260
|
-
layoutId:
|
|
260
|
+
layoutId: getContainingTrack(self).id,
|
|
261
261
|
rendererType: 'PileupRenderer',
|
|
262
262
|
}));
|
|
263
263
|
if (feature) {
|
|
@@ -450,11 +450,10 @@ export function SharedLinearPileupDisplayMixin(configSchema) {
|
|
|
450
450
|
}
|
|
451
451
|
else {
|
|
452
452
|
const sessionId = getRpcSessionId(self);
|
|
453
|
-
const view = getContainingView(self);
|
|
454
453
|
const { feature } = (await session.rpcManager.call(sessionId, 'CoreGetFeatureDetails', {
|
|
455
454
|
featureId,
|
|
456
455
|
sessionId,
|
|
457
|
-
layoutId:
|
|
456
|
+
layoutId: getContainingTrack(self).id,
|
|
458
457
|
rendererType: 'PileupRenderer',
|
|
459
458
|
}));
|
|
460
459
|
if (isAlive(self) &&
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getContainingView, getSession } from '@jbrowse/core/util';
|
|
1
|
+
import { getContainingTrack, getContainingView, getSession, } from '@jbrowse/core/util';
|
|
2
2
|
import { getRpcSessionId } from '@jbrowse/core/util/tracks';
|
|
3
3
|
import { isAlive } from 'mobx-state-tree';
|
|
4
4
|
import { getUniqueModifications } from '../shared/getUniqueModifications';
|
|
@@ -34,7 +34,7 @@ export function doAfterAttach(model) {
|
|
|
34
34
|
adapterConfig,
|
|
35
35
|
rendererType: rendererType.name,
|
|
36
36
|
sessionId: getRpcSessionId(model),
|
|
37
|
-
layoutId:
|
|
37
|
+
layoutId: getContainingTrack(model).id,
|
|
38
38
|
timeout: 1000000,
|
|
39
39
|
statusCallback: (arg) => {
|
|
40
40
|
model.setMessage(arg);
|
|
@@ -130,11 +130,11 @@ function stateModelFactory(pluginManager, configSchema) {
|
|
|
130
130
|
}
|
|
131
131
|
const view = getContainingView(self);
|
|
132
132
|
const { staticBlocks } = view;
|
|
133
|
-
const { colorBy
|
|
133
|
+
const { colorBy } = self;
|
|
134
134
|
if ((colorBy === null || colorBy === void 0 ? void 0 : colorBy.type) === 'modifications') {
|
|
135
135
|
const vals = await getUniqueModifications({
|
|
136
136
|
model: self,
|
|
137
|
-
adapterConfig,
|
|
137
|
+
adapterConfig: getConf(self.parentTrack, 'adapter'),
|
|
138
138
|
blocks: staticBlocks,
|
|
139
139
|
});
|
|
140
140
|
if (isAlive(self)) {
|
|
@@ -1,33 +1,23 @@
|
|
|
1
|
-
import { LayoutSession } from '@jbrowse/core/pluggableElementTypes/renderers/
|
|
1
|
+
import { LayoutSession } from '@jbrowse/core/pluggableElementTypes/renderers/LayoutSession';
|
|
2
2
|
import type { FilterBy, SortedBy } from '../shared/types';
|
|
3
|
-
import type {
|
|
4
|
-
import type SerializableFilterChain from '@jbrowse/core/pluggableElementTypes/renderers/util/serializableFilterChain';
|
|
3
|
+
import type { CachedLayout, LayoutSessionProps } from '@jbrowse/core/pluggableElementTypes/renderers/LayoutSession';
|
|
5
4
|
import type GranularRectLayout from '@jbrowse/core/util/layouts/GranularRectLayout';
|
|
6
5
|
import type MultiLayout from '@jbrowse/core/util/layouts/MultiLayout';
|
|
7
|
-
export interface PileupLayoutSessionProps {
|
|
8
|
-
config: AnyConfigurationModel;
|
|
9
|
-
bpPerPx: number;
|
|
10
|
-
filters: SerializableFilterChain;
|
|
6
|
+
export interface PileupLayoutSessionProps extends LayoutSessionProps {
|
|
11
7
|
filterBy: FilterBy;
|
|
12
8
|
sortedBy: SortedBy;
|
|
13
9
|
showSoftClip: boolean;
|
|
14
10
|
}
|
|
15
11
|
type MyMultiLayout = MultiLayout<GranularRectLayout<unknown>, unknown>;
|
|
16
|
-
interface CachedPileupLayout {
|
|
17
|
-
|
|
18
|
-
config: AnyConfigurationModel;
|
|
19
|
-
filters?: SerializableFilterChain;
|
|
20
|
-
filterBy?: FilterBy;
|
|
21
|
-
sortedBy?: SortedBy;
|
|
22
|
-
showSoftClip: boolean;
|
|
12
|
+
interface CachedPileupLayout extends CachedLayout {
|
|
13
|
+
props: PileupLayoutSessionProps;
|
|
23
14
|
}
|
|
24
15
|
export declare class PileupLayoutSession extends LayoutSession {
|
|
25
|
-
|
|
26
|
-
filterBy?: FilterBy;
|
|
27
|
-
showSoftClip: boolean;
|
|
28
|
-
constructor(args: PileupLayoutSessionProps);
|
|
29
|
-
cachedLayoutIsValid(cachedLayout: CachedPileupLayout): boolean;
|
|
16
|
+
props: PileupLayoutSessionProps;
|
|
30
17
|
cachedLayout: CachedPileupLayout | undefined;
|
|
18
|
+
constructor(props: PileupLayoutSessionProps);
|
|
19
|
+
update(props: PileupLayoutSessionProps): this;
|
|
20
|
+
cachedLayoutIsValid(cachedLayout: CachedPileupLayout): boolean;
|
|
31
21
|
get layout(): MyMultiLayout;
|
|
32
22
|
}
|
|
33
23
|
export {};
|
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { LayoutSession } from '@jbrowse/core/pluggableElementTypes/renderers/BoxRendererType';
|
|
1
|
+
import { LayoutSession } from '@jbrowse/core/pluggableElementTypes/renderers/LayoutSession';
|
|
3
2
|
import deepEqual from 'fast-deep-equal';
|
|
4
3
|
export class PileupLayoutSession extends LayoutSession {
|
|
5
|
-
constructor(
|
|
6
|
-
super(
|
|
7
|
-
this.
|
|
8
|
-
|
|
4
|
+
constructor(props) {
|
|
5
|
+
super(props);
|
|
6
|
+
this.props = props;
|
|
7
|
+
}
|
|
8
|
+
update(props) {
|
|
9
|
+
super.update(props);
|
|
10
|
+
this.props = props;
|
|
11
|
+
return this;
|
|
9
12
|
}
|
|
10
13
|
cachedLayoutIsValid(cachedLayout) {
|
|
11
14
|
return (super.cachedLayoutIsValid(cachedLayout) &&
|
|
12
|
-
this.showSoftClip === cachedLayout.showSoftClip &&
|
|
13
|
-
deepEqual(this.sortedBy, cachedLayout.sortedBy) &&
|
|
14
|
-
deepEqual(this.filterBy, cachedLayout.filterBy));
|
|
15
|
+
this.props.showSoftClip === cachedLayout.props.showSoftClip &&
|
|
16
|
+
deepEqual(this.props.sortedBy, cachedLayout.props.sortedBy) &&
|
|
17
|
+
deepEqual(this.props.filterBy, cachedLayout.props.filterBy));
|
|
15
18
|
}
|
|
16
19
|
get layout() {
|
|
17
20
|
if (!this.cachedLayout || !this.cachedLayoutIsValid(this.cachedLayout)) {
|
|
18
21
|
this.cachedLayout = {
|
|
19
22
|
layout: this.makeLayout(),
|
|
20
|
-
|
|
21
|
-
filters: this.filters,
|
|
22
|
-
filterBy: this.filterBy,
|
|
23
|
-
sortedBy: this.sortedBy,
|
|
24
|
-
showSoftClip: this.showSoftClip,
|
|
23
|
+
props: this.props,
|
|
25
24
|
};
|
|
26
25
|
}
|
|
27
26
|
return this.cachedLayout.layout;
|
|
@@ -43,6 +43,6 @@ export default class PileupRenderer extends BoxRendererType {
|
|
|
43
43
|
reactElement?: React.ReactElement;
|
|
44
44
|
html?: string;
|
|
45
45
|
}>;
|
|
46
|
-
|
|
46
|
+
createLayoutSession(args: PileupLayoutSessionProps): PileupLayoutSession;
|
|
47
47
|
}
|
|
48
48
|
export type { RenderArgs, RenderArgsSerialized, RenderResults, ResultsDeserialized, ResultsSerialized, } from '@jbrowse/core/pluggableElementTypes/renderers/BoxRendererType';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-alignments",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
4
4
|
"description": "JBrowse 2 alignments adapters, tracks, etc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@gmod/bam": "^5.0.0",
|
|
40
40
|
"@gmod/cram": "^4.0.1",
|
|
41
|
-
"@jbrowse/core": "^3.0.
|
|
42
|
-
"@jbrowse/plugin-linear-genome-view": "^3.0.
|
|
43
|
-
"@jbrowse/plugin-wiggle": "^3.0.
|
|
44
|
-
"@jbrowse/sv-core": "^3.0.
|
|
41
|
+
"@jbrowse/core": "^3.0.4",
|
|
42
|
+
"@jbrowse/plugin-linear-genome-view": "^3.0.4",
|
|
43
|
+
"@jbrowse/plugin-wiggle": "^3.0.4",
|
|
44
|
+
"@jbrowse/sv-core": "^3.0.4",
|
|
45
45
|
"@mui/icons-material": "^6.0.0",
|
|
46
46
|
"@mui/material": "^6.0.0",
|
|
47
47
|
"canvas2svg": "^1.0.16",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"distModule": "esm/index.js",
|
|
64
64
|
"srcModule": "src/index.ts",
|
|
65
65
|
"module": "esm/index.js",
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "61e6d26f83acbf58a946c2add3415bc46b878df9"
|
|
67
67
|
}
|