@jbrowse/plugin-alignments 4.0.2 → 4.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.
@@ -64,6 +64,7 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
64
64
  }> | null;
65
65
  readonly adapterConfig: any;
66
66
  readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
67
+ readonly isMinimized: boolean;
67
68
  readonly parentDisplay: any;
68
69
  readonly effectiveRpcDriverName: any;
69
70
  } & {
@@ -120,6 +121,7 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
120
121
  }> | null;
121
122
  readonly adapterConfig: any;
122
123
  readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
124
+ readonly isMinimized: boolean;
123
125
  readonly parentDisplay: any;
124
126
  readonly effectiveRpcDriverName: any;
125
127
  } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
@@ -173,6 +175,7 @@ declare function stateModelFactory(pluginManager: PluginManager, configSchema: A
173
175
  }> | null;
174
176
  readonly adapterConfig: any;
175
177
  readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
178
+ readonly isMinimized: boolean;
176
179
  readonly parentDisplay: any;
177
180
  readonly effectiveRpcDriverName: any;
178
181
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
@@ -148,6 +148,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
148
148
  }> | null;
149
149
  readonly adapterConfig: any;
150
150
  readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
151
+ readonly isMinimized: boolean;
151
152
  readonly parentDisplay: any;
152
153
  readonly effectiveRpcDriverName: any;
153
154
  } & {
@@ -204,6 +205,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
204
205
  }> | null;
205
206
  readonly adapterConfig: any;
206
207
  readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
208
+ readonly isMinimized: boolean;
207
209
  readonly parentDisplay: any;
208
210
  readonly effectiveRpcDriverName: any;
209
211
  } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
@@ -257,6 +259,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
257
259
  }> | null;
258
260
  readonly adapterConfig: any;
259
261
  readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
262
+ readonly isMinimized: boolean;
260
263
  readonly parentDisplay: any;
261
264
  readonly effectiveRpcDriverName: any;
262
265
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
@@ -538,6 +541,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
538
541
  }> | null;
539
542
  readonly adapterConfig: any;
540
543
  readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
544
+ readonly isMinimized: boolean;
541
545
  readonly parentDisplay: any;
542
546
  readonly effectiveRpcDriverName: any;
543
547
  } & {
@@ -594,6 +598,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
594
598
  }> | null;
595
599
  readonly adapterConfig: any;
596
600
  readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
601
+ readonly isMinimized: boolean;
597
602
  readonly parentDisplay: any;
598
603
  readonly effectiveRpcDriverName: any;
599
604
  } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
@@ -647,6 +652,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
647
652
  }> | null;
648
653
  readonly adapterConfig: any;
649
654
  readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
655
+ readonly isMinimized: boolean;
650
656
  readonly parentDisplay: any;
651
657
  readonly effectiveRpcDriverName: any;
652
658
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
@@ -873,6 +879,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
873
879
  }> | null;
874
880
  readonly adapterConfig: any;
875
881
  readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
882
+ readonly isMinimized: boolean;
876
883
  readonly parentDisplay: any;
877
884
  readonly effectiveRpcDriverName: any;
878
885
  } & {
@@ -929,6 +936,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
929
936
  }> | null;
930
937
  readonly adapterConfig: any;
931
938
  readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
939
+ readonly isMinimized: boolean;
932
940
  readonly parentDisplay: any;
933
941
  readonly effectiveRpcDriverName: any;
934
942
  } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
@@ -982,6 +990,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
982
990
  }> | null;
983
991
  readonly adapterConfig: any;
984
992
  readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
993
+ readonly isMinimized: boolean;
985
994
  readonly parentDisplay: any;
986
995
  readonly effectiveRpcDriverName: any;
987
996
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
@@ -1114,10 +1123,18 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
1114
1123
  setHideLargeIndels(arg: boolean): void;
1115
1124
  } & {
1116
1125
  copyFeatureToClipboard(feature: Feature): Promise<void>;
1117
- readonly rendererConfig: any;
1126
+ readonly rendererConfig: {
1127
+ height: any;
1128
+ noSpacing: any;
1129
+ maxHeight: any;
1130
+ hideSmallIndels: any;
1131
+ hideMismatches: any;
1132
+ hideLargeIndels: any;
1133
+ };
1118
1134
  } & {
1119
1135
  readonly maxHeight: any;
1120
1136
  readonly featureHeightSetting: any;
1137
+ readonly noSpacingSetting: any;
1121
1138
  readonly featureUnderMouse: Feature | undefined;
1122
1139
  renderReady(): boolean;
1123
1140
  readonly filters: SerializableFilterChain;
@@ -1207,6 +1224,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
1207
1224
  }> | null;
1208
1225
  readonly adapterConfig: any;
1209
1226
  readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
1227
+ readonly isMinimized: boolean;
1210
1228
  readonly parentDisplay: any;
1211
1229
  readonly effectiveRpcDriverName: any;
1212
1230
  } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
@@ -1260,6 +1278,7 @@ export declare function SharedLinearPileupDisplayMixin(configSchema: AnyConfigur
1260
1278
  }> | null;
1261
1279
  readonly adapterConfig: any;
1262
1280
  readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
1281
+ readonly isMinimized: boolean;
1263
1282
  readonly parentDisplay: any;
1264
1283
  readonly effectiveRpcDriverName: any;
1265
1284
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
@@ -52,6 +52,9 @@ export function SharedLinearPileupDisplayMixin(configSchema) {
52
52
  }))
53
53
  .views(self => ({
54
54
  get autorunReady() {
55
+ if (self.isMinimized) {
56
+ return false;
57
+ }
55
58
  const view = getContainingView(self);
56
59
  return (view.initialized && self.featureDensityStatsReadyAndRegionNotTooLarge);
57
60
  },
@@ -152,25 +155,27 @@ export function SharedLinearPileupDisplayMixin(configSchema) {
152
155
  session.notify('Copied to clipboard', 'success');
153
156
  },
154
157
  get rendererConfig() {
155
- const { featureHeight: height, noSpacing, hideSmallIndels, hideMismatches, hideLargeIndels, trackMaxHeight: maxHeight, rendererTypeName, } = self;
156
- const configBlob = getConf(self, ['renderers', rendererTypeName]) || {};
158
+ const { featureHeight, noSpacing, hideSmallIndels, hideMismatches, hideLargeIndels, trackMaxHeight, rendererTypeName, } = self;
159
+ const conf = self.configuration.renderers?.[rendererTypeName];
157
160
  return {
158
- ...configBlob,
159
- ...(hideSmallIndels !== undefined ? { hideSmallIndels } : {}),
160
- ...(hideMismatches !== undefined ? { hideMismatches } : {}),
161
- ...(hideLargeIndels !== undefined ? { hideLargeIndels } : {}),
162
- ...(height !== undefined ? { height } : {}),
163
- ...(noSpacing !== undefined ? { noSpacing } : {}),
164
- ...(maxHeight !== undefined ? { maxHeight } : {}),
161
+ height: featureHeight ?? readConfObject(conf, 'height'),
162
+ noSpacing: noSpacing ?? readConfObject(conf, 'noSpacing'),
163
+ maxHeight: trackMaxHeight ?? readConfObject(conf, 'maxHeight'),
164
+ hideSmallIndels: hideSmallIndels ?? readConfObject(conf, 'hideSmallIndels'),
165
+ hideMismatches: hideMismatches ?? readConfObject(conf, 'hideMismatches'),
166
+ hideLargeIndels: hideLargeIndels ?? readConfObject(conf, 'hideLargeIndels'),
165
167
  };
166
168
  },
167
169
  }))
168
170
  .views(self => ({
169
171
  get maxHeight() {
170
- return readConfObject(self.rendererConfig, 'maxHeight');
172
+ return self.rendererConfig.maxHeight;
171
173
  },
172
174
  get featureHeightSetting() {
173
- return readConfObject(self.rendererConfig, 'height');
175
+ return self.rendererConfig.height;
176
+ },
177
+ get noSpacingSetting() {
178
+ return self.rendererConfig.noSpacing;
174
179
  },
175
180
  get featureUnderMouse() {
176
181
  return self.featureUnderMouseVolatile;
@@ -391,7 +396,8 @@ export function SharedLinearPileupDisplayMixin(configSchema) {
391
396
  {
392
397
  label: 'Normal',
393
398
  type: 'radio',
394
- checked: self.featureHeight === 7 && self.noSpacing === false,
399
+ checked: self.featureHeightSetting === 7 &&
400
+ self.noSpacingSetting === false,
395
401
  onClick: () => {
396
402
  self.setFeatureHeight(7);
397
403
  self.setNoSpacing(false);
@@ -400,7 +406,8 @@ export function SharedLinearPileupDisplayMixin(configSchema) {
400
406
  {
401
407
  label: 'Compact',
402
408
  type: 'radio',
403
- checked: self.featureHeight === 2 && self.noSpacing === true,
409
+ checked: self.featureHeightSetting === 2 &&
410
+ self.noSpacingSetting === true,
404
411
  onClick: () => {
405
412
  self.setFeatureHeight(2);
406
413
  self.setNoSpacing(true);
@@ -409,7 +416,8 @@ export function SharedLinearPileupDisplayMixin(configSchema) {
409
416
  {
410
417
  label: 'Super-compact',
411
418
  type: 'radio',
412
- checked: self.featureHeight === 1 && self.noSpacing === true,
419
+ checked: self.featureHeightSetting === 1 &&
420
+ self.noSpacingSetting === true,
413
421
  onClick: () => {
414
422
  self.setFeatureHeight(1);
415
423
  self.setNoSpacing(true);
@@ -5,21 +5,21 @@ import { setupModificationsAutorun } from "../shared/setupModificationsAutorun.j
5
5
  import { createAutorun } from "../util.js";
6
6
  export function doAfterAttach(model) {
7
7
  createAutorun(model, async () => {
8
- const view = getContainingView(model);
9
8
  if (!model.autorunReady) {
10
9
  return;
11
10
  }
11
+ const view = getContainingView(model);
12
12
  model.setCurrSortBpPerPx(view.bpPerPx);
13
13
  }, {
14
14
  delay: 1000,
15
15
  name: 'CurrBpPerPx',
16
16
  });
17
17
  createAutorun(model, async () => {
18
- const { rpcManager } = getSession(model);
19
- const view = getContainingView(model);
20
18
  if (!model.autorunReady) {
21
19
  return;
22
20
  }
21
+ const { rpcManager } = getSession(model);
22
+ const view = getContainingView(model);
23
23
  const { sortedBy, adapterConfig, rendererType, sortReady } = model;
24
24
  const { bpPerPx } = view;
25
25
  if (sortedBy && (!sortReady || model.currSortBpPerPx === view.bpPerPx)) {
@@ -151,6 +151,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
151
151
  }> | null;
152
152
  readonly adapterConfig: any;
153
153
  readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
154
+ readonly isMinimized: boolean;
154
155
  readonly parentDisplay: any;
155
156
  readonly effectiveRpcDriverName: any;
156
157
  } & {
@@ -207,6 +208,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
207
208
  }> | null;
208
209
  readonly adapterConfig: any;
209
210
  readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
211
+ readonly isMinimized: boolean;
210
212
  readonly parentDisplay: any;
211
213
  readonly effectiveRpcDriverName: any;
212
214
  } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
@@ -260,6 +262,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
260
262
  }> | null;
261
263
  readonly adapterConfig: any;
262
264
  readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
265
+ readonly isMinimized: boolean;
263
266
  readonly parentDisplay: any;
264
267
  readonly effectiveRpcDriverName: any;
265
268
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
@@ -541,6 +544,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
541
544
  }> | null;
542
545
  readonly adapterConfig: any;
543
546
  readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
547
+ readonly isMinimized: boolean;
544
548
  readonly parentDisplay: any;
545
549
  readonly effectiveRpcDriverName: any;
546
550
  } & {
@@ -597,6 +601,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
597
601
  }> | null;
598
602
  readonly adapterConfig: any;
599
603
  readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
604
+ readonly isMinimized: boolean;
600
605
  readonly parentDisplay: any;
601
606
  readonly effectiveRpcDriverName: any;
602
607
  } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
@@ -650,6 +655,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
650
655
  }> | null;
651
656
  readonly adapterConfig: any;
652
657
  readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
658
+ readonly isMinimized: boolean;
653
659
  readonly parentDisplay: any;
654
660
  readonly effectiveRpcDriverName: any;
655
661
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
@@ -876,6 +882,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
876
882
  }> | null;
877
883
  readonly adapterConfig: any;
878
884
  readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
885
+ readonly isMinimized: boolean;
879
886
  readonly parentDisplay: any;
880
887
  readonly effectiveRpcDriverName: any;
881
888
  } & {
@@ -932,6 +939,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
932
939
  }> | null;
933
940
  readonly adapterConfig: any;
934
941
  readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
942
+ readonly isMinimized: boolean;
935
943
  readonly parentDisplay: any;
936
944
  readonly effectiveRpcDriverName: any;
937
945
  } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
@@ -985,6 +993,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
985
993
  }> | null;
986
994
  readonly adapterConfig: any;
987
995
  readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
996
+ readonly isMinimized: boolean;
988
997
  readonly parentDisplay: any;
989
998
  readonly effectiveRpcDriverName: any;
990
999
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
@@ -1117,10 +1126,18 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
1117
1126
  setHideLargeIndels(arg: boolean): void;
1118
1127
  } & {
1119
1128
  copyFeatureToClipboard(feature: import("@jbrowse/core/util").Feature): Promise<void>;
1120
- readonly rendererConfig: any;
1129
+ readonly rendererConfig: {
1130
+ height: any;
1131
+ noSpacing: any;
1132
+ maxHeight: any;
1133
+ hideSmallIndels: any;
1134
+ hideMismatches: any;
1135
+ hideLargeIndels: any;
1136
+ };
1121
1137
  } & {
1122
1138
  readonly maxHeight: any;
1123
1139
  readonly featureHeightSetting: any;
1140
+ readonly noSpacingSetting: any;
1124
1141
  readonly featureUnderMouse: import("@jbrowse/core/util").Feature | undefined;
1125
1142
  renderReady(): boolean;
1126
1143
  readonly filters: import("@jbrowse/core/pluggableElementTypes/renderers/util/serializableFilterChain").default;
@@ -1210,6 +1227,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
1210
1227
  }> | null;
1211
1228
  readonly adapterConfig: any;
1212
1229
  readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
1230
+ readonly isMinimized: boolean;
1213
1231
  readonly parentDisplay: any;
1214
1232
  readonly effectiveRpcDriverName: any;
1215
1233
  } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
@@ -1263,6 +1281,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
1263
1281
  }> | null;
1264
1282
  readonly adapterConfig: any;
1265
1283
  readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
1284
+ readonly isMinimized: boolean;
1266
1285
  readonly parentDisplay: any;
1267
1286
  readonly effectiveRpcDriverName: any;
1268
1287
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
@@ -1351,7 +1370,15 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
1351
1370
  reload(): void;
1352
1371
  } & {
1353
1372
  readonly modificationThreshold: any;
1354
- readonly rendererConfig: any;
1373
+ readonly rendererConfig: {
1374
+ height: any;
1375
+ noSpacing: any;
1376
+ maxHeight: any;
1377
+ mismatchAlpha: any;
1378
+ hideSmallIndels: any;
1379
+ hideMismatches: any;
1380
+ hideLargeIndels: any;
1381
+ };
1355
1382
  } & {
1356
1383
  readonly mismatchAlphaSetting: any;
1357
1384
  renderReady(): boolean;
@@ -1,5 +1,5 @@
1
1
  import { lazy } from 'react';
2
- import { ConfigurationReference, getConf, readConfObject, } from '@jbrowse/core/configuration';
2
+ import { ConfigurationReference, readConfObject, } from '@jbrowse/core/configuration';
3
3
  import { getContainingView, getSession } from '@jbrowse/core/util';
4
4
  import { types } from '@jbrowse/mobx-state-tree';
5
5
  import ColorLensIcon from '@mui/icons-material/ColorLens';
@@ -91,18 +91,16 @@ function stateModelFactory(configSchema) {
91
91
  return self.colorBy?.modifications?.threshold ?? 10;
92
92
  },
93
93
  get rendererConfig() {
94
- const { featureHeight, noSpacing, trackMaxHeight, mismatchAlpha, rendererTypeName, hideSmallIndels, hideMismatches, } = self;
95
- const configBlob = getConf(self, ['renderers', rendererTypeName]) || {};
94
+ const { featureHeight, noSpacing, trackMaxHeight, mismatchAlpha, hideSmallIndels, hideMismatches, hideLargeIndels, } = self;
95
+ const conf = self.configuration.renderers?.PileupRenderer;
96
96
  return {
97
- ...configBlob,
98
- ...(featureHeight !== undefined ? { height: featureHeight } : {}),
99
- ...(hideSmallIndels !== undefined ? { hideSmallIndels } : {}),
100
- ...(hideMismatches !== undefined ? { hideMismatches } : {}),
101
- ...(noSpacing !== undefined ? { noSpacing } : {}),
102
- ...(mismatchAlpha !== undefined ? { mismatchAlpha } : {}),
103
- ...(trackMaxHeight !== undefined
104
- ? { maxHeight: trackMaxHeight }
105
- : {}),
97
+ height: featureHeight ?? readConfObject(conf, 'height'),
98
+ noSpacing: noSpacing ?? readConfObject(conf, 'noSpacing'),
99
+ maxHeight: trackMaxHeight ?? readConfObject(conf, 'maxHeight'),
100
+ mismatchAlpha: mismatchAlpha ?? readConfObject(conf, 'mismatchAlpha'),
101
+ hideSmallIndels: hideSmallIndels ?? readConfObject(conf, 'hideSmallIndels'),
102
+ hideMismatches: hideMismatches ?? readConfObject(conf, 'hideMismatches'),
103
+ hideLargeIndels: hideLargeIndels ?? readConfObject(conf, 'hideLargeIndels'),
106
104
  };
107
105
  },
108
106
  }))
@@ -110,7 +108,7 @@ function stateModelFactory(configSchema) {
110
108
  const { renderReady: superRenderReady } = self;
111
109
  return {
112
110
  get mismatchAlphaSetting() {
113
- return readConfObject(self.rendererConfig, 'mismatchAlpha');
111
+ return self.rendererConfig.mismatchAlpha;
114
112
  },
115
113
  renderReady() {
116
114
  const view = getContainingView(self);
@@ -4,10 +4,10 @@ import { getUniqueTags } from "../shared/getUniqueTags.js";
4
4
  import { createAutorun } from "../util.js";
5
5
  export function sharedDoAfterAttach(self) {
6
6
  createAutorun(self, async () => {
7
- const view = getContainingView(self);
8
7
  if (!self.autorunReady) {
9
8
  return;
10
9
  }
10
+ const view = getContainingView(self);
11
11
  const { colorBy, tagsReady } = self;
12
12
  const { staticBlocks } = view;
13
13
  if (colorBy?.tag && !tagsReady) {
@@ -70,6 +70,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
70
70
  }> | null;
71
71
  readonly adapterConfig: any;
72
72
  readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
73
+ readonly isMinimized: boolean;
73
74
  readonly parentDisplay: any;
74
75
  readonly effectiveRpcDriverName: any;
75
76
  } & {
@@ -126,6 +127,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
126
127
  }> | null;
127
128
  readonly adapterConfig: any;
128
129
  readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
130
+ readonly isMinimized: boolean;
129
131
  readonly parentDisplay: any;
130
132
  readonly effectiveRpcDriverName: any;
131
133
  } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
@@ -179,6 +181,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
179
181
  }> | null;
180
182
  readonly adapterConfig: any;
181
183
  readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
184
+ readonly isMinimized: boolean;
182
185
  readonly parentDisplay: any;
183
186
  readonly effectiveRpcDriverName: any;
184
187
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
@@ -79,6 +79,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
79
79
  }> | null;
80
80
  readonly adapterConfig: any;
81
81
  readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
82
+ readonly isMinimized: boolean;
82
83
  readonly parentDisplay: any;
83
84
  readonly effectiveRpcDriverName: any;
84
85
  } & {
@@ -135,6 +136,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
135
136
  }> | null;
136
137
  readonly adapterConfig: any;
137
138
  readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
139
+ readonly isMinimized: boolean;
138
140
  readonly parentDisplay: any;
139
141
  readonly effectiveRpcDriverName: any;
140
142
  } & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
@@ -188,6 +190,7 @@ declare function stateModelFactory(configSchema: AnyConfigurationSchemaType): im
188
190
  }> | null;
189
191
  readonly adapterConfig: any;
190
192
  readonly parentTrack: import("@jbrowse/core/util").AbstractTrackModel;
193
+ readonly isMinimized: boolean;
191
194
  readonly parentDisplay: any;
192
195
  readonly effectiveRpcDriverName: any;
193
196
  }, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
@@ -61,17 +61,18 @@ function stateModelFactory(pluginManager, configSchema) {
61
61
  return self.colorBy?.modifications?.threshold ?? 10;
62
62
  },
63
63
  get rendererConfig() {
64
- const configBlob = getConf(self, ['renderers', self.rendererTypeName]) || {};
65
64
  const { showArcs, showInterbaseCounts, showInterbaseIndicators } = self;
65
+ const conf = self.configuration.renderers?.[self.rendererTypeName];
66
66
  return {
67
- ...configBlob,
68
- showInterbaseCounts: showInterbaseCounts ?? configBlob.showInterbaseCounts,
69
- showInterbaseIndicators: showInterbaseIndicators ?? configBlob.showInterbaseIndicators,
70
- showArcs: showArcs ?? configBlob.showArcs,
67
+ showInterbaseCounts: showInterbaseCounts ??
68
+ readConfObject(conf, 'showInterbaseCounts'),
69
+ showInterbaseIndicators: showInterbaseIndicators ??
70
+ readConfObject(conf, 'showInterbaseIndicators'),
71
+ showArcs: showArcs ?? readConfObject(conf, 'showArcs'),
71
72
  };
72
73
  },
73
74
  get showArcsSetting() {
74
- return (self.showArcs ?? readConfObject(this.rendererConfig, 'showArcs'));
75
+ return this.rendererConfig.showArcs;
75
76
  },
76
77
  get skipFeatures() {
77
78
  if (!this.showArcsSetting) {
@@ -92,12 +93,10 @@ function stateModelFactory(pluginManager, configSchema) {
92
93
  return [...skipFeaturesMap.values()];
93
94
  },
94
95
  get showInterbaseCountsSetting() {
95
- return (self.showInterbaseCounts ??
96
- readConfObject(this.rendererConfig, 'showInterbaseCounts'));
96
+ return this.rendererConfig.showInterbaseCounts;
97
97
  },
98
98
  get showInterbaseIndicatorsSetting() {
99
- return (self.showInterbaseIndicators ??
100
- readConfObject(this.rendererConfig, 'showInterbaseIndicators'));
99
+ return this.rendererConfig.showInterbaseIndicators;
101
100
  },
102
101
  get autorunReady() {
103
102
  const view = getContainingView(self);
@@ -156,10 +156,14 @@ export default class SNPCoverageAdapter extends BaseFeatureDataAdapter {
156
156
  }
157
157
  async getCoverageBins(region, opts = {}) {
158
158
  const { bpPerPx, statsEstimationMode } = opts;
159
- if (this.lastBpPerPx !== undefined && this.lastBpPerPx !== bpPerPx) {
159
+ if (bpPerPx !== undefined &&
160
+ this.lastBpPerPx !== undefined &&
161
+ this.lastBpPerPx !== bpPerPx) {
160
162
  this.cache.clear();
161
163
  }
162
- this.lastBpPerPx = bpPerPx;
164
+ if (bpPerPx !== undefined) {
165
+ this.lastBpPerPx = bpPerPx;
166
+ }
163
167
  if (statsEstimationMode) {
164
168
  const regionFilterKey = makeRegionFilterKey(region, opts);
165
169
  for (const key of this.cache.keys()) {
@@ -79,6 +79,7 @@ export async function generateCoverageBinsPrefixSum({ fetchSequence, features, r
79
79
  for (let i = 0, l = features.length; i < l; i++) {
80
80
  processFeature(region, features[i], skipmap, noncovEvents, snpEvents);
81
81
  }
82
+ featureCtx.feature = undefined;
82
83
  const deletionDepth = new Int32Array(regionSize);
83
84
  let dd = 0;
84
85
  for (let i = 0; i < regionSize; i++) {
@@ -346,7 +347,6 @@ function mismatchHandler(type, start, refLen, base, _qual, altbase, interbaseLen
346
347
  const hash = `${mstart}_${mend}_${effectiveStrand}`;
347
348
  if (skipmap[hash] === undefined) {
348
349
  skipmap[hash] = {
349
- feature: feature,
350
350
  start: mstart,
351
351
  end: mend,
352
352
  strand: fstrand,
@@ -33,18 +33,23 @@ export function createRPCRenderFunction({ self, rpcMethodName, getRPCParams, onR
33
33
  const stopToken = createStopToken();
34
34
  self.setRenderingStopToken(stopToken);
35
35
  self.setLoading(true);
36
- const viewSnapshot = structuredClone({
37
- ...getSnapshot(view),
38
- staticBlocks: view.staticBlocks,
36
+ const viewSnapshot = {
37
+ displayedRegions: structuredClone(view.displayedRegions),
38
+ bpPerPx: view.bpPerPx,
39
+ offsetPx: view.offsetPx,
40
+ interRegionPaddingWidth: view.interRegionPaddingWidth,
41
+ minimumBlockWidth: view.minimumBlockWidth,
39
42
  width: view.width,
40
- });
43
+ };
41
44
  const sessionId = getRpcSessionId(self);
45
+ const adapterConfig = self.adapterConfig;
46
+ const config = getSnapshot(self.configuration);
42
47
  const result = (await rpcManager.call(sessionId, rpcMethodName, {
43
48
  sessionId,
44
49
  view: viewSnapshot,
45
- adapterConfig: self.adapterConfig,
50
+ adapterConfig,
46
51
  sequenceAdapter,
47
- config: getSnapshot(self.configuration),
52
+ config,
48
53
  statusCallback: (msg) => {
49
54
  if (isAlive(self)) {
50
55
  self.setStatusMessage?.(msg);
@@ -2,7 +2,6 @@ import type { MismatchCallback } from './forEachMismatchTypes.ts';
2
2
  import type { Feature } from '@jbrowse/core/util';
3
3
  export type SkipMap = Record<string, {
4
4
  score: number;
5
- feature: unknown;
6
5
  start: number;
7
6
  end: number;
8
7
  strand: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-alignments",
3
- "version": "4.0.2",
3
+ "version": "4.0.4",
4
4
  "description": "JBrowse 2 alignments adapters, tracks, etc.",
5
5
  "keywords": [
6
6
  "jbrowse",
@@ -25,7 +25,7 @@
25
25
  "@jbrowse/mobx-state-tree": "^5.5.0",
26
26
  "@mui/icons-material": "^7.3.6",
27
27
  "@mui/material": "^7.3.6",
28
- "@mui/x-charts-vendor": "^8.23.0",
28
+ "@mui/x-charts-vendor": "^8.25.0",
29
29
  "canvas2svg": "^1.0.16",
30
30
  "copy-to-clipboard": "^3.3.3",
31
31
  "fast-deep-equal": "^3.1.3",
@@ -33,10 +33,10 @@
33
33
  "mobx": "^6.15.0",
34
34
  "mobx-react": "^9.2.1",
35
35
  "rxjs": "^7.8.2",
36
- "@jbrowse/core": "^4.0.2",
37
- "@jbrowse/plugin-wiggle": "^4.0.2",
38
- "@jbrowse/sv-core": "^4.0.2",
39
- "@jbrowse/plugin-linear-genome-view": "^4.0.2"
36
+ "@jbrowse/core": "^4.0.4",
37
+ "@jbrowse/plugin-linear-genome-view": "^4.0.4",
38
+ "@jbrowse/plugin-wiggle": "^4.0.4",
39
+ "@jbrowse/sv-core": "^4.0.4"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "react": ">=18.0.0"