jbrowse-plugin-msaview 2.6.4 → 2.6.6

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.
@@ -8,10 +8,15 @@ const MsaToGenomeHighlight = observer(function MsaToGenomeHighlight2({ model, })
8
8
  const msaView = views
9
9
  .filter(isMsaView)
10
10
  .find(v => v.connectedViewId === model.id);
11
- const highlights = msaView?.connectedHighlights;
12
- // Suppress codon highlight while hovering the LGV — GenomeMouseoverHighlight
13
- // handles the single-bp display in that case
14
- return !hasHoverPosition(hovered) && highlights?.length ? (React.createElement(MsaToGenomeHighlightRenderer, { model: model, highlights: highlights })) : null;
11
+ // The persistent click selection always shows. The hover codon is suppressed
12
+ // while hovering the LGV — GenomeMouseoverHighlight handles the single-bp
13
+ // display in that case, so we don't stack a wider codon band on top of it.
14
+ const clickHighlight = msaView?.connectedClickHighlight;
15
+ const hoverHighlight = hasHoverPosition(hovered)
16
+ ? undefined
17
+ : msaView?.connectedHoverHighlight;
18
+ const highlights = [clickHighlight, hoverHighlight].filter((r) => r !== undefined);
19
+ return highlights.length ? (React.createElement(MsaToGenomeHighlightRenderer, { model: model, highlights: highlights })) : null;
15
20
  });
16
21
  // Inner component: handles the scroll-dependent rendering
17
22
  const MsaToGenomeHighlightRenderer = observer(function ({ model, highlights, }) {
@@ -384,43 +384,92 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
384
384
  name: string;
385
385
  accession: string;
386
386
  description: string;
387
+ featureType: string | undefined;
387
388
  start: number;
388
389
  end: number;
390
+ strand: number | undefined;
389
391
  }>;
390
392
  readonly tidyInterProAnnotations: {
391
393
  id: string;
392
394
  name: string;
393
395
  accession: string;
394
396
  description: string;
397
+ featureType: string | undefined;
395
398
  start: number;
396
399
  end: number;
400
+ strand: number | undefined;
397
401
  }[];
398
402
  readonly tidyFilteredInterProAnnotations: {
399
403
  id: string;
400
404
  name: string;
401
405
  accession: string;
402
406
  description: string;
407
+ featureType: string | undefined;
403
408
  start: number;
404
409
  end: number;
410
+ strand: number | undefined;
405
411
  }[];
406
412
  readonly tidyFilteredGatheredInterProAnnotations: Record<string, {
407
413
  id: string;
408
414
  name: string;
409
415
  accession: string;
410
416
  description: string;
417
+ featureType: string | undefined;
411
418
  start: number;
412
419
  end: number;
420
+ strand: number | undefined;
413
421
  }[]>;
414
422
  } & {
415
423
  readonly showVerticalScrollbar: boolean;
416
424
  } & {
417
425
  readonly verticalScrollbarWidth: 0 | 20;
426
+ readonly segmentDomainTypes: {
427
+ id: string;
428
+ name: string;
429
+ accession: string;
430
+ description: string;
431
+ featureType: string | undefined;
432
+ start: number;
433
+ end: number;
434
+ strand: number | undefined;
435
+ }[];
436
+ readonly categoricalDomainTypes: {
437
+ id: string;
438
+ name: string;
439
+ accession: string;
440
+ description: string;
441
+ featureType: string | undefined;
442
+ start: number;
443
+ end: number;
444
+ strand: number | undefined;
445
+ }[];
418
446
  readonly fillPalette: {
419
- [k: string]: string;
447
+ [x: string]: string;
420
448
  };
421
449
  readonly strokePalette: {
422
450
  [k: string]: string;
423
451
  };
452
+ readonly segmentLabels: Map<string, string>;
453
+ readonly visibleDomainTypes: {
454
+ id: string;
455
+ name: string;
456
+ accession: string;
457
+ description: string;
458
+ featureType: string | undefined;
459
+ start: number;
460
+ end: number;
461
+ strand: number | undefined;
462
+ }[];
463
+ readonly mouseOverDomains: {
464
+ id: string;
465
+ name: string;
466
+ accession: string;
467
+ description: string;
468
+ featureType: string | undefined;
469
+ start: number;
470
+ end: number;
471
+ strand: number | undefined;
472
+ }[];
424
473
  getRowData(name: string): {
425
474
  data: {
426
475
  name?: string;
@@ -477,6 +526,19 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
477
526
  */
478
527
  readonly connectedView: MaybeLGV;
479
528
  } & {
529
+ /**
530
+ * #getter
531
+ * Genome region under the current MSA hover column. Suppressed on the LGV
532
+ * while it's being hovered (GenomeMouseoverHighlight shows the crisp 1bp
533
+ * marker there instead of this wider codon band).
534
+ */
535
+ readonly connectedHoverHighlight: IRegion | undefined;
536
+ /**
537
+ * #getter
538
+ * Genome region under the persistent MSA click selection. Shown
539
+ * regardless of LGV hover, so hovering the genome doesn't hide it.
540
+ */
541
+ readonly connectedClickHighlight: IRegion | undefined;
480
542
  /**
481
543
  * #getter
482
544
  */
@@ -111,19 +111,34 @@ export default function stateModelFactory() {
111
111
  },
112
112
  }))
113
113
  .views(self => ({
114
+ /**
115
+ * #getter
116
+ * Genome region under the current MSA hover column. Suppressed on the LGV
117
+ * while it's being hovered (GenomeMouseoverHighlight shows the crisp 1bp
118
+ * marker there instead of this wider codon band).
119
+ */
120
+ get connectedHoverHighlight() {
121
+ const { mouseCol } = self;
122
+ return mouseCol === undefined
123
+ ? undefined
124
+ : msaCoordToGenomeCoord({ model: self, coord: mouseCol });
125
+ },
126
+ /**
127
+ * #getter
128
+ * Genome region under the persistent MSA click selection. Shown
129
+ * regardless of LGV hover, so hovering the genome doesn't hide it.
130
+ */
131
+ get connectedClickHighlight() {
132
+ const { mouseClickCol } = self;
133
+ return mouseClickCol === undefined
134
+ ? undefined
135
+ : msaCoordToGenomeCoord({ model: self, coord: mouseClickCol });
136
+ },
114
137
  /**
115
138
  * #getter
116
139
  */
117
140
  get connectedHighlights() {
118
- const { mouseCol, mouseClickCol } = self;
119
- return [
120
- mouseCol === undefined
121
- ? undefined
122
- : msaCoordToGenomeCoord({ model: self, coord: mouseCol }),
123
- mouseClickCol === undefined
124
- ? undefined
125
- : msaCoordToGenomeCoord({ model: self, coord: mouseClickCol }),
126
- ].filter((r) => r !== undefined);
141
+ return [this.connectedHoverHighlight, this.connectedClickHighlight].filter((r) => r !== undefined);
127
142
  },
128
143
  }))
129
144
  .actions(self => ({