@jbrowse/plugin-linear-genome-view 5.0.0-beta.1 → 5.0.0-beta.10
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/esm/FeatureTrack/configSchema.d.ts +142 -50
- package/esm/LaunchLinearGenomeView/index.js +2 -13
- package/esm/LinearGenomeView/afterAttach.d.ts +5 -5
- package/esm/LinearGenomeView/afterAttach.js +73 -59
- package/esm/LinearGenomeView/components/CenterLine.js +5 -3
- package/esm/LinearGenomeView/components/CrisprGuidePanel.js +3 -5
- package/esm/LinearGenomeView/components/ExportSvgDialog.d.ts +3 -2
- package/esm/LinearGenomeView/components/ExportSvgDialog.js +6 -2
- package/esm/LinearGenomeView/components/GetSequenceDialog.js +2 -2
- package/esm/LinearGenomeView/components/Header.js +11 -1
- package/esm/LinearGenomeView/components/HeaderClearHighlightButton.js +2 -2
- package/esm/LinearGenomeView/components/HeaderPanControls.js +2 -1
- package/esm/LinearGenomeView/components/HeaderZoomControls.js +4 -34
- package/esm/LinearGenomeView/components/Highlight.js +7 -7
- package/esm/LinearGenomeView/components/HighlightBand.js +2 -2
- package/esm/LinearGenomeView/components/HighlightChip.d.ts +1 -2
- package/esm/LinearGenomeView/components/HighlightChip.js +5 -7
- package/esm/LinearGenomeView/components/HoverPositionHighlight.js +3 -3
- package/esm/LinearGenomeView/components/ImportForm.js +2 -2
- package/esm/LinearGenomeView/components/LinearGenomeView.js +3 -3
- package/esm/LinearGenomeView/components/LinearGenomeViewContainer.js +3 -4
- package/esm/LinearGenomeView/components/MiniControls.js +3 -2
- package/esm/LinearGenomeView/components/OverviewHighlight.js +3 -3
- package/esm/LinearGenomeView/components/OverviewHighlightBand.js +2 -3
- package/esm/LinearGenomeView/components/OverviewRubberband.js +20 -45
- package/esm/LinearGenomeView/components/OverviewScalebar.js +4 -5
- package/esm/LinearGenomeView/components/OverviewScalebarPolygon.js +5 -3
- package/esm/LinearGenomeView/components/PaddingBlocks.d.ts +1 -1
- package/esm/LinearGenomeView/components/PaddingBlocks.js +14 -9
- package/esm/LinearGenomeView/components/RangeSelectOverlay.js +5 -6
- package/esm/LinearGenomeView/components/ResizeAllTracksHandle.d.ts +5 -0
- package/esm/LinearGenomeView/components/ResizeAllTracksHandle.js +71 -0
- package/esm/LinearGenomeView/components/Rubberband.d.ts +1 -2
- package/esm/LinearGenomeView/components/Rubberband.js +3 -2
- package/esm/LinearGenomeView/components/SVGHighlightBand.js +2 -3
- package/esm/LinearGenomeView/components/Scalebar.d.ts +2 -6
- package/esm/LinearGenomeView/components/Scalebar.js +8 -5
- package/esm/LinearGenomeView/components/ScalebarRefNameLabels.js +49 -34
- package/esm/LinearGenomeView/components/SearchBox.js +8 -7
- package/esm/LinearGenomeView/components/SearchResultsDialog.d.ts +2 -1
- package/esm/LinearGenomeView/components/SearchResultsDialog.js +2 -2
- package/esm/LinearGenomeView/components/SearchResultsTable.d.ts +2 -1
- package/esm/LinearGenomeView/components/SearchResultsTable.js +12 -29
- package/esm/LinearGenomeView/components/SequenceSearchDialog.d.ts +2 -4
- package/esm/LinearGenomeView/components/TrackContainer.js +63 -9
- package/esm/LinearGenomeView/components/TrackLabel.js +10 -3
- package/esm/LinearGenomeView/components/TrackLabelButtons.js +2 -2
- package/esm/LinearGenomeView/components/TrackLabelDragHandle.js +2 -2
- package/esm/LinearGenomeView/components/TrackLabelMenu.js +3 -2
- package/esm/LinearGenomeView/components/TrackRenderingContainer.d.ts +4 -1
- package/esm/LinearGenomeView/components/TrackRenderingContainer.js +11 -23
- package/esm/LinearGenomeView/components/TracksContainer.js +10 -22
- package/esm/LinearGenomeView/components/VerticalGuide.d.ts +1 -2
- package/esm/LinearGenomeView/components/VerticalGuide.js +3 -16
- package/esm/LinearGenomeView/components/ZoomButton.js +6 -1
- package/esm/LinearGenomeView/components/ZoomTransform.js +4 -0
- package/esm/LinearGenomeView/components/fetchSequence.d.ts +1 -2
- package/esm/LinearGenomeView/components/recentLocationsMenu.js +10 -0
- package/esm/LinearGenomeView/components/searchModes.d.ts +1 -1
- package/esm/LinearGenomeView/components/searchModes.js +1 -1
- package/esm/LinearGenomeView/components/useRangeSelect.d.ts +0 -3
- package/esm/LinearGenomeView/components/useRangeSelect.js +20 -59
- package/esm/LinearGenomeView/components/useSideScroll.d.ts +16 -2
- package/esm/LinearGenomeView/components/useSideScroll.js +153 -103
- package/esm/LinearGenomeView/components/util.d.ts +4 -0
- package/esm/LinearGenomeView/components/util.js +4 -2
- package/esm/LinearGenomeView/consts.d.ts +2 -0
- package/esm/LinearGenomeView/consts.js +3 -1
- package/esm/LinearGenomeView/containingLgv.d.ts +21 -0
- package/esm/LinearGenomeView/containingLgv.js +23 -0
- package/esm/LinearGenomeView/headerFit.d.ts +4 -2
- package/esm/LinearGenomeView/headerFit.js +20 -7
- package/esm/LinearGenomeView/index.d.ts +1 -5
- package/esm/LinearGenomeView/index.js +10 -7
- package/esm/LinearGenomeView/keyboardHandler.d.ts +2 -0
- package/esm/LinearGenomeView/keyboardHandler.js +15 -1
- package/esm/LinearGenomeView/launchKeys.d.ts +2 -0
- package/esm/LinearGenomeView/launchKeys.js +27 -0
- package/esm/LinearGenomeView/lazyDialogs.d.ts +2 -4
- package/esm/LinearGenomeView/lazyDialogs.js +1 -0
- package/esm/LinearGenomeView/linkedViewSync.d.ts +3 -11
- package/esm/LinearGenomeView/linkedViewSync.js +27 -43
- package/esm/LinearGenomeView/menuItems.d.ts +16 -18
- package/esm/LinearGenomeView/menuItems.js +242 -151
- package/esm/LinearGenomeView/model.d.ts +2009 -200
- package/esm/LinearGenomeView/model.js +545 -395
- package/esm/LinearGenomeView/sharedScaleContainer.d.ts +1 -1
- package/esm/LinearGenomeView/showRegionsWithUndo.js +7 -1
- package/esm/LinearGenomeView/stickyChrome.d.ts +5 -9
- package/esm/LinearGenomeView/stickyChrome.js +5 -9
- package/esm/LinearGenomeView/svgcomponents/SVGGridlines.js +4 -4
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.d.ts +4 -1
- package/esm/LinearGenomeView/svgcomponents/SVGHeader.js +8 -21
- package/esm/LinearGenomeView/svgcomponents/SVGHighlights.js +8 -8
- package/esm/LinearGenomeView/svgcomponents/SVGHighlightsOverlay.js +3 -3
- package/esm/LinearGenomeView/svgcomponents/SVGLinearGenomeView.js +7 -11
- package/esm/LinearGenomeView/svgcomponents/SVGRegionSeparators.js +2 -5
- package/esm/LinearGenomeView/svgcomponents/SVGRowHeader.js +5 -6
- package/esm/LinearGenomeView/svgcomponents/SVGRuler.js +9 -10
- package/esm/LinearGenomeView/svgcomponents/SVGScalebar.js +3 -3
- package/esm/LinearGenomeView/svgcomponents/SVGStackedRow.d.ts +27 -0
- package/esm/LinearGenomeView/svgcomponents/SVGStackedRow.js +12 -0
- package/esm/LinearGenomeView/svgcomponents/SVGTrackLabel.js +15 -6
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.d.ts +4 -4
- package/esm/LinearGenomeView/svgcomponents/SVGTracks.js +6 -5
- package/esm/LinearGenomeView/svgcomponents/SVGView.d.ts +1 -1
- package/esm/LinearGenomeView/svgcomponents/SVGView.js +1 -1
- package/esm/LinearGenomeView/svgcomponents/figureContract.js +14 -14
- package/esm/LinearGenomeView/svgcomponents/renderViewTracks.js +1 -1
- package/esm/LinearGenomeView/svgcomponents/useViewSvgFigure.js +50 -68
- package/esm/LinearGenomeView/svgcomponents/util.d.ts +9 -5
- package/esm/LinearGenomeView/svgcomponents/util.js +26 -21
- package/esm/LinearGenomeView/types.d.ts +8 -11
- package/esm/LinearGenomeView/util.d.ts +60 -45
- package/esm/LinearGenomeView/util.js +131 -160
- package/esm/MultiLevelRubberband/MultiLevelRubberband.js +7 -4
- package/esm/MultiLevelRubberband/index.d.ts +2 -0
- package/esm/MultiLevelRubberband/index.js +2 -0
- package/esm/MultiLevelRubberband/menuItems.d.ts +34 -0
- package/esm/MultiLevelRubberband/menuItems.js +52 -0
- package/esm/MultiLevelRubberband/rowLabel.d.ts +22 -0
- package/esm/MultiLevelRubberband/rowLabel.js +27 -0
- package/esm/MultiLevelRubberband/types.d.ts +1 -0
- package/esm/MultiLevelRubberband/useRangeSelect.d.ts +2 -1
- package/esm/MultiLevelRubberband/useRangeSelect.js +31 -47
- package/esm/displayKitTests/perRegionTestEnv.d.ts +214 -86
- package/esm/displayKitTests/perRegionTestEnv.js +30 -29
- package/esm/index.d.ts +15 -85
- package/esm/index.js +13 -36
- package/esm/searchUtils.d.ts +18 -9
- package/esm/searchUtils.js +85 -69
- package/esm/shared/RubberbandSpan.js +2 -1
- package/esm/shared/coordLabels.d.ts +7 -0
- package/esm/shared/coordLabels.js +15 -1
- package/esm/shared/useWindowDrag.d.ts +18 -0
- package/esm/shared/useWindowDrag.js +45 -0
- package/package.json +10 -10
- package/esm/LinearGenomeView/FloatingSvgOverlay.d.ts +0 -5
- package/esm/LinearGenomeView/FloatingSvgOverlay.js +0 -25
- package/esm/LinearGenomeView/initKeys.d.ts +0 -13
- package/esm/LinearGenomeView/initKeys.js +0 -104
- package/esm/MultiLevelRubberband/VerticalGuide.d.ts +0 -6
- package/esm/MultiLevelRubberband/VerticalGuide.js +0 -21
- package/esm/lazyPluginExports.d.ts +0 -23
- package/esm/lazyPluginExports.js +0 -36
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { BpOffset, ExportSvgOptions, HighlightType, InitState, NavLocation, VolatileGuide } from './types.ts';
|
|
1
|
+
import type { BpOffset, ExportSvgOptions, HighlightType, InitState, NavLocation, ViewTrackLabelMode, VolatileGuide } from './types.ts';
|
|
2
|
+
import type { RegionEdit } from './util.ts';
|
|
2
3
|
import type PluginManager from '@jbrowse/core/PluginManager';
|
|
3
4
|
import type BaseResult from '@jbrowse/core/TextSearch/BaseResults';
|
|
4
5
|
import type { MenuItem } from '@jbrowse/core/ui';
|
|
@@ -7,36 +8,47 @@ import type { ViewLayout } from '@jbrowse/core/util/Base1DUtils';
|
|
|
7
8
|
import type { BlockSet, ContentBlock } from '@jbrowse/core/util/blockTypes';
|
|
8
9
|
import type { Region } from '@jbrowse/core/util/types';
|
|
9
10
|
import type { ViewStatus } from '@jbrowse/core/util/viewStatus';
|
|
11
|
+
import type { LaunchInput } from '@jbrowse/core/util/withLaunchInput';
|
|
10
12
|
import type { Instance } from '@jbrowse/mobx-state-tree';
|
|
13
|
+
/** One span of the row that is not track data — see `paddingSpans`. */
|
|
14
|
+
export interface PaddingSpan {
|
|
15
|
+
key: string;
|
|
16
|
+
x: number;
|
|
17
|
+
width: number;
|
|
18
|
+
kind: 'seam' | 'elided' | 'boundary';
|
|
19
|
+
}
|
|
20
|
+
export interface HighlightRegion {
|
|
21
|
+
assemblyName?: string;
|
|
22
|
+
refName: string;
|
|
23
|
+
start: number;
|
|
24
|
+
end: number;
|
|
25
|
+
}
|
|
11
26
|
/**
|
|
12
27
|
* #stateModel LinearGenomeView
|
|
13
28
|
* #category view
|
|
14
29
|
*
|
|
15
30
|
* #example
|
|
16
|
-
* A `LinearGenomeView` is what you hand-author under `defaultSession.views
|
|
17
|
-
*
|
|
31
|
+
* A `LinearGenomeView` is what you hand-author under `defaultSession.views`, and
|
|
32
|
+
* every setting goes directly on the view object. `assembly`/`loc` fill in
|
|
33
|
+
* `displayedRegions`/`bpPerPx`/`offsetPx` for you:
|
|
18
34
|
* ```js
|
|
19
35
|
* defaultSession: {
|
|
20
36
|
* name: 'My session',
|
|
21
37
|
* views: [
|
|
22
38
|
* {
|
|
23
39
|
* type: 'LinearGenomeView',
|
|
24
|
-
* // plain persisted props sit alongside init, not inside it
|
|
25
40
|
* colorByCDS: true,
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* tracks: ['genes', 'alignments'],
|
|
30
|
-
* },
|
|
41
|
+
* assembly: 'hg38',
|
|
42
|
+
* loc: 'chr1:1,000,000-1,100,000',
|
|
43
|
+
* tracks: ['genes', 'alignments'],
|
|
31
44
|
* },
|
|
32
45
|
* ],
|
|
33
46
|
* }
|
|
34
47
|
* ```
|
|
35
|
-
* `
|
|
36
|
-
*
|
|
37
|
-
* `colorByCDS`, `showAminoAcids`, `showCenterLine
|
|
38
|
-
*
|
|
39
|
-
* directly on the view (MST restores them natively).
|
|
48
|
+
* `assembly`, `loc`, `tracks`, `tracklist`, `nav` and `highlight` need
|
|
49
|
+
* on-attach resolution and are captured into the `launch` property below;
|
|
50
|
+
* `colorByCDS`, `showAminoAcids`, `showCenterLine` and `trackLabels` are plain
|
|
51
|
+
* view props MST restores natively. Both are written the same way.
|
|
40
52
|
* At runtime the same model is driven imperatively — every property and action
|
|
41
53
|
* below is reachable on `viewState.session.views[0]`:
|
|
42
54
|
* ```js
|
|
@@ -46,14 +58,11 @@ import type { Instance } from '@jbrowse/mobx-state-tree';
|
|
|
46
58
|
* view.zoomTo(view.bpPerPx * 2) // zoom out 2x
|
|
47
59
|
* ```
|
|
48
60
|
*/
|
|
49
|
-
export declare function stateModelFactory(pluginManager: PluginManager): import("@jbrowse/mobx-state-tree").IModelType<Omit<
|
|
61
|
+
export declare function stateModelFactory(pluginManager: PluginManager): import("@jbrowse/mobx-state-tree").IModelType<Omit<{
|
|
50
62
|
id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
51
63
|
displayName: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
52
64
|
minimized: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
53
|
-
}, "
|
|
54
|
-
highlight: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<HighlightType, HighlightType, HighlightType>>, [undefined]>;
|
|
55
|
-
showHighlightChips: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
56
|
-
}, "colorByCDS" | "displayedRegions" | "hideHeader" | "hideHeaderOverview" | "hideNoTracksActive" | "id" | "init" | "labelsVisible" | "legacyBpPerPx" | "scalebarOnly" | "showAminoAcids" | "showCenterLine" | "showCytobands" | "showGridlines" | "showTrackOutlines" | "trackLabels" | "trackSelectorType" | "tracks" | "type" | "windowStartBp" | "windowWidthBp"> & {
|
|
65
|
+
}, "colorByCDS" | "displayedRegions" | "hideHeader" | "hideHeaderOverview" | "hideNoTracksActive" | "id" | "launch" | "legacyBpPerPx" | "scalebarOnly" | "showAminoAcids" | "showCenterLine" | "showCytobands" | "showGridlines" | "showTrackOutlines" | "trackLabels" | "trackSelectorType" | "tracks" | "type" | "windowStartBp" | "windowWidthBp"> & {
|
|
57
66
|
id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
58
67
|
type: import("@jbrowse/mobx-state-tree").IType<string | undefined, string, string>;
|
|
59
68
|
windowStartBp: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
@@ -64,61 +73,63 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
64
73
|
hideHeader: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
65
74
|
hideHeaderOverview: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
66
75
|
hideNoTracksActive: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
67
|
-
trackSelectorType: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<
|
|
76
|
+
trackSelectorType: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<"hierarchical">, [undefined]>;
|
|
68
77
|
showCenterLine: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
69
78
|
showCytobands: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
70
79
|
trackLabels: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
71
80
|
showGridlines: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
72
|
-
labelsVisible: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
73
81
|
colorByCDS: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
74
82
|
showAminoAcids: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
75
83
|
showTrackOutlines: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
76
84
|
scalebarOnly: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
77
|
-
|
|
85
|
+
launch: import("@jbrowse/mobx-state-tree").IType<LaunchInput<InitState> | undefined, LaunchInput<InitState> | undefined, LaunchInput<InitState> | undefined>;
|
|
78
86
|
}, {
|
|
79
87
|
width: number;
|
|
80
88
|
bodyMounted: boolean;
|
|
81
89
|
} & {
|
|
90
|
+
readonly rendersDisplays: boolean;
|
|
82
91
|
readonly effectiveBodyMounted: boolean;
|
|
83
92
|
menuItems(): MenuItem[];
|
|
93
|
+
readonly ownTracks: import("@jbrowse/core/util").AbstractTrackModel[];
|
|
94
|
+
readonly ownViews: import("@jbrowse/core/util").AbstractViewModel[];
|
|
84
95
|
} & {
|
|
85
96
|
setDisplayName(name: string): void;
|
|
86
97
|
setWidth(newWidth: number): void;
|
|
87
98
|
setBodyMounted(flag: boolean): void;
|
|
88
99
|
setMinimized(flag: boolean): void;
|
|
89
|
-
} & {
|
|
90
|
-
addToHighlights(highlight: HighlightType): void;
|
|
91
|
-
setHighlight(highlight?: HighlightType[]): void;
|
|
92
|
-
removeHighlight(highlight: HighlightType): void;
|
|
93
|
-
updateHighlight(old: HighlightType, updates: Partial<HighlightType>): void;
|
|
94
|
-
setShowHighlightChips(arg: boolean): void;
|
|
95
|
-
} & {
|
|
96
|
-
afterAttach(): void;
|
|
97
100
|
} & {
|
|
98
101
|
/**
|
|
99
102
|
* #volatile
|
|
103
|
+
* Height of each track's in-flow label band, measured by
|
|
104
|
+
* TrackContainer as the rendering container's offset inside its Paper.
|
|
105
|
+
* Absent (0) while the label is hidden, overlapping, or not yet
|
|
106
|
+
* measured. Observable, so the offset and height getters re-derive
|
|
107
|
+
* when a band changes.
|
|
100
108
|
*/
|
|
101
|
-
|
|
109
|
+
trackLabelBands: import("mobx").ObservableMap<string, number>;
|
|
102
110
|
/**
|
|
103
111
|
* #volatile
|
|
112
|
+
* How much taller the view's box is than the scroll port it sits in,
|
|
113
|
+
* in px, negative when it is shorter. Measured by the view component
|
|
114
|
+
* for a top-level view; undefined until then, and for a nested one.
|
|
104
115
|
*/
|
|
105
|
-
|
|
116
|
+
scrollPortExcess: number | undefined;
|
|
106
117
|
/**
|
|
107
118
|
* #volatile
|
|
108
119
|
*/
|
|
109
|
-
|
|
120
|
+
volatileWidth: number | undefined;
|
|
110
121
|
/**
|
|
111
122
|
* #volatile
|
|
112
123
|
*/
|
|
113
|
-
|
|
124
|
+
draggingTrackId: undefined | string;
|
|
114
125
|
/**
|
|
115
126
|
* #volatile
|
|
116
127
|
*/
|
|
117
|
-
|
|
128
|
+
lastTrackDragY: undefined | number;
|
|
118
129
|
/**
|
|
119
130
|
* #volatile
|
|
120
131
|
*/
|
|
121
|
-
|
|
132
|
+
volatileError: unknown;
|
|
122
133
|
/**
|
|
123
134
|
* #volatile
|
|
124
135
|
*/
|
|
@@ -143,16 +154,22 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
143
154
|
* #volatile
|
|
144
155
|
*/
|
|
145
156
|
isScalebarRefNameMenuOpen: boolean;
|
|
146
|
-
/**
|
|
147
|
-
* #volatile
|
|
148
|
-
*/
|
|
149
|
-
scalebarRefNameClickPending: boolean;
|
|
150
157
|
/**
|
|
151
158
|
* #volatile
|
|
152
159
|
* temporary vertical guides that can be set by displays (e.g., LD display hover)
|
|
153
160
|
*/
|
|
154
161
|
volatileGuides: VolatileGuide[];
|
|
155
162
|
} & {
|
|
163
|
+
/**
|
|
164
|
+
* #getter
|
|
165
|
+
* the launch state that still has something to apply — the gate every
|
|
166
|
+
* loading and error path below reads.
|
|
167
|
+
*/
|
|
168
|
+
readonly pendingLaunch: LaunchInput<InitState & {
|
|
169
|
+
unknown?: Record<string, unknown>;
|
|
170
|
+
malformed?: Record<string, unknown>;
|
|
171
|
+
legacyInit?: boolean;
|
|
172
|
+
} & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IType<LaunchInput<InitState> | undefined, LaunchInput<InitState> | undefined, LaunchInput<InitState> | undefined>>> | undefined;
|
|
156
173
|
/**
|
|
157
174
|
* #getter
|
|
158
175
|
* corresponds roughly to the zoom level, base-pairs per pixel.
|
|
@@ -169,6 +186,12 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
169
186
|
* corresponds roughly to the horizontal scroll of the LGV
|
|
170
187
|
*/
|
|
171
188
|
readonly offsetPx: number;
|
|
189
|
+
/**
|
|
190
|
+
* #getter
|
|
191
|
+
* a displayed region narrower than this many pixels draws as an elided
|
|
192
|
+
* block
|
|
193
|
+
*/
|
|
194
|
+
readonly minimumBlockWidth: number;
|
|
172
195
|
/**
|
|
173
196
|
* #getter
|
|
174
197
|
* scroll-to-zoom is a global, personal preference resolved from the
|
|
@@ -188,7 +211,7 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
188
211
|
* the effective track labels setting, resolving the stored `trackLabels`
|
|
189
212
|
* against the LinearGenomeViewPlugin config default
|
|
190
213
|
*/
|
|
191
|
-
readonly effectiveTrackLabels:
|
|
214
|
+
readonly effectiveTrackLabels: ViewTrackLabelMode;
|
|
192
215
|
/**
|
|
193
216
|
* #getter
|
|
194
217
|
*/
|
|
@@ -206,6 +229,11 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
206
229
|
* #getter
|
|
207
230
|
*/
|
|
208
231
|
readonly assemblyDisplayNames: string[];
|
|
232
|
+
/**
|
|
233
|
+
* #getter
|
|
234
|
+
* the session's highlights on this view's assemblies
|
|
235
|
+
*/
|
|
236
|
+
readonly highlights: HighlightType[];
|
|
209
237
|
/**
|
|
210
238
|
* #getter
|
|
211
239
|
* checking if lgv is a 'top-level' view is used for toggling pin track
|
|
@@ -221,8 +249,19 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
221
249
|
} & {
|
|
222
250
|
/**
|
|
223
251
|
* #getter
|
|
224
|
-
*
|
|
225
|
-
*
|
|
252
|
+
* The census entry for this view: the tracks it holds itself. Declared
|
|
253
|
+
* rather than derived — see `BaseViewModel.ownTracks`.
|
|
254
|
+
*/
|
|
255
|
+
readonly ownTracks: any[];
|
|
256
|
+
/**
|
|
257
|
+
* #getter
|
|
258
|
+
* See `BaseViewModel.rendersDisplays`.
|
|
259
|
+
*/
|
|
260
|
+
readonly rendersDisplays: boolean;
|
|
261
|
+
/**
|
|
262
|
+
* #getter
|
|
263
|
+
* Assembly name captioning the scalebar ahead of its refName labels, or
|
|
264
|
+
* undefined for none. A container view (e.g. LinearSyntenyView) opts its sub-views in by
|
|
226
265
|
* exposing showAssemblyNameInSubviewScalebar; duck-typed rather than
|
|
227
266
|
* matching a concrete view type so no upward plugin dependency is needed
|
|
228
267
|
* and any container can opt in. A wrong nesting depth simply yields no
|
|
@@ -237,7 +276,7 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
237
276
|
/**
|
|
238
277
|
* #getter
|
|
239
278
|
*/
|
|
240
|
-
readonly assemblyErrors: string;
|
|
279
|
+
readonly assemblyErrors: string | undefined;
|
|
241
280
|
/**
|
|
242
281
|
* #getter
|
|
243
282
|
*/
|
|
@@ -255,7 +294,7 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
255
294
|
error: unknown;
|
|
256
295
|
loadingP: Promise<void> | undefined;
|
|
257
296
|
adapterLoads: import("@jbrowse/quick-lru").default<string, Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>>;
|
|
258
|
-
|
|
297
|
+
regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
|
|
259
298
|
refNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
|
|
260
299
|
canonicalToSeqAdapterRefNames: Record<string, string> | undefined;
|
|
261
300
|
cytobands: import("@jbrowse/core/util").Feature[] | undefined;
|
|
@@ -293,7 +332,6 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
293
332
|
afterAttach(): void;
|
|
294
333
|
} & {
|
|
295
334
|
readonly initialized: boolean;
|
|
296
|
-
readonly regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
|
|
297
335
|
readonly allRefNames: string[] | undefined;
|
|
298
336
|
readonly namesByCanonicalRefName: Map<string, string[]> | undefined;
|
|
299
337
|
readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
|
|
@@ -311,6 +349,7 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
311
349
|
getCanonicalRefName2(refName: string): string;
|
|
312
350
|
isValidRefName(refName: string): boolean;
|
|
313
351
|
} & {
|
|
352
|
+
getRefNamePosition(refName: string): number | undefined;
|
|
314
353
|
getAliasesForRefName(refName: string): string[];
|
|
315
354
|
getRefNameMapForAdapter(adapterConf: {
|
|
316
355
|
[x: string]: unknown;
|
|
@@ -322,7 +361,7 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
322
361
|
error: unknown;
|
|
323
362
|
loadingP: Promise<void> | undefined;
|
|
324
363
|
adapterLoads: import("@jbrowse/quick-lru").default<string, Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>>;
|
|
325
|
-
|
|
364
|
+
regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
|
|
326
365
|
refNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
|
|
327
366
|
canonicalToSeqAdapterRefNames: Record<string, string> | undefined;
|
|
328
367
|
cytobands: import("@jbrowse/core/util").Feature[] | undefined;
|
|
@@ -360,7 +399,6 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
360
399
|
afterAttach(): void;
|
|
361
400
|
} & {
|
|
362
401
|
readonly initialized: boolean;
|
|
363
|
-
readonly regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
|
|
364
402
|
readonly allRefNames: string[] | undefined;
|
|
365
403
|
readonly namesByCanonicalRefName: Map<string, string[]> | undefined;
|
|
366
404
|
readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
|
|
@@ -378,12 +416,23 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
378
416
|
getCanonicalRefName2(refName: string): string;
|
|
379
417
|
isValidRefName(refName: string): boolean;
|
|
380
418
|
} & {
|
|
419
|
+
getRefNamePosition(refName: string): number | undefined;
|
|
381
420
|
getAliasesForRefName(refName: string): string[];
|
|
382
421
|
getRefNameMapForAdapter(adapterConf: {
|
|
383
422
|
[x: string]: unknown;
|
|
384
423
|
}, options: import("@jbrowse/core/data_adapters/BaseAdapter").BaseOptions): Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>;
|
|
385
424
|
getRefNameMismatch(adapterCacheKey: string): import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch | undefined;
|
|
386
425
|
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>) | undefined;
|
|
426
|
+
/**
|
|
427
|
+
* #getter
|
|
428
|
+
* The assembly a pending launch is for: the one it names, else the one
|
|
429
|
+
* the view already shows. A re-launch of a materialized view (a
|
|
430
|
+
* `jb.setSession` document writing `loc` beside the built state) need
|
|
431
|
+
* not restate it; without the default the readiness gate waited on
|
|
432
|
+
* `assemblyManager.get(undefined)` for good. Undefined on a fresh view
|
|
433
|
+
* whose blob names none, which `error` reports.
|
|
434
|
+
*/
|
|
435
|
+
readonly launchAssemblyName: string | undefined;
|
|
387
436
|
/**
|
|
388
437
|
* #getter
|
|
389
438
|
*/
|
|
@@ -404,7 +453,7 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
404
453
|
error: unknown;
|
|
405
454
|
loadingP: Promise<void> | undefined;
|
|
406
455
|
adapterLoads: import("@jbrowse/quick-lru").default<string, Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>>;
|
|
407
|
-
|
|
456
|
+
regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
|
|
408
457
|
refNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
|
|
409
458
|
canonicalToSeqAdapterRefNames: Record<string, string> | undefined;
|
|
410
459
|
cytobands: import("@jbrowse/core/util").Feature[] | undefined;
|
|
@@ -442,7 +491,6 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
442
491
|
afterAttach(): void;
|
|
443
492
|
} & {
|
|
444
493
|
readonly initialized: boolean;
|
|
445
|
-
readonly regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
|
|
446
494
|
readonly allRefNames: string[] | undefined;
|
|
447
495
|
readonly namesByCanonicalRefName: Map<string, string[]> | undefined;
|
|
448
496
|
readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
|
|
@@ -460,6 +508,7 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
460
508
|
getCanonicalRefName2(refName: string): string;
|
|
461
509
|
isValidRefName(refName: string): boolean;
|
|
462
510
|
} & {
|
|
511
|
+
getRefNamePosition(refName: string): number | undefined;
|
|
463
512
|
getAliasesForRefName(refName: string): string[];
|
|
464
513
|
getRefNameMapForAdapter(adapterConf: {
|
|
465
514
|
[x: string]: unknown;
|
|
@@ -471,7 +520,7 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
471
520
|
error: unknown;
|
|
472
521
|
loadingP: Promise<void> | undefined;
|
|
473
522
|
adapterLoads: import("@jbrowse/quick-lru").default<string, Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>>;
|
|
474
|
-
|
|
523
|
+
regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
|
|
475
524
|
refNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
|
|
476
525
|
canonicalToSeqAdapterRefNames: Record<string, string> | undefined;
|
|
477
526
|
cytobands: import("@jbrowse/core/util").Feature[] | undefined;
|
|
@@ -509,7 +558,6 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
509
558
|
afterAttach(): void;
|
|
510
559
|
} & {
|
|
511
560
|
readonly initialized: boolean;
|
|
512
|
-
readonly regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
|
|
513
561
|
readonly allRefNames: string[] | undefined;
|
|
514
562
|
readonly namesByCanonicalRefName: Map<string, string[]> | undefined;
|
|
515
563
|
readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
|
|
@@ -527,6 +575,7 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
527
575
|
getCanonicalRefName2(refName: string): string;
|
|
528
576
|
isValidRefName(refName: string): boolean;
|
|
529
577
|
} & {
|
|
578
|
+
getRefNamePosition(refName: string): number | undefined;
|
|
530
579
|
getAliasesForRefName(refName: string): string[];
|
|
531
580
|
getRefNameMapForAdapter(adapterConf: {
|
|
532
581
|
[x: string]: unknown;
|
|
@@ -535,26 +584,10 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
535
584
|
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>) | undefined;
|
|
536
585
|
/**
|
|
537
586
|
* #getter
|
|
538
|
-
* What the
|
|
539
|
-
*
|
|
540
|
-
* "Loading" for the part of startup that actually takes time. Falls back
|
|
541
|
-
* once the assembly is loaded and the remaining wait is the init autorun's
|
|
542
|
-
* own navigation, which is local.
|
|
543
|
-
*/
|
|
544
|
-
readonly loadingMessage: string | undefined;
|
|
545
|
-
/**
|
|
546
|
-
* #getter
|
|
547
|
-
* Determinate fraction for the spinner's bar, when the assembly load
|
|
548
|
-
* reports one (a whole-file download with a Content-Length)
|
|
549
|
-
*/
|
|
550
|
-
readonly loadingProgress: number | undefined;
|
|
551
|
-
/**
|
|
552
|
-
* #getter
|
|
553
|
-
* The URL the assembly load is currently fetching, when the phase named
|
|
554
|
-
* one. Only the stalled-load notice reads it — see
|
|
555
|
-
* {@link ViewLoadingScreen}.
|
|
587
|
+
* What the loading screen says while `showLoading`, read off the
|
|
588
|
+
* assembly whose load is the wait; undefined otherwise.
|
|
556
589
|
*/
|
|
557
|
-
readonly
|
|
590
|
+
readonly loading: import("@jbrowse/core/util/viewStatus").ViewLoading | undefined;
|
|
558
591
|
/**
|
|
559
592
|
* #getter
|
|
560
593
|
*/
|
|
@@ -567,7 +600,7 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
567
600
|
* would mount over empty regions and pxToBp/hover would throw.
|
|
568
601
|
*
|
|
569
602
|
* **Not dotplot's or synteny's `initPending`**, which is the bare
|
|
570
|
-
* `!!self.
|
|
603
|
+
* `!!self.pendingLaunch` — "an init blob has not been applied" — and which those
|
|
571
604
|
* views read from their `settled` gate rather than from `showLoading`.
|
|
572
605
|
* This one is narrower on purpose: it closes only the window where there
|
|
573
606
|
* is nothing on screen. Once navigation has produced regions the view is
|
|
@@ -637,33 +670,16 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
637
670
|
* #getter
|
|
638
671
|
* A track's full cost beyond its display height.
|
|
639
672
|
*
|
|
640
|
-
* The track *label* is not counted
|
|
641
|
-
*
|
|
642
|
-
*
|
|
643
|
-
*
|
|
644
|
-
* overlapping, and short by one label box per labelled track otherwise.
|
|
645
|
-
* Anything needing the offset to the pixel with labels showing measures
|
|
646
|
-
* the DOM; `BreakpointSplitViewOverlay` does, and falls back to this
|
|
647
|
-
* arithmetic only for a track with no mounted div.
|
|
673
|
+
* The track *label* is not counted here: an offset label is an in-flow
|
|
674
|
+
* box whose height is whatever the theme renders a Paper of icon buttons
|
|
675
|
+
* at, so it is measured into `trackLabelBands` per track and added by
|
|
676
|
+
* `trackLabelBand` rather than derived.
|
|
648
677
|
*/
|
|
649
678
|
readonly trackChromeHeight: number;
|
|
650
679
|
/**
|
|
651
680
|
* #getter
|
|
652
681
|
*/
|
|
653
682
|
readonly headerHeight: number;
|
|
654
|
-
/**
|
|
655
|
-
* #getter
|
|
656
|
-
* Where the scalebar pins when the view's chrome is sticky: everything
|
|
657
|
-
* stacked above it, which is the view's own title bar plus this view's
|
|
658
|
-
* header. Expressed from `headerHeight` rather than re-summing its
|
|
659
|
-
* constants — the two are the same box, and a second spelling of the sum
|
|
660
|
-
* is free to drift from the first while both typecheck.
|
|
661
|
-
*/
|
|
662
|
-
readonly rubberbandTop: number;
|
|
663
|
-
/**
|
|
664
|
-
* #getter
|
|
665
|
-
*/
|
|
666
|
-
readonly pinnedTracksTop: number;
|
|
667
683
|
/**
|
|
668
684
|
* #method
|
|
669
685
|
* rendered height of a single track, collapsing to a fixed height when
|
|
@@ -673,6 +689,12 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
673
689
|
* can't diverge from what is on screen.
|
|
674
690
|
*/
|
|
675
691
|
trackHeight(track: (import("@jbrowse/mobx-state-tree").IMSTArray<import("@jbrowse/mobx-state-tree").IAnyType> & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>>)[number]): any;
|
|
692
|
+
/**
|
|
693
|
+
* #method
|
|
694
|
+
* the measured in-flow label band above a track's rendering container,
|
|
695
|
+
* 0 until TrackContainer has measured one or when no label is in flow
|
|
696
|
+
*/
|
|
697
|
+
trackLabelBand(track: (import("@jbrowse/mobx-state-tree").IMSTArray<import("@jbrowse/mobx-state-tree").IAnyType> & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>>)[number]): number;
|
|
676
698
|
/**
|
|
677
699
|
* #getter
|
|
678
700
|
*/
|
|
@@ -685,6 +707,12 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
685
707
|
* #getter
|
|
686
708
|
*/
|
|
687
709
|
readonly height: number;
|
|
710
|
+
/**
|
|
711
|
+
* #getter
|
|
712
|
+
* The display height of each track a whole-stack resize moves, by track
|
|
713
|
+
* instance id: every shown track that is not minimized.
|
|
714
|
+
*/
|
|
715
|
+
readonly resizableTrackHeights: Map<any, any>;
|
|
688
716
|
/**
|
|
689
717
|
* #method
|
|
690
718
|
* Y offset (in pixels, from the top of the view) where a track's
|
|
@@ -692,10 +720,10 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
692
720
|
* first, then unpinned), from the same constants TrackContainer lays its
|
|
693
721
|
* Paper out with. Returns `undefined` if the track is not present.
|
|
694
722
|
*
|
|
695
|
-
*
|
|
696
|
-
*
|
|
697
|
-
*
|
|
698
|
-
*
|
|
723
|
+
* Includes each track's measured label band, this track's own included,
|
|
724
|
+
* since an in-flow label sits above the rendering container inside the
|
|
725
|
+
* same Paper. Exact once TrackContainer has measured; before that it is
|
|
726
|
+
* short by the unmeasured bands.
|
|
699
727
|
*/
|
|
700
728
|
getTrackYOffset(trackId: string): number | undefined;
|
|
701
729
|
/**
|
|
@@ -715,16 +743,16 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
715
743
|
readonly fitBpPerPx: number;
|
|
716
744
|
/**
|
|
717
745
|
* #getter
|
|
718
|
-
* The zoom-out limit.
|
|
719
|
-
* it on a shared scale
|
|
720
|
-
* one, drawn short so the two compare by length.
|
|
746
|
+
* The zoom-out limit. Equal to the fit for this view's regions, except
|
|
747
|
+
* while a container holds it on a coarser shared scale, such as a small
|
|
748
|
+
* genome next to a large one, drawn short so the two compare by length.
|
|
721
749
|
*
|
|
722
|
-
*
|
|
723
|
-
*
|
|
724
|
-
*
|
|
725
|
-
*
|
|
726
|
-
*
|
|
727
|
-
*
|
|
750
|
+
* The shared scale raises the limit. A bpPerPx written past the limit
|
|
751
|
+
* would be undone by the first operation that clamps (a wheel tick, a
|
|
752
|
+
* rubberband, a `setDisplayedRegions`), as with the dotplot's locked
|
|
753
|
+
* aspect ratio turning "zoom out" into a zoom in (`axisMaxBpPerPx`).
|
|
754
|
+
* Every zoom clamps against the same ceiling, so full zoom-out stops at
|
|
755
|
+
* the shared scale.
|
|
728
756
|
*/
|
|
729
757
|
readonly maxBpPerPx: number;
|
|
730
758
|
/**
|
|
@@ -807,19 +835,34 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
807
835
|
/**
|
|
808
836
|
* #action
|
|
809
837
|
*/
|
|
810
|
-
|
|
838
|
+
setTrackLabelBand(trackId: string, band: number): void;
|
|
811
839
|
/**
|
|
812
840
|
* #action
|
|
813
841
|
*/
|
|
814
|
-
|
|
842
|
+
setScrollPortExcess(px: number | undefined): void;
|
|
815
843
|
/**
|
|
816
844
|
* #action
|
|
845
|
+
* Grow or shrink every unminimized track by `distance` px in all, each
|
|
846
|
+
* by its share of the height it has above the display minimum. `from` is
|
|
847
|
+
* the heights to scale, by track instance id; a drag passes the heights
|
|
848
|
+
* it started with, so whole-pixel rounding does not compound frame by
|
|
849
|
+
* frame. Returns how far the stack moved.
|
|
817
850
|
*/
|
|
818
|
-
|
|
851
|
+
resizeTracks(distance: number, from?: any): number;
|
|
852
|
+
/**
|
|
853
|
+
* #action
|
|
854
|
+
* A resize keeps the window in bp, so `bpPerPx` follows the new width
|
|
855
|
+
* and the view keeps framing the same sequence (ADR-070).
|
|
856
|
+
*/
|
|
857
|
+
setWidth(newWidth: number): void;
|
|
858
|
+
/**
|
|
859
|
+
* #action
|
|
860
|
+
*/
|
|
861
|
+
setError(error: unknown): void;
|
|
819
862
|
/**
|
|
820
863
|
* #action
|
|
821
864
|
*/
|
|
822
|
-
|
|
865
|
+
setIsScalebarRefNameMenuOpen(isOpen: boolean): void;
|
|
823
866
|
/**
|
|
824
867
|
* #action
|
|
825
868
|
*/
|
|
@@ -840,10 +883,6 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
840
883
|
* #action
|
|
841
884
|
*/
|
|
842
885
|
setShowGridlines(b: boolean): void;
|
|
843
|
-
/**
|
|
844
|
-
* #action
|
|
845
|
-
*/
|
|
846
|
-
setLabelsVisible(arg: boolean): void;
|
|
847
886
|
/**
|
|
848
887
|
* #action
|
|
849
888
|
* set temporary vertical guides (e.g., for LD display hover)
|
|
@@ -878,8 +917,11 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
878
917
|
setOffsets(left?: BpOffset, right?: BpOffset): void;
|
|
879
918
|
/**
|
|
880
919
|
* #action
|
|
920
|
+
* Raise the picker over search results that name more than one place.
|
|
921
|
+
* @param onPick - where a picked result lands; by default it navigates
|
|
922
|
+
* there and shows the track its index came from
|
|
881
923
|
*/
|
|
882
|
-
setSearchResults(searchResults: BaseResult[], searchQuery: string, assemblyName: string): void;
|
|
924
|
+
setSearchResults(searchResults: BaseResult[], searchQuery: string, assemblyName: string, onPick?: (result: BaseResult) => Promise<unknown>): void;
|
|
883
925
|
/**
|
|
884
926
|
* #action
|
|
885
927
|
*/
|
|
@@ -891,32 +933,57 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
891
933
|
} & {
|
|
892
934
|
/**
|
|
893
935
|
* #action
|
|
936
|
+
* Resize every unminimized track so the view is exactly as tall as the
|
|
937
|
+
* scroll port it sits in. Does nothing until the view has measured one.
|
|
938
|
+
*/
|
|
939
|
+
fitTracksToWindow(): void;
|
|
940
|
+
/**
|
|
941
|
+
* #action
|
|
942
|
+
* showTrack for a track whose display state model may be lazily
|
|
943
|
+
* loaded: loads it, then shows
|
|
944
|
+
*/
|
|
945
|
+
launchTrack(trackId: string, initialSnapshot?: any, displayInitialSnapshot?: any, inlineConf?: Record<string, unknown>): Promise<any>;
|
|
946
|
+
} & {
|
|
947
|
+
/**
|
|
948
|
+
* #method
|
|
949
|
+
* The shown track a move action means: the menu passes a track model's
|
|
950
|
+
* own `id`, an agent passes the `trackId` it knows the track by, and
|
|
951
|
+
* both name one shown track. Answers the model id, or the argument
|
|
952
|
+
* unchanged when nothing shown matches, so the move reports it.
|
|
894
953
|
*/
|
|
895
|
-
|
|
954
|
+
trackModelId(idOrTrackId: string): any;
|
|
955
|
+
} & {
|
|
956
|
+
moveTrack: (moving: string, target: string) => void;
|
|
896
957
|
/**
|
|
897
958
|
* #action
|
|
898
959
|
*/
|
|
899
|
-
|
|
960
|
+
moveTrackDown(idOrTrackId: string): void;
|
|
900
961
|
/**
|
|
901
962
|
* #action
|
|
902
963
|
*/
|
|
903
|
-
|
|
964
|
+
moveTrackUp(idOrTrackId: string): void;
|
|
904
965
|
/**
|
|
905
966
|
* #action
|
|
906
967
|
*/
|
|
907
|
-
|
|
968
|
+
moveTrackToTop(idOrTrackId: string): void;
|
|
908
969
|
/**
|
|
909
970
|
* #action
|
|
910
971
|
*/
|
|
911
|
-
|
|
972
|
+
moveTrackToBottom(idOrTrackId: string): void;
|
|
973
|
+
} & {
|
|
912
974
|
/**
|
|
913
975
|
* #action
|
|
914
976
|
*/
|
|
915
977
|
toggleTrack(trackId: string): boolean;
|
|
978
|
+
/**
|
|
979
|
+
* #action
|
|
980
|
+
* toggleTrack with launchTrack's loading behavior
|
|
981
|
+
*/
|
|
982
|
+
launchToggleTrack(trackId: string): Promise<boolean>;
|
|
916
983
|
/**
|
|
917
984
|
* #action
|
|
918
985
|
*/
|
|
919
|
-
setTrackLabels(setting:
|
|
986
|
+
setTrackLabels(setting: ViewTrackLabelMode): void;
|
|
920
987
|
/**
|
|
921
988
|
* #action
|
|
922
989
|
*/
|
|
@@ -955,10 +1022,6 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
955
1022
|
* #action
|
|
956
1023
|
*/
|
|
957
1024
|
setDraggingTrackId(idx?: string): void;
|
|
958
|
-
/**
|
|
959
|
-
* #action
|
|
960
|
-
*/
|
|
961
|
-
setLastTrackDragY(y: number): void;
|
|
962
1025
|
/**
|
|
963
1026
|
* #action
|
|
964
1027
|
* called while dragging a track over the track at `targetId`; reorders
|
|
@@ -969,12 +1032,13 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
969
1032
|
/**
|
|
970
1033
|
* #action
|
|
971
1034
|
*/
|
|
972
|
-
|
|
1035
|
+
setLaunch(launch?: LaunchInput<InitState>): void;
|
|
973
1036
|
/**
|
|
974
1037
|
* #method
|
|
975
|
-
*
|
|
1038
|
+
* renders the view to SVG markup, which it returns; saves it through
|
|
1039
|
+
* FileSaver unless `save: false`
|
|
976
1040
|
*/
|
|
977
|
-
exportSvg(opts?: ExportSvgOptions): Promise<
|
|
1041
|
+
exportSvg(opts?: ExportSvgOptions): Promise<string>;
|
|
978
1042
|
} & {
|
|
979
1043
|
slide: (viewWidths: number) => void;
|
|
980
1044
|
zoom: (targetBpPerPx: number) => void;
|
|
@@ -988,19 +1052,18 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
988
1052
|
* #getter
|
|
989
1053
|
* an ideogram only reads correctly against an entire chromosome: on a
|
|
990
1054
|
* sub-region it is a meaningless slice of bands, and the centromere shows
|
|
991
|
-
* up as a lone half-triangle
|
|
1055
|
+
* up as a lone half-triangle. The chromosome needs bands of its own too:
|
|
1056
|
+
* a cytoband file often lists only the main chromosomes, not chrM or the
|
|
1057
|
+
* unplaced scaffolds
|
|
992
1058
|
*/
|
|
993
1059
|
readonly canShowCytobands: boolean;
|
|
994
1060
|
/**
|
|
995
1061
|
* #getter
|
|
996
1062
|
* the `showCytobands` setting gated by whether cytobands can be shown at
|
|
997
|
-
* all (whole chromosome
|
|
1063
|
+
* all (whole chromosome with bands of its own) and by the header
|
|
1064
|
+
* overview they draw in being on, which the SVG export follows too
|
|
998
1065
|
*/
|
|
999
1066
|
readonly effectiveShowCytobands: boolean;
|
|
1000
|
-
/**
|
|
1001
|
-
* #getter
|
|
1002
|
-
*/
|
|
1003
|
-
readonly anyCytobandsExist: boolean;
|
|
1004
1067
|
/**
|
|
1005
1068
|
* #getter
|
|
1006
1069
|
* the cytoband is displayed to the right of the chromosome name, and
|
|
@@ -1017,6 +1080,11 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
1017
1080
|
* return the view menu items
|
|
1018
1081
|
*/
|
|
1019
1082
|
menuItems(): MenuItem[];
|
|
1083
|
+
/**
|
|
1084
|
+
* #method
|
|
1085
|
+
* the view menu's Highlights submenu; extend this to add a row there
|
|
1086
|
+
*/
|
|
1087
|
+
highlightsSubMenuItems(): MenuItem[];
|
|
1020
1088
|
/**
|
|
1021
1089
|
* #method
|
|
1022
1090
|
* what a plugin can start from the selected region — a synteny view, a
|
|
@@ -1177,8 +1245,9 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
1177
1245
|
* into that through `scalebarDisplayPrefix`) and whether it is flipped.
|
|
1178
1246
|
* A ` [rev]` there is a fact about the ROW; the same marker on a
|
|
1179
1247
|
* chromosome name means that one region, which only happens under mixed
|
|
1180
|
-
* orientation. `captionSpanPx` is the width it takes
|
|
1181
|
-
*
|
|
1248
|
+
* orientation. `captionSpanPx` is the width it takes: the sticky label
|
|
1249
|
+
* pins to its right edge rather than the viewport's, and the coordinate
|
|
1250
|
+
* numbers stay out from under it. The SVG export deliberately
|
|
1182
1251
|
* calls `getScalebarRefNameLabels` itself with no prefix rather than
|
|
1183
1252
|
* reading this, since it draws its own assembly name above the ruler.
|
|
1184
1253
|
*/
|
|
@@ -1192,38 +1261,38 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
1192
1261
|
* Every span along the row that is not track data, as plain geometry in
|
|
1193
1262
|
* the staticBlocks frame — the same frame as gridlineTicks and
|
|
1194
1263
|
* scalebarLabels, so one `translateX(staticBlocksTranslateX)` places all
|
|
1195
|
-
* three.
|
|
1196
|
-
* them:
|
|
1264
|
+
* three. A host drawing its own chrome needs all three kinds:
|
|
1197
1265
|
*
|
|
1198
1266
|
* - `seam`: the 3px bar at a region's right edge. Displayed regions are
|
|
1199
|
-
* laid out **contiguously**
|
|
1200
|
-
* padding only before the first region and after the last
|
|
1267
|
+
* laid out **contiguously** (calculateStaticBlocks emits boundary
|
|
1268
|
+
* padding only before the first region and after the last), so this
|
|
1201
1269
|
* bar is the only thing separating two of them. Without it a
|
|
1202
|
-
* two-region view
|
|
1203
|
-
*
|
|
1204
|
-
*
|
|
1205
|
-
*
|
|
1270
|
+
* two-region view looks like a single region.
|
|
1271
|
+
* `isRightEndOfDisplayedRegion` marks it; the right edge of the
|
|
1272
|
+
* currently *loaded* blocks, which block geometry gives you, is a
|
|
1273
|
+
* different set.
|
|
1206
1274
|
* - `elided`: a region too narrow to draw at this zoom. Whole-genome on
|
|
1207
|
-
* a real assembly is mostly these
|
|
1208
|
-
* but the 24 chromosomes
|
|
1209
|
-
*
|
|
1275
|
+
* a real assembly is mostly these (hg38 has 455 sequences, and all
|
|
1276
|
+
* but the 24 chromosomes are under a pixel wide), so a host that
|
|
1277
|
+
* skips them leaves that part of the row empty.
|
|
1210
1278
|
* - `boundary`: past the start of the first region or the end of the
|
|
1211
|
-
* last. Greying it
|
|
1212
|
-
*
|
|
1279
|
+
* last. Greying it shows the last region's seam as the edge of a
|
|
1280
|
+
* filled area, where it would otherwise look like a line in the
|
|
1281
|
+
* middle of the track.
|
|
1213
1282
|
*
|
|
1214
1283
|
* Elided blocks get no seam even though they carry the flag: at the
|
|
1215
|
-
* zoom where regions elide, one bar per region
|
|
1216
|
-
*
|
|
1217
|
-
*
|
|
1218
|
-
*
|
|
1219
|
-
*
|
|
1220
|
-
*
|
|
1221
|
-
*
|
|
1222
|
-
*
|
|
1223
|
-
*
|
|
1224
|
-
*
|
|
1225
|
-
*/
|
|
1226
|
-
readonly paddingSpans: {
|
|
1284
|
+
* zoom where regions elide, one bar per region would fill the row solid
|
|
1285
|
+
* grey.
|
|
1286
|
+
*
|
|
1287
|
+
* PaddingBlocks is the in-tree consumer. The SVG export does not use
|
|
1288
|
+
* it: `SVGRegionSeparators` walks dynamicBlocks itself and draws only
|
|
1289
|
+
* the seam, because `elided` and `boundary` mark state for an
|
|
1290
|
+
* interactive row. In a static figure the striped grey would cover most
|
|
1291
|
+
* of the row at whole-genome zoom. The export keeps the seam because
|
|
1292
|
+
* regions lay out contiguously and the seam is all that separates two
|
|
1293
|
+
* of them.
|
|
1294
|
+
*/
|
|
1295
|
+
readonly paddingSpans: readonly {
|
|
1227
1296
|
key: string;
|
|
1228
1297
|
x: number;
|
|
1229
1298
|
width: number;
|
|
@@ -1253,8 +1322,8 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
1253
1322
|
* viewport. False both when the view holds no regions at all and when
|
|
1254
1323
|
* it holds some but is scrolled entirely off them; either way there is
|
|
1255
1324
|
* no visible span for the scalebar, ruler and refName labels to
|
|
1256
|
-
* describe
|
|
1257
|
-
*
|
|
1325
|
+
* describe. The SVG export checks it before drawing its header.
|
|
1326
|
+
* Distinct from `hasDisplayedRegions`, which only asks whether the
|
|
1258
1327
|
* view has been given regions, not whether any are on screen.
|
|
1259
1328
|
*/
|
|
1260
1329
|
readonly hasVisibleContent: boolean;
|
|
@@ -1287,6 +1356,24 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
1287
1356
|
screenStartPx: number;
|
|
1288
1357
|
screenEndPx: number;
|
|
1289
1358
|
}[];
|
|
1359
|
+
/**
|
|
1360
|
+
* #getter
|
|
1361
|
+
* Right edge (px, viewport-relative) of the on-screen content, clamped
|
|
1362
|
+
* to the track — where a right-pinned overlay such as a wiggle's colour
|
|
1363
|
+
* or score legend belongs, rather than out in the empty gutter the
|
|
1364
|
+
* regions can leave at whole-genome zoom. `@jbrowse/display-kit`'s
|
|
1365
|
+
* `contentRightEdgePx` states the rule; an SVG export applies the same
|
|
1366
|
+
* one against the export's canvas width instead of this track's.
|
|
1367
|
+
*
|
|
1368
|
+
* Published as a SCALAR on purpose. `visibleRegions` rebuilds a fresh
|
|
1369
|
+
* array of fresh objects on every pan and zoom frame, so a component
|
|
1370
|
+
* that derived this number itself re-rendered on every frame of every
|
|
1371
|
+
* gesture — to produce, whenever content fills the track, the unchanged
|
|
1372
|
+
* `trackWidthPx`. Reading the scalar lets MobX's `===` stop the chain at
|
|
1373
|
+
* this computed instead. Measured over 20 zoom frames: the wiggle
|
|
1374
|
+
* family's three body instances fell from 66 renders to 7.
|
|
1375
|
+
*/
|
|
1376
|
+
readonly contentRightEdgePx: number;
|
|
1290
1377
|
/**
|
|
1291
1378
|
* #getter
|
|
1292
1379
|
* visibleRegions expanded by a half-screen buffer on each side,
|
|
@@ -1312,23 +1399,22 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
1312
1399
|
readonly visibleLocStrings: string;
|
|
1313
1400
|
/**
|
|
1314
1401
|
* #getter
|
|
1315
|
-
* **
|
|
1316
|
-
* view has settled at least once, the live ones before that.
|
|
1402
|
+
* **The blocks a debounced consumer clips to**: the coarse blocks once
|
|
1403
|
+
* the view has settled at least once, the live ones before that.
|
|
1317
1404
|
*
|
|
1318
|
-
* The coarse blocks
|
|
1319
|
-
* animation frame during a pan or zoom
|
|
1320
|
-
* alignments coverage scale and MAF's coverage band
|
|
1321
|
-
*
|
|
1322
|
-
*
|
|
1323
|
-
*
|
|
1324
|
-
*
|
|
1325
|
-
*
|
|
1326
|
-
*
|
|
1327
|
-
*
|
|
1328
|
-
* fetch used to be trailing-edge at 600ms, so it never did.
|
|
1405
|
+
* The coarse blocks stop a per-bp scan from recomputing on every
|
|
1406
|
+
* animation frame during a pan or zoom. Wiggle's autoscale domain, the
|
|
1407
|
+
* alignments coverage scale and MAF's coverage band use them. While the
|
|
1408
|
+
* coarse blocks are stale the result is a frame or two old, as the
|
|
1409
|
+
* debounce intends. **Empty coarse blocks are a different case.** A scan
|
|
1410
|
+
* over no blocks yields no entries, and the consumer falls back to the
|
|
1411
|
+
* domain `[0,1]`, which draws a line plot blank and a density plot
|
|
1412
|
+
* saturated. The coarse blocks are empty for the 500ms between a view
|
|
1413
|
+
* initializing and the coarse autorun's first run, and data can load
|
|
1414
|
+
* within that window.
|
|
1329
1415
|
*
|
|
1330
|
-
*
|
|
1331
|
-
*
|
|
1416
|
+
* Falling back to the live blocks costs one extra recompute at that
|
|
1417
|
+
* transition, compared with N per frame without the debounce.
|
|
1332
1418
|
*/
|
|
1333
1419
|
readonly settledDynamicBlocks: ContentBlock[];
|
|
1334
1420
|
/**
|
|
@@ -1400,7 +1486,7 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
1400
1486
|
* as. Prefer `setWindow`: pixels mean nothing without the width they were
|
|
1401
1487
|
* measured at, so a round trip through here is only exact while the width
|
|
1402
1488
|
* holds still. Kept for callers that genuinely have pixels — a wheel
|
|
1403
|
-
* gesture, a rubberband
|
|
1489
|
+
* gesture, a rubberband.
|
|
1404
1490
|
*/
|
|
1405
1491
|
setNewView(bpPerPx: number, offsetPx: number): void;
|
|
1406
1492
|
/**
|
|
@@ -1540,10 +1626,14 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
1540
1626
|
* navigating to the locstring
|
|
1541
1627
|
* @param grow - optional multiplier to expand the region by (e.g., 0.2
|
|
1542
1628
|
* adds 20% padding on each side)
|
|
1629
|
+
* @param opts - `showHitTrack: false` keeps a text-search hit from also
|
|
1630
|
+
* showing the track its index was built from
|
|
1543
1631
|
* @returns whether the view moved. A multi-hit search raises the picker
|
|
1544
1632
|
* instead of navigating, and both resolve — see `handleSelectedRegion`.
|
|
1545
1633
|
*/
|
|
1546
|
-
navToLocString(input: string, optAssemblyName?: string, grow?: number
|
|
1634
|
+
navToLocString(input: string, optAssemblyName?: string, grow?: number, opts?: {
|
|
1635
|
+
showHitTrack?: boolean;
|
|
1636
|
+
}): Promise<boolean>;
|
|
1547
1637
|
/**
|
|
1548
1638
|
* #action
|
|
1549
1639
|
* Similar to `navToLocString`, but accepts a list of parsed location
|
|
@@ -1570,6 +1660,17 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
1570
1660
|
* adds 20% padding on each side)
|
|
1571
1661
|
*/
|
|
1572
1662
|
navToLocation(parsedLocString: ParsedLocString, assemblyName?: string, grow?: number): Promise<void>;
|
|
1663
|
+
/**
|
|
1664
|
+
* #action
|
|
1665
|
+
* adds the region in view to the session's highlights
|
|
1666
|
+
*/
|
|
1667
|
+
highlightCurrentRegion(): void;
|
|
1668
|
+
/**
|
|
1669
|
+
* #action
|
|
1670
|
+
* navigates to the most recently added highlight on this view's
|
|
1671
|
+
* assemblies, zoomed out a little for context
|
|
1672
|
+
*/
|
|
1673
|
+
navigateNewestHighlight(): Promise<void>;
|
|
1573
1674
|
} & {
|
|
1574
1675
|
/**
|
|
1575
1676
|
* #method
|
|
@@ -1588,17 +1689,12 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
1588
1689
|
} | undefined;
|
|
1589
1690
|
/**
|
|
1590
1691
|
* #method
|
|
1591
|
-
* Map a highlight
|
|
1692
|
+
* Map a highlight region to its pixel position+width inside
|
|
1592
1693
|
* the tracks container. Falls back to the raw refName if the region's
|
|
1593
1694
|
* assemblyName is missing or unknown so highlights authored without an
|
|
1594
1695
|
* assembly still render in single-assembly views.
|
|
1595
1696
|
*/
|
|
1596
|
-
getHighlightCoords(region: {
|
|
1597
|
-
assemblyName?: string;
|
|
1598
|
-
refName: string;
|
|
1599
|
-
start: number;
|
|
1600
|
-
end: number;
|
|
1601
|
-
}): {
|
|
1697
|
+
getHighlightCoords(region: HighlightRegion): {
|
|
1602
1698
|
width: number;
|
|
1603
1699
|
left: number;
|
|
1604
1700
|
} | undefined;
|
|
@@ -1607,12 +1703,7 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
1607
1703
|
* like getHighlightCoords but laid out against the overview scalebar and
|
|
1608
1704
|
* shifted by the cytoband offset
|
|
1609
1705
|
*/
|
|
1610
|
-
getOverviewHighlightCoords(region: {
|
|
1611
|
-
assemblyName?: string;
|
|
1612
|
-
refName: string;
|
|
1613
|
-
start: number;
|
|
1614
|
-
end: number;
|
|
1615
|
-
}): {
|
|
1706
|
+
getOverviewHighlightCoords(region: HighlightRegion): {
|
|
1616
1707
|
width: number;
|
|
1617
1708
|
left: number;
|
|
1618
1709
|
} | undefined;
|
|
@@ -1634,6 +1725,14 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
1634
1725
|
* #getter
|
|
1635
1726
|
*/
|
|
1636
1727
|
readonly centerLineInfo: import("@jbrowse/core/util/Base1DUtils").PxToBpResult | undefined;
|
|
1728
|
+
} & {
|
|
1729
|
+
/**
|
|
1730
|
+
* #action
|
|
1731
|
+
* a region edit from the ruler's menu as one action, which a synteny
|
|
1732
|
+
* stack's follow reads as the reader's gesture on this row; see
|
|
1733
|
+
* `setDisplayedRegionsKeepingCenter`
|
|
1734
|
+
*/
|
|
1735
|
+
editDisplayedRegions(edit: RegionEdit): void;
|
|
1637
1736
|
} & {
|
|
1638
1737
|
/**
|
|
1639
1738
|
* #method
|
|
@@ -1652,15 +1751,1726 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
1652
1751
|
* `centerAt`'s animated twin: the same destination, reached along the
|
|
1653
1752
|
* arc instead of jumped to, at the zoom the view is already on.
|
|
1654
1753
|
*/
|
|
1655
|
-
flyToCenter(coord: number, refName: string): void;
|
|
1754
|
+
flyToCenter(coord: number, refName: string, displayedRegionIndex?: number): void;
|
|
1755
|
+
/**
|
|
1756
|
+
* #action
|
|
1757
|
+
* A flight to a linear bp centre at the zoom the view is on, or is
|
|
1758
|
+
* already flying to, widened where that is narrower than `fitWidthBp`.
|
|
1759
|
+
* The current width mid-flight is a point on the arc, so a second
|
|
1760
|
+
* flight read from it would land pulled back.
|
|
1761
|
+
*/
|
|
1762
|
+
flyToFit(centerBp: number, fitWidthBp: number): void;
|
|
1763
|
+
} & {
|
|
1764
|
+
afterCreate(): void;
|
|
1765
|
+
afterAttach(): void;
|
|
1766
|
+
}, import("@jbrowse/core/util/withLaunchInput").LaunchSnapshotIn<import("@jbrowse/mobx-state-tree").IModelType<Omit<{
|
|
1767
|
+
id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
1768
|
+
displayName: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
1769
|
+
minimized: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
1770
|
+
}, "colorByCDS" | "displayedRegions" | "hideHeader" | "hideHeaderOverview" | "hideNoTracksActive" | "id" | "launch" | "legacyBpPerPx" | "scalebarOnly" | "showAminoAcids" | "showCenterLine" | "showCytobands" | "showGridlines" | "showTrackOutlines" | "trackLabels" | "trackSelectorType" | "tracks" | "type" | "windowStartBp" | "windowWidthBp"> & {
|
|
1771
|
+
id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
1772
|
+
type: import("@jbrowse/mobx-state-tree").IType<string | undefined, string, string>;
|
|
1773
|
+
windowStartBp: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
1774
|
+
windowWidthBp: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
1775
|
+
legacyBpPerPx: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
1776
|
+
displayedRegions: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IType<Region[], Region[], Region[]>, [undefined]>;
|
|
1777
|
+
tracks: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>;
|
|
1778
|
+
hideHeader: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
1779
|
+
hideHeaderOverview: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
1780
|
+
hideNoTracksActive: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
1781
|
+
trackSelectorType: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<"hierarchical">, [undefined]>;
|
|
1782
|
+
showCenterLine: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
1783
|
+
showCytobands: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
1784
|
+
trackLabels: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
1785
|
+
showGridlines: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
1786
|
+
colorByCDS: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
1787
|
+
showAminoAcids: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
1788
|
+
showTrackOutlines: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
1789
|
+
scalebarOnly: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
1790
|
+
launch: import("@jbrowse/mobx-state-tree").IType<LaunchInput<InitState> | undefined, LaunchInput<InitState> | undefined, LaunchInput<InitState> | undefined>;
|
|
1791
|
+
}, {
|
|
1792
|
+
width: number;
|
|
1793
|
+
bodyMounted: boolean;
|
|
1794
|
+
} & {
|
|
1795
|
+
readonly rendersDisplays: boolean;
|
|
1796
|
+
readonly effectiveBodyMounted: boolean;
|
|
1797
|
+
menuItems(): MenuItem[];
|
|
1798
|
+
readonly ownTracks: import("@jbrowse/core/util").AbstractTrackModel[];
|
|
1799
|
+
readonly ownViews: import("@jbrowse/core/util").AbstractViewModel[];
|
|
1800
|
+
} & {
|
|
1801
|
+
setDisplayName(name: string): void;
|
|
1802
|
+
setWidth(newWidth: number): void;
|
|
1803
|
+
setBodyMounted(flag: boolean): void;
|
|
1804
|
+
setMinimized(flag: boolean): void;
|
|
1805
|
+
} & {
|
|
1806
|
+
/**
|
|
1807
|
+
* #volatile
|
|
1808
|
+
* Height of each track's in-flow label band, measured by
|
|
1809
|
+
* TrackContainer as the rendering container's offset inside its Paper.
|
|
1810
|
+
* Absent (0) while the label is hidden, overlapping, or not yet
|
|
1811
|
+
* measured. Observable, so the offset and height getters re-derive
|
|
1812
|
+
* when a band changes.
|
|
1813
|
+
*/
|
|
1814
|
+
trackLabelBands: import("mobx").ObservableMap<string, number>;
|
|
1815
|
+
/**
|
|
1816
|
+
* #volatile
|
|
1817
|
+
* How much taller the view's box is than the scroll port it sits in,
|
|
1818
|
+
* in px, negative when it is shorter. Measured by the view component
|
|
1819
|
+
* for a top-level view; undefined until then, and for a nested one.
|
|
1820
|
+
*/
|
|
1821
|
+
scrollPortExcess: number | undefined;
|
|
1822
|
+
/**
|
|
1823
|
+
* #volatile
|
|
1824
|
+
*/
|
|
1825
|
+
volatileWidth: number | undefined;
|
|
1826
|
+
/**
|
|
1827
|
+
* #volatile
|
|
1828
|
+
*/
|
|
1829
|
+
draggingTrackId: undefined | string;
|
|
1830
|
+
/**
|
|
1831
|
+
* #volatile
|
|
1832
|
+
*/
|
|
1833
|
+
lastTrackDragY: undefined | number;
|
|
1834
|
+
/**
|
|
1835
|
+
* #volatile
|
|
1836
|
+
*/
|
|
1837
|
+
volatileError: unknown;
|
|
1838
|
+
/**
|
|
1839
|
+
* #volatile
|
|
1840
|
+
*/
|
|
1841
|
+
coarseDynamicBlocks: ContentBlock[];
|
|
1842
|
+
/**
|
|
1843
|
+
* #volatile
|
|
1844
|
+
*/
|
|
1845
|
+
coarseTotalBp: number;
|
|
1846
|
+
/**
|
|
1847
|
+
* #volatile
|
|
1848
|
+
*/
|
|
1849
|
+
coarseBpPerPx: number;
|
|
1850
|
+
/**
|
|
1851
|
+
* #volatile
|
|
1852
|
+
*/
|
|
1853
|
+
leftOffset: undefined | BpOffset;
|
|
1854
|
+
/**
|
|
1855
|
+
* #volatile
|
|
1856
|
+
*/
|
|
1857
|
+
rightOffset: undefined | BpOffset;
|
|
1858
|
+
/**
|
|
1859
|
+
* #volatile
|
|
1860
|
+
*/
|
|
1861
|
+
isScalebarRefNameMenuOpen: boolean;
|
|
1862
|
+
/**
|
|
1863
|
+
* #volatile
|
|
1864
|
+
* temporary vertical guides that can be set by displays (e.g., LD display hover)
|
|
1865
|
+
*/
|
|
1866
|
+
volatileGuides: VolatileGuide[];
|
|
1867
|
+
} & {
|
|
1868
|
+
/**
|
|
1869
|
+
* #getter
|
|
1870
|
+
* the launch state that still has something to apply — the gate every
|
|
1871
|
+
* loading and error path below reads.
|
|
1872
|
+
*/
|
|
1873
|
+
readonly pendingLaunch: LaunchInput<InitState & {
|
|
1874
|
+
unknown?: Record<string, unknown>;
|
|
1875
|
+
malformed?: Record<string, unknown>;
|
|
1876
|
+
legacyInit?: boolean;
|
|
1877
|
+
} & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IType<LaunchInput<InitState> | undefined, LaunchInput<InitState> | undefined, LaunchInput<InitState> | undefined>>> | undefined;
|
|
1878
|
+
/**
|
|
1879
|
+
* #getter
|
|
1880
|
+
* corresponds roughly to the zoom level, base-pairs per pixel.
|
|
1881
|
+
*
|
|
1882
|
+
* Zero before a width is measured, which is the same not-yet-measured
|
|
1883
|
+
* sentinel `Base1DView` uses and which `displayedRegionsTotalPx` and the
|
|
1884
|
+
* offset getters already guard for. Reads `volatileWidth` rather than the
|
|
1885
|
+
* `width` getter on purpose: that one throws when unmeasured, and these
|
|
1886
|
+
* are read from the first render.
|
|
1887
|
+
*/
|
|
1888
|
+
readonly bpPerPx: number;
|
|
1889
|
+
/**
|
|
1890
|
+
* #getter
|
|
1891
|
+
* corresponds roughly to the horizontal scroll of the LGV
|
|
1892
|
+
*/
|
|
1893
|
+
readonly offsetPx: number;
|
|
1894
|
+
/**
|
|
1895
|
+
* #getter
|
|
1896
|
+
* a displayed region narrower than this many pixels draws as an elided
|
|
1897
|
+
* block
|
|
1898
|
+
*/
|
|
1899
|
+
readonly minimumBlockWidth: number;
|
|
1900
|
+
/**
|
|
1901
|
+
* #getter
|
|
1902
|
+
* scroll-to-zoom is a global, personal preference resolved from the
|
|
1903
|
+
* session; toggling it in any view applies everywhere
|
|
1904
|
+
*/
|
|
1905
|
+
readonly scrollZoom: boolean;
|
|
1906
|
+
/**
|
|
1907
|
+
* #getter
|
|
1908
|
+
*/
|
|
1909
|
+
readonly pinnedTracks: any[];
|
|
1910
|
+
/**
|
|
1911
|
+
* #getter
|
|
1912
|
+
*/
|
|
1913
|
+
readonly unpinnedTracks: any[];
|
|
1914
|
+
/**
|
|
1915
|
+
* #getter
|
|
1916
|
+
* the effective track labels setting, resolving the stored `trackLabels`
|
|
1917
|
+
* against the LinearGenomeViewPlugin config default
|
|
1918
|
+
*/
|
|
1919
|
+
readonly effectiveTrackLabels: ViewTrackLabelMode;
|
|
1920
|
+
/**
|
|
1921
|
+
* #getter
|
|
1922
|
+
*/
|
|
1923
|
+
readonly width: number;
|
|
1924
|
+
/**
|
|
1925
|
+
* #getter
|
|
1926
|
+
* width minus track outline borders (1px each side when shown)
|
|
1927
|
+
*/
|
|
1928
|
+
readonly trackWidthPx: number;
|
|
1929
|
+
/**
|
|
1930
|
+
* #getter
|
|
1931
|
+
*/
|
|
1932
|
+
readonly assemblyNames: string[];
|
|
1933
|
+
/**
|
|
1934
|
+
* #getter
|
|
1935
|
+
*/
|
|
1936
|
+
readonly assemblyDisplayNames: string[];
|
|
1937
|
+
/**
|
|
1938
|
+
* #getter
|
|
1939
|
+
* the session's highlights on this view's assemblies
|
|
1940
|
+
*/
|
|
1941
|
+
readonly highlights: HighlightType[];
|
|
1942
|
+
/**
|
|
1943
|
+
* #getter
|
|
1944
|
+
* checking if lgv is a 'top-level' view is used for toggling pin track
|
|
1945
|
+
* capability, sticky positioning
|
|
1946
|
+
*/
|
|
1947
|
+
readonly isTopLevelView: boolean;
|
|
1948
|
+
/**
|
|
1949
|
+
* #getter
|
|
1950
|
+
* only uses sticky view headers when it is a 'top-level' view and
|
|
1951
|
+
* session allows it
|
|
1952
|
+
*/
|
|
1953
|
+
readonly stickyViewHeaders: boolean;
|
|
1954
|
+
} & {
|
|
1955
|
+
/**
|
|
1956
|
+
* #getter
|
|
1957
|
+
* The census entry for this view: the tracks it holds itself. Declared
|
|
1958
|
+
* rather than derived — see `BaseViewModel.ownTracks`.
|
|
1959
|
+
*/
|
|
1960
|
+
readonly ownTracks: any[];
|
|
1961
|
+
/**
|
|
1962
|
+
* #getter
|
|
1963
|
+
* See `BaseViewModel.rendersDisplays`.
|
|
1964
|
+
*/
|
|
1965
|
+
readonly rendersDisplays: boolean;
|
|
1966
|
+
/**
|
|
1967
|
+
* #getter
|
|
1968
|
+
* Assembly name captioning the scalebar ahead of its refName labels, or
|
|
1969
|
+
* undefined for none. A container view (e.g. LinearSyntenyView) opts its sub-views in by
|
|
1970
|
+
* exposing showAssemblyNameInSubviewScalebar; duck-typed rather than
|
|
1971
|
+
* matching a concrete view type so no upward plugin dependency is needed
|
|
1972
|
+
* and any container can opt in. A wrong nesting depth simply yields no
|
|
1973
|
+
* prefix — hence the hasParent guard, since getParent throws (rather than
|
|
1974
|
+
* returning undefined) when the view sits shallower than depth 2.
|
|
1975
|
+
*/
|
|
1976
|
+
readonly scalebarDisplayPrefix: string | undefined;
|
|
1977
|
+
/**
|
|
1978
|
+
* #getter
|
|
1979
|
+
*/
|
|
1980
|
+
readonly assembliesNotFound: string | undefined;
|
|
1981
|
+
/**
|
|
1982
|
+
* #getter
|
|
1983
|
+
*/
|
|
1984
|
+
readonly assemblyErrors: string | undefined;
|
|
1985
|
+
/**
|
|
1986
|
+
* #getter
|
|
1987
|
+
*/
|
|
1988
|
+
readonly assembliesInitialized: boolean;
|
|
1989
|
+
/**
|
|
1990
|
+
* #getter
|
|
1991
|
+
* the assembly named by a pending `init`, or undefined when no init is
|
|
1992
|
+
* set. `init`'s assembly isn't in `assemblyNames` yet (that derives from
|
|
1993
|
+
* displayedRegions, still empty pre-navigation), so init-phase readiness
|
|
1994
|
+
* and error checks resolve it directly through here.
|
|
1995
|
+
*/
|
|
1996
|
+
readonly initAssembly: (import("@jbrowse/mobx-state-tree").ModelInstanceTypeProps<{
|
|
1997
|
+
configuration: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").IReferenceType<import("@jbrowse/mobx-state-tree").IAnyType>>;
|
|
1998
|
+
}> & {
|
|
1999
|
+
error: unknown;
|
|
2000
|
+
loadingP: Promise<void> | undefined;
|
|
2001
|
+
adapterLoads: import("@jbrowse/quick-lru").default<string, Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>>;
|
|
2002
|
+
regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
|
|
2003
|
+
refNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
|
|
2004
|
+
canonicalToSeqAdapterRefNames: Record<string, string> | undefined;
|
|
2005
|
+
cytobands: import("@jbrowse/core/util").Feature[] | undefined;
|
|
2006
|
+
loadedGeneticCodes: Record<string, number> | undefined;
|
|
2007
|
+
lowerCaseRefNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
|
|
2008
|
+
statusMessage: string | undefined;
|
|
2009
|
+
statusProgress: number | undefined;
|
|
2010
|
+
statusSource: string | undefined;
|
|
2011
|
+
refNameMismatches: Map<string, import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch>;
|
|
2012
|
+
} & {
|
|
2013
|
+
getConf(arg: string): any;
|
|
2014
|
+
} & {
|
|
2015
|
+
readonly name: string;
|
|
2016
|
+
readonly aliases: string[];
|
|
2017
|
+
readonly displayName: string;
|
|
2018
|
+
readonly refNameColors: string[];
|
|
2019
|
+
} & {
|
|
2020
|
+
readonly allAliases: string[];
|
|
2021
|
+
hasName(name: string): boolean;
|
|
2022
|
+
} & {
|
|
2023
|
+
setStatus(status?: import("@jbrowse/core/util").RpcStatus): void;
|
|
2024
|
+
setRefNameMismatch(adapterCacheKey: string, mismatch: import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch): void;
|
|
2025
|
+
} & {
|
|
2026
|
+
setLoaded({ regions, refNameAliases, lowerCaseRefNameAliases, canonicalToSeqAdapterRefNames, cytobands, geneticCodes, }: import("@jbrowse/core/assemblyManager/assembly").RefNameMaps & {
|
|
2027
|
+
regions: import("@jbrowse/core/util").Region[];
|
|
2028
|
+
cytobands: import("@jbrowse/core/util").Feature[];
|
|
2029
|
+
geneticCodes: Record<string, number>;
|
|
2030
|
+
}): void;
|
|
2031
|
+
setError(e: unknown): void;
|
|
2032
|
+
setLoadingP(p?: Promise<void>): void;
|
|
2033
|
+
loadPre(): Promise<void>;
|
|
2034
|
+
} & {
|
|
2035
|
+
load(): Promise<void>;
|
|
2036
|
+
} & {
|
|
2037
|
+
afterAttach(): void;
|
|
2038
|
+
} & {
|
|
2039
|
+
readonly initialized: boolean;
|
|
2040
|
+
readonly allRefNames: string[] | undefined;
|
|
2041
|
+
readonly namesByCanonicalRefName: Map<string, string[]> | undefined;
|
|
2042
|
+
readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
|
|
2043
|
+
} & {
|
|
2044
|
+
readonly refNames: string[] | undefined;
|
|
2045
|
+
} & {
|
|
2046
|
+
readonly refNameToIndex: Map<string, number> | undefined;
|
|
2047
|
+
} & {
|
|
2048
|
+
getCanonicalRefName(refName: string): string | undefined;
|
|
2049
|
+
getRefNameColor(refName: string): string | undefined;
|
|
2050
|
+
getRegionForRefName(refName: string): import("@jbrowse/core/assemblyManager/assembly").BasicRegion | undefined;
|
|
2051
|
+
getGeneticCodeId(refName: string): number;
|
|
2052
|
+
getSeqAdapterRefName(canonicalRefName: string): string;
|
|
2053
|
+
} & {
|
|
2054
|
+
getCanonicalRefName2(refName: string): string;
|
|
2055
|
+
isValidRefName(refName: string): boolean;
|
|
2056
|
+
} & {
|
|
2057
|
+
getRefNamePosition(refName: string): number | undefined;
|
|
2058
|
+
getAliasesForRefName(refName: string): string[];
|
|
2059
|
+
getRefNameMapForAdapter(adapterConf: {
|
|
2060
|
+
[x: string]: unknown;
|
|
2061
|
+
}, options: import("@jbrowse/core/data_adapters/BaseAdapter").BaseOptions): Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>;
|
|
2062
|
+
getRefNameMismatch(adapterCacheKey: string): import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch | undefined;
|
|
2063
|
+
} & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
|
|
2064
|
+
configuration: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").IReferenceType<import("@jbrowse/mobx-state-tree").IAnyType>>;
|
|
2065
|
+
}, {
|
|
2066
|
+
error: unknown;
|
|
2067
|
+
loadingP: Promise<void> | undefined;
|
|
2068
|
+
adapterLoads: import("@jbrowse/quick-lru").default<string, Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>>;
|
|
2069
|
+
regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
|
|
2070
|
+
refNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
|
|
2071
|
+
canonicalToSeqAdapterRefNames: Record<string, string> | undefined;
|
|
2072
|
+
cytobands: import("@jbrowse/core/util").Feature[] | undefined;
|
|
2073
|
+
loadedGeneticCodes: Record<string, number> | undefined;
|
|
2074
|
+
lowerCaseRefNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
|
|
2075
|
+
statusMessage: string | undefined;
|
|
2076
|
+
statusProgress: number | undefined;
|
|
2077
|
+
statusSource: string | undefined;
|
|
2078
|
+
refNameMismatches: Map<string, import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch>;
|
|
2079
|
+
} & {
|
|
2080
|
+
getConf(arg: string): any;
|
|
2081
|
+
} & {
|
|
2082
|
+
readonly name: string;
|
|
2083
|
+
readonly aliases: string[];
|
|
2084
|
+
readonly displayName: string;
|
|
2085
|
+
readonly refNameColors: string[];
|
|
2086
|
+
} & {
|
|
2087
|
+
readonly allAliases: string[];
|
|
2088
|
+
hasName(name: string): boolean;
|
|
2089
|
+
} & {
|
|
2090
|
+
setStatus(status?: import("@jbrowse/core/util").RpcStatus): void;
|
|
2091
|
+
setRefNameMismatch(adapterCacheKey: string, mismatch: import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch): void;
|
|
2092
|
+
} & {
|
|
2093
|
+
setLoaded({ regions, refNameAliases, lowerCaseRefNameAliases, canonicalToSeqAdapterRefNames, cytobands, geneticCodes, }: import("@jbrowse/core/assemblyManager/assembly").RefNameMaps & {
|
|
2094
|
+
regions: import("@jbrowse/core/util").Region[];
|
|
2095
|
+
cytobands: import("@jbrowse/core/util").Feature[];
|
|
2096
|
+
geneticCodes: Record<string, number>;
|
|
2097
|
+
}): void;
|
|
2098
|
+
setError(e: unknown): void;
|
|
2099
|
+
setLoadingP(p?: Promise<void>): void;
|
|
2100
|
+
loadPre(): Promise<void>;
|
|
2101
|
+
} & {
|
|
2102
|
+
load(): Promise<void>;
|
|
2103
|
+
} & {
|
|
2104
|
+
afterAttach(): void;
|
|
2105
|
+
} & {
|
|
2106
|
+
readonly initialized: boolean;
|
|
2107
|
+
readonly allRefNames: string[] | undefined;
|
|
2108
|
+
readonly namesByCanonicalRefName: Map<string, string[]> | undefined;
|
|
2109
|
+
readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
|
|
2110
|
+
} & {
|
|
2111
|
+
readonly refNames: string[] | undefined;
|
|
2112
|
+
} & {
|
|
2113
|
+
readonly refNameToIndex: Map<string, number> | undefined;
|
|
2114
|
+
} & {
|
|
2115
|
+
getCanonicalRefName(refName: string): string | undefined;
|
|
2116
|
+
getRefNameColor(refName: string): string | undefined;
|
|
2117
|
+
getRegionForRefName(refName: string): import("@jbrowse/core/assemblyManager/assembly").BasicRegion | undefined;
|
|
2118
|
+
getGeneticCodeId(refName: string): number;
|
|
2119
|
+
getSeqAdapterRefName(canonicalRefName: string): string;
|
|
2120
|
+
} & {
|
|
2121
|
+
getCanonicalRefName2(refName: string): string;
|
|
2122
|
+
isValidRefName(refName: string): boolean;
|
|
2123
|
+
} & {
|
|
2124
|
+
getRefNamePosition(refName: string): number | undefined;
|
|
2125
|
+
getAliasesForRefName(refName: string): string[];
|
|
2126
|
+
getRefNameMapForAdapter(adapterConf: {
|
|
2127
|
+
[x: string]: unknown;
|
|
2128
|
+
}, options: import("@jbrowse/core/data_adapters/BaseAdapter").BaseOptions): Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>;
|
|
2129
|
+
getRefNameMismatch(adapterCacheKey: string): import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch | undefined;
|
|
2130
|
+
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>) | undefined;
|
|
2131
|
+
/**
|
|
2132
|
+
* #getter
|
|
2133
|
+
* The assembly a pending launch is for: the one it names, else the one
|
|
2134
|
+
* the view already shows. A re-launch of a materialized view (a
|
|
2135
|
+
* `jb.setSession` document writing `loc` beside the built state) need
|
|
2136
|
+
* not restate it; without the default the readiness gate waited on
|
|
2137
|
+
* `assemblyManager.get(undefined)` for good. Undefined on a fresh view
|
|
2138
|
+
* whose blob names none, which `error` reports.
|
|
2139
|
+
*/
|
|
2140
|
+
readonly launchAssemblyName: string | undefined;
|
|
2141
|
+
/**
|
|
2142
|
+
* #getter
|
|
2143
|
+
*/
|
|
2144
|
+
readonly initialized: boolean;
|
|
2145
|
+
/**
|
|
2146
|
+
* #getter
|
|
2147
|
+
*/
|
|
2148
|
+
readonly hasDisplayedRegions: boolean;
|
|
2149
|
+
/**
|
|
2150
|
+
* #getter
|
|
2151
|
+
* The assembly whose load the spinner is waiting on: the one `init` names
|
|
2152
|
+
* before navigation (it isn't in assemblyNames yet), else the first of the
|
|
2153
|
+
* displayed assemblies that hasn't finished loading.
|
|
2154
|
+
*/
|
|
2155
|
+
readonly loadingAssembly: (import("@jbrowse/mobx-state-tree").ModelInstanceTypeProps<{
|
|
2156
|
+
configuration: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").IReferenceType<import("@jbrowse/mobx-state-tree").IAnyType>>;
|
|
2157
|
+
}> & {
|
|
2158
|
+
error: unknown;
|
|
2159
|
+
loadingP: Promise<void> | undefined;
|
|
2160
|
+
adapterLoads: import("@jbrowse/quick-lru").default<string, Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>>;
|
|
2161
|
+
regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
|
|
2162
|
+
refNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
|
|
2163
|
+
canonicalToSeqAdapterRefNames: Record<string, string> | undefined;
|
|
2164
|
+
cytobands: import("@jbrowse/core/util").Feature[] | undefined;
|
|
2165
|
+
loadedGeneticCodes: Record<string, number> | undefined;
|
|
2166
|
+
lowerCaseRefNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
|
|
2167
|
+
statusMessage: string | undefined;
|
|
2168
|
+
statusProgress: number | undefined;
|
|
2169
|
+
statusSource: string | undefined;
|
|
2170
|
+
refNameMismatches: Map<string, import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch>;
|
|
2171
|
+
} & {
|
|
2172
|
+
getConf(arg: string): any;
|
|
2173
|
+
} & {
|
|
2174
|
+
readonly name: string;
|
|
2175
|
+
readonly aliases: string[];
|
|
2176
|
+
readonly displayName: string;
|
|
2177
|
+
readonly refNameColors: string[];
|
|
2178
|
+
} & {
|
|
2179
|
+
readonly allAliases: string[];
|
|
2180
|
+
hasName(name: string): boolean;
|
|
2181
|
+
} & {
|
|
2182
|
+
setStatus(status?: import("@jbrowse/core/util").RpcStatus): void;
|
|
2183
|
+
setRefNameMismatch(adapterCacheKey: string, mismatch: import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch): void;
|
|
2184
|
+
} & {
|
|
2185
|
+
setLoaded({ regions, refNameAliases, lowerCaseRefNameAliases, canonicalToSeqAdapterRefNames, cytobands, geneticCodes, }: import("@jbrowse/core/assemblyManager/assembly").RefNameMaps & {
|
|
2186
|
+
regions: import("@jbrowse/core/util").Region[];
|
|
2187
|
+
cytobands: import("@jbrowse/core/util").Feature[];
|
|
2188
|
+
geneticCodes: Record<string, number>;
|
|
2189
|
+
}): void;
|
|
2190
|
+
setError(e: unknown): void;
|
|
2191
|
+
setLoadingP(p?: Promise<void>): void;
|
|
2192
|
+
loadPre(): Promise<void>;
|
|
2193
|
+
} & {
|
|
2194
|
+
load(): Promise<void>;
|
|
2195
|
+
} & {
|
|
2196
|
+
afterAttach(): void;
|
|
2197
|
+
} & {
|
|
2198
|
+
readonly initialized: boolean;
|
|
2199
|
+
readonly allRefNames: string[] | undefined;
|
|
2200
|
+
readonly namesByCanonicalRefName: Map<string, string[]> | undefined;
|
|
2201
|
+
readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
|
|
2202
|
+
} & {
|
|
2203
|
+
readonly refNames: string[] | undefined;
|
|
2204
|
+
} & {
|
|
2205
|
+
readonly refNameToIndex: Map<string, number> | undefined;
|
|
2206
|
+
} & {
|
|
2207
|
+
getCanonicalRefName(refName: string): string | undefined;
|
|
2208
|
+
getRefNameColor(refName: string): string | undefined;
|
|
2209
|
+
getRegionForRefName(refName: string): import("@jbrowse/core/assemblyManager/assembly").BasicRegion | undefined;
|
|
2210
|
+
getGeneticCodeId(refName: string): number;
|
|
2211
|
+
getSeqAdapterRefName(canonicalRefName: string): string;
|
|
2212
|
+
} & {
|
|
2213
|
+
getCanonicalRefName2(refName: string): string;
|
|
2214
|
+
isValidRefName(refName: string): boolean;
|
|
2215
|
+
} & {
|
|
2216
|
+
getRefNamePosition(refName: string): number | undefined;
|
|
2217
|
+
getAliasesForRefName(refName: string): string[];
|
|
2218
|
+
getRefNameMapForAdapter(adapterConf: {
|
|
2219
|
+
[x: string]: unknown;
|
|
2220
|
+
}, options: import("@jbrowse/core/data_adapters/BaseAdapter").BaseOptions): Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>;
|
|
2221
|
+
getRefNameMismatch(adapterCacheKey: string): import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch | undefined;
|
|
2222
|
+
} & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<{
|
|
2223
|
+
configuration: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").IReferenceType<import("@jbrowse/mobx-state-tree").IAnyType>>;
|
|
2224
|
+
}, {
|
|
2225
|
+
error: unknown;
|
|
2226
|
+
loadingP: Promise<void> | undefined;
|
|
2227
|
+
adapterLoads: import("@jbrowse/quick-lru").default<string, Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>>;
|
|
2228
|
+
regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
|
|
2229
|
+
refNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
|
|
2230
|
+
canonicalToSeqAdapterRefNames: Record<string, string> | undefined;
|
|
2231
|
+
cytobands: import("@jbrowse/core/util").Feature[] | undefined;
|
|
2232
|
+
loadedGeneticCodes: Record<string, number> | undefined;
|
|
2233
|
+
lowerCaseRefNameAliases: import("@jbrowse/core/assemblyManager/assembly").RefNameAliases | undefined;
|
|
2234
|
+
statusMessage: string | undefined;
|
|
2235
|
+
statusProgress: number | undefined;
|
|
2236
|
+
statusSource: string | undefined;
|
|
2237
|
+
refNameMismatches: Map<string, import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch>;
|
|
2238
|
+
} & {
|
|
2239
|
+
getConf(arg: string): any;
|
|
2240
|
+
} & {
|
|
2241
|
+
readonly name: string;
|
|
2242
|
+
readonly aliases: string[];
|
|
2243
|
+
readonly displayName: string;
|
|
2244
|
+
readonly refNameColors: string[];
|
|
2245
|
+
} & {
|
|
2246
|
+
readonly allAliases: string[];
|
|
2247
|
+
hasName(name: string): boolean;
|
|
2248
|
+
} & {
|
|
2249
|
+
setStatus(status?: import("@jbrowse/core/util").RpcStatus): void;
|
|
2250
|
+
setRefNameMismatch(adapterCacheKey: string, mismatch: import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch): void;
|
|
2251
|
+
} & {
|
|
2252
|
+
setLoaded({ regions, refNameAliases, lowerCaseRefNameAliases, canonicalToSeqAdapterRefNames, cytobands, geneticCodes, }: import("@jbrowse/core/assemblyManager/assembly").RefNameMaps & {
|
|
2253
|
+
regions: import("@jbrowse/core/util").Region[];
|
|
2254
|
+
cytobands: import("@jbrowse/core/util").Feature[];
|
|
2255
|
+
geneticCodes: Record<string, number>;
|
|
2256
|
+
}): void;
|
|
2257
|
+
setError(e: unknown): void;
|
|
2258
|
+
setLoadingP(p?: Promise<void>): void;
|
|
2259
|
+
loadPre(): Promise<void>;
|
|
2260
|
+
} & {
|
|
2261
|
+
load(): Promise<void>;
|
|
2262
|
+
} & {
|
|
2263
|
+
afterAttach(): void;
|
|
2264
|
+
} & {
|
|
2265
|
+
readonly initialized: boolean;
|
|
2266
|
+
readonly allRefNames: string[] | undefined;
|
|
2267
|
+
readonly namesByCanonicalRefName: Map<string, string[]> | undefined;
|
|
2268
|
+
readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
|
|
2269
|
+
} & {
|
|
2270
|
+
readonly refNames: string[] | undefined;
|
|
2271
|
+
} & {
|
|
2272
|
+
readonly refNameToIndex: Map<string, number> | undefined;
|
|
2273
|
+
} & {
|
|
2274
|
+
getCanonicalRefName(refName: string): string | undefined;
|
|
2275
|
+
getRefNameColor(refName: string): string | undefined;
|
|
2276
|
+
getRegionForRefName(refName: string): import("@jbrowse/core/assemblyManager/assembly").BasicRegion | undefined;
|
|
2277
|
+
getGeneticCodeId(refName: string): number;
|
|
2278
|
+
getSeqAdapterRefName(canonicalRefName: string): string;
|
|
2279
|
+
} & {
|
|
2280
|
+
getCanonicalRefName2(refName: string): string;
|
|
2281
|
+
isValidRefName(refName: string): boolean;
|
|
2282
|
+
} & {
|
|
2283
|
+
getRefNamePosition(refName: string): number | undefined;
|
|
2284
|
+
getAliasesForRefName(refName: string): string[];
|
|
2285
|
+
getRefNameMapForAdapter(adapterConf: {
|
|
2286
|
+
[x: string]: unknown;
|
|
2287
|
+
}, options: import("@jbrowse/core/data_adapters/BaseAdapter").BaseOptions): Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameAliases>;
|
|
2288
|
+
getRefNameMismatch(adapterCacheKey: string): import("@jbrowse/core/assemblyManager/assembly").RefNameMismatch | undefined;
|
|
2289
|
+
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>) | undefined;
|
|
2290
|
+
/**
|
|
2291
|
+
* #getter
|
|
2292
|
+
* What the loading screen says while `showLoading`, read off the
|
|
2293
|
+
* assembly whose load is the wait; undefined otherwise.
|
|
2294
|
+
*/
|
|
2295
|
+
readonly loading: import("@jbrowse/core/util/viewStatus").ViewLoading | undefined;
|
|
2296
|
+
/**
|
|
2297
|
+
* #getter
|
|
2298
|
+
*/
|
|
2299
|
+
readonly hasSomethingToShow: boolean;
|
|
2300
|
+
/**
|
|
2301
|
+
* #getter
|
|
2302
|
+
* init is set but its async navigation (the afterAttach autorun) hasn't
|
|
2303
|
+
* populated displayedRegions yet. `initialized` can already be true here
|
|
2304
|
+
* (it only tracks assembly readiness), so without this the container
|
|
2305
|
+
* would mount over empty regions and pxToBp/hover would throw.
|
|
2306
|
+
*
|
|
2307
|
+
* **Not dotplot's or synteny's `initPending`**, which is the bare
|
|
2308
|
+
* `!!self.pendingLaunch` — "an init blob has not been applied" — and which those
|
|
2309
|
+
* views read from their `settled` gate rather than from `showLoading`.
|
|
2310
|
+
* This one is narrower on purpose: it closes only the window where there
|
|
2311
|
+
* is nothing on screen. Once navigation has produced regions the view is
|
|
2312
|
+
* usable and gets shown, even though `init` is still set while the tracks
|
|
2313
|
+
* and highlights land. Renamed away from the shared spelling because the
|
|
2314
|
+
* two predicates disagree exactly there, and the bare name reads as
|
|
2315
|
+
* theirs.
|
|
2316
|
+
*/
|
|
2317
|
+
readonly awaitingInitNavigation: boolean;
|
|
2318
|
+
/**
|
|
2319
|
+
* #getter
|
|
2320
|
+
* Whether to show a loading indicator instead of the import form or view
|
|
2321
|
+
*/
|
|
2322
|
+
readonly showLoading: boolean;
|
|
2323
|
+
/**
|
|
2324
|
+
* #getter
|
|
2325
|
+
* Whether to show the import form
|
|
2326
|
+
*/
|
|
2327
|
+
readonly showImportForm: boolean;
|
|
2328
|
+
/**
|
|
2329
|
+
* #getter
|
|
2330
|
+
* Is there anything to draw yet? The gate anything reading block geometry
|
|
2331
|
+
* — a ruler, a scalebar, a display — has to pass first, because
|
|
2332
|
+
* `width`/`staticBlocks` throw by design before the view has been
|
|
2333
|
+
* measured and navigated.
|
|
2334
|
+
*
|
|
2335
|
+
* **Not `initialized`**, which is the trap this getter exists to close.
|
|
2336
|
+
* That one answers "have the assembly's regions loaded", which is only
|
|
2337
|
+
* the first of two async steps: navigating then populates
|
|
2338
|
+
* `displayedRegions`, and in the window between the two `initialized` is
|
|
2339
|
+
* already true while there is still nothing on screen. `showLoading`
|
|
2340
|
+
* folds in `awaitingInitNavigation`, the getter that exists for exactly
|
|
2341
|
+
* that gap.
|
|
2342
|
+
*
|
|
2343
|
+
* `error` is the third outcome and is why this is not a bare
|
|
2344
|
+
* `!showLoading`: a failed assembly load also ends the loading state, so
|
|
2345
|
+
* that alone would mount over the wreckage. Read `error` yourself if you
|
|
2346
|
+
* want to draw it.
|
|
2347
|
+
*/
|
|
2348
|
+
readonly ready: boolean;
|
|
2349
|
+
/**
|
|
2350
|
+
* #getter
|
|
2351
|
+
* The same question as `ready` with the other three outcomes named, for a
|
|
2352
|
+
* host that draws its own chrome and has to render all four. See
|
|
2353
|
+
* `computeViewStatus`, whose precedence this defers to — and note its
|
|
2354
|
+
* `ready` is narrower than the getter above, which is true when nothing
|
|
2355
|
+
* has told the view where to look.
|
|
2356
|
+
*/
|
|
2357
|
+
readonly status: ViewStatus;
|
|
2358
|
+
/**
|
|
2359
|
+
* #getter
|
|
2360
|
+
*/
|
|
2361
|
+
readonly scalebarHeight: number;
|
|
2362
|
+
/**
|
|
2363
|
+
* #getter
|
|
2364
|
+
* What TrackContainer puts *above* a track's rendering container: the gap
|
|
2365
|
+
* over its Paper, and the Paper's own top border when outlines are on.
|
|
2366
|
+
*/
|
|
2367
|
+
readonly trackLeadingChrome: number;
|
|
2368
|
+
/**
|
|
2369
|
+
* #getter
|
|
2370
|
+
* ...and what it puts below: the resize divider, plus the matching bottom
|
|
2371
|
+
* border.
|
|
2372
|
+
*/
|
|
2373
|
+
readonly trackTrailingChrome: number;
|
|
2374
|
+
/**
|
|
2375
|
+
* #getter
|
|
2376
|
+
* A track's full cost beyond its display height.
|
|
2377
|
+
*
|
|
2378
|
+
* The track *label* is not counted here: an offset label is an in-flow
|
|
2379
|
+
* box whose height is whatever the theme renders a Paper of icon buttons
|
|
2380
|
+
* at, so it is measured into `trackLabelBands` per track and added by
|
|
2381
|
+
* `trackLabelBand` rather than derived.
|
|
2382
|
+
*/
|
|
2383
|
+
readonly trackChromeHeight: number;
|
|
2384
|
+
/**
|
|
2385
|
+
* #getter
|
|
2386
|
+
*/
|
|
2387
|
+
readonly headerHeight: number;
|
|
2388
|
+
/**
|
|
2389
|
+
* #method
|
|
2390
|
+
* rendered height of a single track, collapsing to a fixed height when
|
|
2391
|
+
* minimized. Shared by trackHeights and getTrackYOffset so the two can't
|
|
2392
|
+
* disagree. Reads `activeDisplay` — the display TrackContainer actually
|
|
2393
|
+
* mounts — rather than re-picking `displays[0]`, so the view's height math
|
|
2394
|
+
* can't diverge from what is on screen.
|
|
2395
|
+
*/
|
|
2396
|
+
trackHeight(track: (import("@jbrowse/mobx-state-tree").IMSTArray<import("@jbrowse/mobx-state-tree").IAnyType> & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>>)[number]): any;
|
|
2397
|
+
/**
|
|
2398
|
+
* #method
|
|
2399
|
+
* the measured in-flow label band above a track's rendering container,
|
|
2400
|
+
* 0 until TrackContainer has measured one or when no label is in flow
|
|
2401
|
+
*/
|
|
2402
|
+
trackLabelBand(track: (import("@jbrowse/mobx-state-tree").IMSTArray<import("@jbrowse/mobx-state-tree").IAnyType> & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IAnyType>>)[number]): number;
|
|
2403
|
+
/**
|
|
2404
|
+
* #getter
|
|
2405
|
+
*/
|
|
2406
|
+
readonly trackHeights: number;
|
|
2407
|
+
/**
|
|
2408
|
+
* #getter
|
|
2409
|
+
*/
|
|
2410
|
+
readonly trackHeightsWithChrome: number;
|
|
2411
|
+
/**
|
|
2412
|
+
* #getter
|
|
2413
|
+
*/
|
|
2414
|
+
readonly height: number;
|
|
2415
|
+
/**
|
|
2416
|
+
* #getter
|
|
2417
|
+
* The display height of each track a whole-stack resize moves, by track
|
|
2418
|
+
* instance id: every shown track that is not minimized.
|
|
2419
|
+
*/
|
|
2420
|
+
readonly resizableTrackHeights: Map<any, any>;
|
|
2421
|
+
/**
|
|
2422
|
+
* #method
|
|
2423
|
+
* Y offset (in pixels, from the top of the view) where a track's
|
|
2424
|
+
* rendering container starts. Walks tracks in DOM render order (pinned
|
|
2425
|
+
* first, then unpinned), from the same constants TrackContainer lays its
|
|
2426
|
+
* Paper out with. Returns `undefined` if the track is not present.
|
|
2427
|
+
*
|
|
2428
|
+
* Includes each track's measured label band, this track's own included,
|
|
2429
|
+
* since an in-flow label sits above the rendering container inside the
|
|
2430
|
+
* same Paper. Exact once TrackContainer has measured; before that it is
|
|
2431
|
+
* short by the unmeasured bands.
|
|
2432
|
+
*/
|
|
2433
|
+
getTrackYOffset(trackId: string): number | undefined;
|
|
2434
|
+
/**
|
|
2435
|
+
* #method
|
|
2436
|
+
* the pinned or unpinned sibling list a track renders within; move
|
|
2437
|
+
* up/down/top/bottom reorder inside this section rather than the full
|
|
2438
|
+
* `tracks` array, since the two sections lay out independently
|
|
2439
|
+
*/
|
|
2440
|
+
trackSection(id: string): any[];
|
|
2441
|
+
/**
|
|
2442
|
+
* #getter
|
|
2443
|
+
*/
|
|
2444
|
+
readonly totalBp: number;
|
|
2445
|
+
/**
|
|
2446
|
+
* #getter
|
|
2447
|
+
*/
|
|
2448
|
+
readonly fitBpPerPx: number;
|
|
2449
|
+
/**
|
|
2450
|
+
* #getter
|
|
2451
|
+
* The zoom-out limit. Equal to the fit for this view's regions, except
|
|
2452
|
+
* while a container holds it on a coarser shared scale, such as a small
|
|
2453
|
+
* genome next to a large one, drawn short so the two compare by length.
|
|
2454
|
+
*
|
|
2455
|
+
* The shared scale raises the limit. A bpPerPx written past the limit
|
|
2456
|
+
* would be undone by the first operation that clamps (a wheel tick, a
|
|
2457
|
+
* rubberband, a `setDisplayedRegions`), as with the dotplot's locked
|
|
2458
|
+
* aspect ratio turning "zoom out" into a zoom in (`axisMaxBpPerPx`).
|
|
2459
|
+
* Every zoom clamps against the same ceiling, so full zoom-out stops at
|
|
2460
|
+
* the shared scale.
|
|
2461
|
+
*/
|
|
2462
|
+
readonly maxBpPerPx: number;
|
|
2463
|
+
/**
|
|
2464
|
+
* #getter
|
|
2465
|
+
* The zoom-out ceiling a containing comparative view holds this row to,
|
|
2466
|
+
* or 0 for a standalone view, a mode that is off, and a stack that cannot
|
|
2467
|
+
* answer yet.
|
|
2468
|
+
*
|
|
2469
|
+
* Pulled rather than pushed down into a volatile: the number is a
|
|
2470
|
+
* function of every row's fit, all of which move on a resize, and a
|
|
2471
|
+
* stored copy would be stale by the next layout.
|
|
2472
|
+
*/
|
|
2473
|
+
readonly sharedFitBpPerPx: number;
|
|
2474
|
+
/**
|
|
2475
|
+
* #getter
|
|
2476
|
+
*/
|
|
2477
|
+
readonly minBpPerPx: number;
|
|
2478
|
+
/**
|
|
2479
|
+
* #getter
|
|
2480
|
+
*/
|
|
2481
|
+
readonly error: unknown;
|
|
2482
|
+
/**
|
|
2483
|
+
* #getter
|
|
2484
|
+
*/
|
|
2485
|
+
readonly maxOffset: number;
|
|
2486
|
+
/**
|
|
2487
|
+
* #getter
|
|
2488
|
+
*/
|
|
2489
|
+
readonly minOffset: number;
|
|
2490
|
+
/**
|
|
2491
|
+
* #getter
|
|
2492
|
+
* Whether the displayed regions read left-to-right, right-to-left, or
|
|
2493
|
+
* some of each. `horizontallyFlip` reverses the order and flips every
|
|
2494
|
+
* region at once, so a flipped row is uniformly `reversed` and `mixed`
|
|
2495
|
+
* takes going out of your way — the scalebar label menu's per-region
|
|
2496
|
+
* "Reverse region". Read off `displayedRegions` rather than off blocks
|
|
2497
|
+
* because blocks cover the window and this is a fact about the row.
|
|
2498
|
+
*/
|
|
2499
|
+
readonly displayedRegionsOrientation: import("./util.ts").RegionsOrientation;
|
|
2500
|
+
/**
|
|
2501
|
+
* #getter
|
|
2502
|
+
*/
|
|
2503
|
+
readonly displayedRegionsTotalPx: number;
|
|
2504
|
+
/**
|
|
2505
|
+
* #getter
|
|
2506
|
+
*/
|
|
2507
|
+
readonly trackMap: Map<string, any>;
|
|
2508
|
+
/**
|
|
2509
|
+
* #method
|
|
2510
|
+
*/
|
|
2511
|
+
getTrack(id: string): any;
|
|
2512
|
+
/**
|
|
2513
|
+
* #method
|
|
2514
|
+
* displayId of the active (shown) display for a track in this view, used
|
|
2515
|
+
* by the config editor to expand the relevant display and collapse the
|
|
2516
|
+
* track's other displays
|
|
2517
|
+
*/
|
|
2518
|
+
getActiveDisplayId(trackId: string): string | undefined;
|
|
2519
|
+
} & {
|
|
2520
|
+
/**
|
|
2521
|
+
* #action
|
|
2522
|
+
*/
|
|
2523
|
+
setShowTrackOutlines(arg: boolean): void;
|
|
2524
|
+
/**
|
|
2525
|
+
* #action
|
|
2526
|
+
*/
|
|
2527
|
+
setScrollZoom(flag: boolean): void;
|
|
2528
|
+
/**
|
|
2529
|
+
* #action
|
|
2530
|
+
*/
|
|
2531
|
+
setColorByCDS(flag: boolean): void;
|
|
2532
|
+
/**
|
|
2533
|
+
* #action
|
|
2534
|
+
*/
|
|
2535
|
+
setShowAminoAcids(flag: boolean): void;
|
|
2536
|
+
/**
|
|
2537
|
+
* #action
|
|
2538
|
+
*/
|
|
2539
|
+
setShowCytobands(flag: boolean): void;
|
|
2540
|
+
/**
|
|
2541
|
+
* #action
|
|
2542
|
+
*/
|
|
2543
|
+
setTrackLabelBand(trackId: string, band: number): void;
|
|
2544
|
+
/**
|
|
2545
|
+
* #action
|
|
2546
|
+
*/
|
|
2547
|
+
setScrollPortExcess(px: number | undefined): void;
|
|
2548
|
+
/**
|
|
2549
|
+
* #action
|
|
2550
|
+
* Grow or shrink every unminimized track by `distance` px in all, each
|
|
2551
|
+
* by its share of the height it has above the display minimum. `from` is
|
|
2552
|
+
* the heights to scale, by track instance id; a drag passes the heights
|
|
2553
|
+
* it started with, so whole-pixel rounding does not compound frame by
|
|
2554
|
+
* frame. Returns how far the stack moved.
|
|
2555
|
+
*/
|
|
2556
|
+
resizeTracks(distance: number, from?: any): number;
|
|
2557
|
+
/**
|
|
2558
|
+
* #action
|
|
2559
|
+
* A resize keeps the window in bp, so `bpPerPx` follows the new width
|
|
2560
|
+
* and the view keeps framing the same sequence (ADR-070).
|
|
2561
|
+
*/
|
|
2562
|
+
setWidth(newWidth: number): void;
|
|
2563
|
+
/**
|
|
2564
|
+
* #action
|
|
2565
|
+
*/
|
|
2566
|
+
setError(error: unknown): void;
|
|
2567
|
+
/**
|
|
2568
|
+
* #action
|
|
2569
|
+
*/
|
|
2570
|
+
setIsScalebarRefNameMenuOpen(isOpen: boolean): void;
|
|
2571
|
+
/**
|
|
2572
|
+
* #action
|
|
2573
|
+
*/
|
|
2574
|
+
setHideHeader(b: boolean): void;
|
|
2575
|
+
/**
|
|
2576
|
+
* #action
|
|
2577
|
+
*/
|
|
2578
|
+
setHideHeaderOverview(b: boolean): void;
|
|
2579
|
+
/**
|
|
2580
|
+
* #action
|
|
2581
|
+
*/
|
|
2582
|
+
setScalebarOnly(b: boolean): void;
|
|
2583
|
+
/**
|
|
2584
|
+
* #action
|
|
2585
|
+
*/
|
|
2586
|
+
setHideNoTracksActive(b: boolean): void;
|
|
2587
|
+
/**
|
|
2588
|
+
* #action
|
|
2589
|
+
*/
|
|
2590
|
+
setShowGridlines(b: boolean): void;
|
|
2591
|
+
/**
|
|
2592
|
+
* #action
|
|
2593
|
+
* set temporary vertical guides (e.g., for LD display hover)
|
|
2594
|
+
*/
|
|
2595
|
+
setVolatileGuides(guides: VolatileGuide[]): void;
|
|
2596
|
+
/**
|
|
2597
|
+
* #action
|
|
2598
|
+
*/
|
|
2599
|
+
scrollTo(offsetPx: number): number;
|
|
2600
|
+
/**
|
|
2601
|
+
* #action
|
|
2602
|
+
* `scrollTo`'s bp-space twin: place the window's left edge at a
|
|
2603
|
+
* linearized bp coordinate, clamped to the same scroll limits.
|
|
2604
|
+
*
|
|
2605
|
+
* It exists so a caller that already knows where it wants to be in bp —
|
|
2606
|
+
* zoomTo, anchoring the base under the cursor — does not have to convert
|
|
2607
|
+
* to pixels and let this convert back. That round trip is lossy once per
|
|
2608
|
+
* frame, and a scroll-zoom burst is a few dozen frames, which is enough
|
|
2609
|
+
* to walk the base out from under the cursor.
|
|
2610
|
+
*/
|
|
2611
|
+
scrollToBp(startBp: number): number;
|
|
2612
|
+
/**
|
|
2613
|
+
* #action
|
|
2614
|
+
*/
|
|
2615
|
+
zoomTo(bpPerPx: number, offset?: any): number;
|
|
2616
|
+
/**
|
|
2617
|
+
* #action
|
|
2618
|
+
* sets offsets of rubberband, used in the get sequence dialog can call
|
|
2619
|
+
* view.getSelectedRegions(view.leftOffset,view.rightOffset) to compute
|
|
2620
|
+
* the selected regions from the offsets
|
|
2621
|
+
*/
|
|
2622
|
+
setOffsets(left?: BpOffset, right?: BpOffset): void;
|
|
2623
|
+
/**
|
|
2624
|
+
* #action
|
|
2625
|
+
* Raise the picker over search results that name more than one place.
|
|
2626
|
+
* @param onPick - where a picked result lands; by default it navigates
|
|
2627
|
+
* there and shows the track its index came from
|
|
2628
|
+
*/
|
|
2629
|
+
setSearchResults(searchResults: BaseResult[], searchQuery: string, assemblyName: string, onPick?: (result: BaseResult) => Promise<unknown>): void;
|
|
2630
|
+
/**
|
|
2631
|
+
* #action
|
|
2632
|
+
*/
|
|
2633
|
+
showTrack(trackId: string, initialSnapshot?: any, displayInitialSnapshot?: any, inlineConf?: Record<string, unknown>): any;
|
|
2634
|
+
/**
|
|
2635
|
+
* #action
|
|
2636
|
+
*/
|
|
2637
|
+
hideTrack(trackId: string): boolean;
|
|
2638
|
+
} & {
|
|
2639
|
+
/**
|
|
2640
|
+
* #action
|
|
2641
|
+
* Resize every unminimized track so the view is exactly as tall as the
|
|
2642
|
+
* scroll port it sits in. Does nothing until the view has measured one.
|
|
2643
|
+
*/
|
|
2644
|
+
fitTracksToWindow(): void;
|
|
2645
|
+
/**
|
|
2646
|
+
* #action
|
|
2647
|
+
* showTrack for a track whose display state model may be lazily
|
|
2648
|
+
* loaded: loads it, then shows
|
|
2649
|
+
*/
|
|
2650
|
+
launchTrack(trackId: string, initialSnapshot?: any, displayInitialSnapshot?: any, inlineConf?: Record<string, unknown>): Promise<any>;
|
|
2651
|
+
} & {
|
|
2652
|
+
/**
|
|
2653
|
+
* #method
|
|
2654
|
+
* The shown track a move action means: the menu passes a track model's
|
|
2655
|
+
* own `id`, an agent passes the `trackId` it knows the track by, and
|
|
2656
|
+
* both name one shown track. Answers the model id, or the argument
|
|
2657
|
+
* unchanged when nothing shown matches, so the move reports it.
|
|
2658
|
+
*/
|
|
2659
|
+
trackModelId(idOrTrackId: string): any;
|
|
2660
|
+
} & {
|
|
2661
|
+
moveTrack: (moving: string, target: string) => void;
|
|
2662
|
+
/**
|
|
2663
|
+
* #action
|
|
2664
|
+
*/
|
|
2665
|
+
moveTrackDown(idOrTrackId: string): void;
|
|
2666
|
+
/**
|
|
2667
|
+
* #action
|
|
2668
|
+
*/
|
|
2669
|
+
moveTrackUp(idOrTrackId: string): void;
|
|
2670
|
+
/**
|
|
2671
|
+
* #action
|
|
2672
|
+
*/
|
|
2673
|
+
moveTrackToTop(idOrTrackId: string): void;
|
|
2674
|
+
/**
|
|
2675
|
+
* #action
|
|
2676
|
+
*/
|
|
2677
|
+
moveTrackToBottom(idOrTrackId: string): void;
|
|
2678
|
+
} & {
|
|
2679
|
+
/**
|
|
2680
|
+
* #action
|
|
2681
|
+
*/
|
|
2682
|
+
toggleTrack(trackId: string): boolean;
|
|
2683
|
+
/**
|
|
2684
|
+
* #action
|
|
2685
|
+
* toggleTrack with launchTrack's loading behavior
|
|
2686
|
+
*/
|
|
2687
|
+
launchToggleTrack(trackId: string): Promise<boolean>;
|
|
2688
|
+
/**
|
|
2689
|
+
* #action
|
|
2690
|
+
*/
|
|
2691
|
+
setTrackLabels(setting: ViewTrackLabelMode): void;
|
|
2692
|
+
/**
|
|
2693
|
+
* #action
|
|
2694
|
+
*/
|
|
2695
|
+
setShowCenterLine(b: boolean): void;
|
|
2696
|
+
/**
|
|
2697
|
+
* #action
|
|
2698
|
+
*/
|
|
2699
|
+
activateTrackSelector(): import("@jbrowse/core/util").Widget;
|
|
2700
|
+
/**
|
|
2701
|
+
* #action
|
|
2702
|
+
*/
|
|
2703
|
+
toggleTrackSelector(): import("@jbrowse/core/util").Widget;
|
|
2704
|
+
/**
|
|
2705
|
+
* #method
|
|
2706
|
+
* Helper method for the fetchSequence.
|
|
2707
|
+
* Retrieves the corresponding regions that were selected by the
|
|
2708
|
+
* rubberband
|
|
2709
|
+
*
|
|
2710
|
+
* @param leftOffset - `object as {start, end, index, offset}`, offset = start
|
|
2711
|
+
* of user drag
|
|
2712
|
+
* @param rightOffset - `object as {start, end, index, offset}`,
|
|
2713
|
+
* offset = end of user drag
|
|
2714
|
+
* @returns array of Region[]
|
|
2715
|
+
*/
|
|
2716
|
+
getSelectedRegions(leftOffset?: BpOffset, rightOffset?: BpOffset): {
|
|
2717
|
+
assemblyName: string;
|
|
2718
|
+
refName: string;
|
|
2719
|
+
start: number;
|
|
2720
|
+
end: number;
|
|
2721
|
+
}[];
|
|
2722
|
+
/**
|
|
2723
|
+
* #action
|
|
2724
|
+
*/
|
|
2725
|
+
horizontalScroll(distance: number): number;
|
|
2726
|
+
/**
|
|
2727
|
+
* #action
|
|
2728
|
+
*/
|
|
2729
|
+
setDraggingTrackId(idx?: string): void;
|
|
2730
|
+
/**
|
|
2731
|
+
* #action
|
|
2732
|
+
* called while dragging a track over the track at `targetId`; reorders
|
|
2733
|
+
* once the cursor has moved far enough (see shouldSwapTracks) to avoid
|
|
2734
|
+
* jitter when a short track is dragged over a tall one
|
|
2735
|
+
*/
|
|
2736
|
+
onTrackDragOver(targetId: string, currentY: number): void;
|
|
2737
|
+
/**
|
|
2738
|
+
* #action
|
|
2739
|
+
*/
|
|
2740
|
+
setLaunch(launch?: LaunchInput<InitState>): void;
|
|
2741
|
+
/**
|
|
2742
|
+
* #method
|
|
2743
|
+
* renders the view to SVG markup, which it returns; saves it through
|
|
2744
|
+
* FileSaver unless `save: false`
|
|
2745
|
+
*/
|
|
2746
|
+
exportSvg(opts?: ExportSvgOptions): Promise<string>;
|
|
2747
|
+
} & {
|
|
2748
|
+
slide: (viewWidths: number) => void;
|
|
2749
|
+
zoom: (targetBpPerPx: number) => void;
|
|
2750
|
+
cancelZoomAnimation: () => void;
|
|
2751
|
+
} & {
|
|
2752
|
+
/**
|
|
2753
|
+
* #getter
|
|
2754
|
+
*/
|
|
2755
|
+
readonly showsWholeChromosome: boolean;
|
|
2756
|
+
/**
|
|
2757
|
+
* #getter
|
|
2758
|
+
* an ideogram only reads correctly against an entire chromosome: on a
|
|
2759
|
+
* sub-region it is a meaningless slice of bands, and the centromere shows
|
|
2760
|
+
* up as a lone half-triangle. The chromosome needs bands of its own too:
|
|
2761
|
+
* a cytoband file often lists only the main chromosomes, not chrM or the
|
|
2762
|
+
* unplaced scaffolds
|
|
2763
|
+
*/
|
|
2764
|
+
readonly canShowCytobands: boolean;
|
|
2765
|
+
/**
|
|
2766
|
+
* #getter
|
|
2767
|
+
* the `showCytobands` setting gated by whether cytobands can be shown at
|
|
2768
|
+
* all (whole chromosome with bands of its own) and by the header
|
|
2769
|
+
* overview they draw in being on, which the SVG export follows too
|
|
2770
|
+
*/
|
|
2771
|
+
readonly effectiveShowCytobands: boolean;
|
|
2772
|
+
/**
|
|
2773
|
+
* #getter
|
|
2774
|
+
* the cytoband is displayed to the right of the chromosome name, and
|
|
2775
|
+
* that offset is calculated manually with this method
|
|
2776
|
+
*/
|
|
2777
|
+
readonly cytobandOffset: number;
|
|
2778
|
+
/**
|
|
2779
|
+
* #getter
|
|
2780
|
+
*/
|
|
2781
|
+
readonly isTrackSelectorOpen: boolean;
|
|
2782
|
+
} & {
|
|
2783
|
+
/**
|
|
2784
|
+
* #method
|
|
2785
|
+
* return the view menu items
|
|
2786
|
+
*/
|
|
2787
|
+
menuItems(): MenuItem[];
|
|
2788
|
+
/**
|
|
2789
|
+
* #method
|
|
2790
|
+
* the view menu's Highlights submenu; extend this to add a row there
|
|
2791
|
+
*/
|
|
2792
|
+
highlightsSubMenuItems(): MenuItem[];
|
|
2793
|
+
/**
|
|
2794
|
+
* #method
|
|
2795
|
+
* what a plugin can start from the selected region — a synteny view, a
|
|
2796
|
+
* consensus call. Extend this rather than `rubberBandMenuItems` so the
|
|
2797
|
+
* entries collect under the menu's "Launch" submenu; that grouping is
|
|
2798
|
+
* decided once here rather than by whichever contributor runs first, and
|
|
2799
|
+
* keeps the rubberband menu itself short as plugins pile on.
|
|
2800
|
+
*/
|
|
2801
|
+
rubberBandLaunchMenuItems(): MenuItem[];
|
|
2802
|
+
/**
|
|
2803
|
+
* #getter
|
|
2804
|
+
* geometry of the overview scalebar — derived from displayedRegions,
|
|
2805
|
+
* width, and cytobandOffset so it stays cached by MobX
|
|
2806
|
+
*/
|
|
2807
|
+
readonly overviewLayout: ViewLayout;
|
|
2808
|
+
} & {
|
|
2809
|
+
/**
|
|
2810
|
+
* #getter
|
|
2811
|
+
* static blocks are an important concept jbrowse uses to avoid
|
|
2812
|
+
* re-rendering when you scroll to the side. when you horizontally
|
|
2813
|
+
* scroll to the right, old blocks to the left may be removed, and new
|
|
2814
|
+
* blocks may be instantiated on the right. tracks may use the static
|
|
2815
|
+
* blocks to render their data for the region represented by the block
|
|
2816
|
+
*/
|
|
2817
|
+
readonly staticBlocks: BlockSet;
|
|
2818
|
+
/**
|
|
2819
|
+
* #getter
|
|
2820
|
+
* dynamic blocks represent the exact coordinates of the currently
|
|
2821
|
+
* visible genome regions on the screen. they are similar to static
|
|
2822
|
+
* blocks, but static blocks can go offscreen while dynamic blocks
|
|
2823
|
+
* represent exactly what is on screen
|
|
2824
|
+
*/
|
|
2825
|
+
readonly dynamicBlocks: BlockSet;
|
|
2826
|
+
/**
|
|
2827
|
+
* #getter
|
|
2828
|
+
* all overview scalebar blocks (content + elided), laid out on the
|
|
2829
|
+
* overviewLayout. memoized so the scalebar doesn't recompute it per
|
|
2830
|
+
* render
|
|
2831
|
+
*/
|
|
2832
|
+
readonly overviewBlocks: import("@jbrowse/core/util/blockTypes").BaseBlock[];
|
|
2833
|
+
/**
|
|
2834
|
+
* #getter
|
|
2835
|
+
* leading/trailing pixel span of the visible regions projected onto the
|
|
2836
|
+
* overviewLayout — the geometry of the overview's "you are here"
|
|
2837
|
+
* rectangle, and of the top edge of the polygon drawn under it. Elided
|
|
2838
|
+
* regions count: at whole-genome zoom the tail of an assembly is all
|
|
2839
|
+
* coalesced tiny contigs, and stopping at the last *content* block left
|
|
2840
|
+
* the rectangle short of (or, scrolled onto that tail, absent from) the
|
|
2841
|
+
* polygon it sits on.
|
|
2842
|
+
*/
|
|
2843
|
+
readonly overviewRegionPxSpan: import("@jbrowse/core/util/Base1DUtils").PxSpan | undefined;
|
|
2844
|
+
/**
|
|
2845
|
+
* #getter
|
|
2846
|
+
* The x shift that maps the **staticBlocks frame** onto the viewport:
|
|
2847
|
+
* `translateX(view.staticBlocksTranslateX)` on one container places
|
|
2848
|
+
* every `gridlineTicks`, `scalebarLabels` and `paddingSpans` entry at
|
|
2849
|
+
* once, and a pan then moves that single transform rather than each
|
|
2850
|
+
* child.
|
|
2851
|
+
*
|
|
2852
|
+
* The frame exists because those three are laid out across every
|
|
2853
|
+
* displayed region rather than across the viewport — it overhangs on
|
|
2854
|
+
* both sides — so their `x` values are stable under a scroll and only
|
|
2855
|
+
* this number moves. `scalebarRefNameLabels` is the exception and says
|
|
2856
|
+
* so: its `transform` is already a screen x, because a sticky label's
|
|
2857
|
+
* position is a function of the scroll rather than of block geometry.
|
|
2858
|
+
*
|
|
2859
|
+
* **The subtraction must happen here, in float64, and that is the
|
|
2860
|
+
* load-bearing part.** `offsetPx` is a whole-genome pixel coordinate —
|
|
2861
|
+
* hg38 chr1 at base resolution is already past 1e10 — and a length that
|
|
2862
|
+
* size does not survive the trip through CSS: the transform matrix is
|
|
2863
|
+
* float32 by the time it reaches the compositor, where consecutive
|
|
2864
|
+
* representable values at 1e10 are ~1024px apart, and layout saturates
|
|
2865
|
+
* sooner still (Blink's `LayoutUnit` is int32 at 1/64px, so ±33.5M px).
|
|
2866
|
+
* So the shape that looks obvious — lay an overlay out in absolute
|
|
2867
|
+
* genome pixels, write `translateX(-view.offsetPx)` — does not lose a
|
|
2868
|
+
* subpixel, it puts the row somewhere else entirely, and only on large
|
|
2869
|
+
* assemblies at high zoom, which is not where anyone tests. Both
|
|
2870
|
+
* operands here are large and their difference is bounded by the
|
|
2871
|
+
* overhang (a block or two), so what reaches CSS is small and exact.
|
|
2872
|
+
* Same rule as the GPU side, one layer up —
|
|
2873
|
+
* `agent-docs/reference/BP_PRECISION.md`.
|
|
2874
|
+
*
|
|
2875
|
+
* Published because it is the one piece of coordinate arithmetic a host
|
|
2876
|
+
* drawing its own chrome would otherwise have to know, and because
|
|
2877
|
+
* having it written out at each call site is how the two in-tree copies
|
|
2878
|
+
* came to disagree about rounding. Round it where the content is text
|
|
2879
|
+
* (a fractional offset blurs a label); leave it alone for paths and
|
|
2880
|
+
* boxes.
|
|
2881
|
+
*/
|
|
2882
|
+
readonly staticBlocksTranslateX: number;
|
|
2883
|
+
/**
|
|
2884
|
+
* #getter
|
|
2885
|
+
* Gridline tick positions (x relative to the staticBlocks frame),
|
|
2886
|
+
* derived from staticBlocks + bpPerPx. Computed once and shared by every
|
|
2887
|
+
* Gridlines instance (scalebar, main view, each pinned track) rather
|
|
2888
|
+
* than recomputing the makeTicks loop per component.
|
|
2889
|
+
*/
|
|
2890
|
+
readonly gridlineTicks: {
|
|
2891
|
+
x: number;
|
|
2892
|
+
major: boolean;
|
|
2893
|
+
}[];
|
|
2894
|
+
/**
|
|
2895
|
+
* #getter
|
|
2896
|
+
* Scalebar coordinate labels (x in the staticBlocks frame + display
|
|
2897
|
+
* text). Sibling of gridlineTicks sharing the same makeBlockTicks
|
|
2898
|
+
* formula, so labels line up exactly with their gridlines. staticBlocks
|
|
2899
|
+
* chop a region into ~800px chunks; groupContiguousBlocks merges them
|
|
2900
|
+
* back per region so a label on an internal chunk boundary isn't clipped
|
|
2901
|
+
* away by both neighbors — only genuine region edges clip a label.
|
|
2902
|
+
*
|
|
2903
|
+
* A run that can hold too few labels to make a ruler goes unnumbered
|
|
2904
|
+
* (`tickLabelsWorthDrawing`), the same rule the overview scalebar and
|
|
2905
|
+
* the dotplot axes apply: with a whole genome displayed each chromosome
|
|
2906
|
+
* catches one lone coordinate, which conveys no scale by itself and
|
|
2907
|
+
* reads as the same number repeated across the row.
|
|
2908
|
+
*/
|
|
2909
|
+
readonly scalebarLabels: {
|
|
2910
|
+
x: number;
|
|
2911
|
+
label: string;
|
|
2912
|
+
key: string;
|
|
2913
|
+
}[];
|
|
2914
|
+
/**
|
|
2915
|
+
* #getter
|
|
2916
|
+
* The bold refName labels drawn along the scalebar, as plain data:
|
|
2917
|
+
* `{key, refName, displayedRegionIndex, lastDisplayedRegionIndex,
|
|
2918
|
+
* sticky, transform, maxWidth, paddingLeft, text}` each. One per run of
|
|
2919
|
+
* same-refName regions, plus a "sticky" one pinned to the viewport's
|
|
2920
|
+
* left edge naming the refName under it, so panning into a chromosome
|
|
2921
|
+
* does not scroll its own name off the screen.
|
|
2922
|
+
*
|
|
2923
|
+
* Three rules live in here that a host drawing region names will
|
|
2924
|
+
* otherwise rediscover the hard way, and two of them are invisible until
|
|
2925
|
+
* the data is awkward:
|
|
2926
|
+
*
|
|
2927
|
+
* - the sticky label rides the rightmost run that has scrolled off the
|
|
2928
|
+
* left, not the region's first block — that one is gone from
|
|
2929
|
+
* staticBlocks entirely once you zoom into a region's interior, taking
|
|
2930
|
+
* the chromosome name off screen at exactly the zoom where nothing
|
|
2931
|
+
* else names it.
|
|
2932
|
+
* - adjacent regions of the same refName (collapsed introns) get one
|
|
2933
|
+
* label between them, not one each. That label names the whole run and
|
|
2934
|
+
* is fitted to the whole run, and `displayedRegionIndex` /
|
|
2935
|
+
* `lastDisplayedRegionIndex` bracket what it stands for.
|
|
2936
|
+
* - a name is drawn whole or not at all, measured against the space its
|
|
2937
|
+
* run leaves. Clipped to its own width, `chr16` reads as `chr1` —
|
|
2938
|
+
* a different chromosome rather than a shortened name, which is why
|
|
2939
|
+
* this is a fit test rather than an ellipsis.
|
|
2940
|
+
*
|
|
2941
|
+
* **Viewport frame, unlike its siblings.** `transform` is a screen x,
|
|
2942
|
+
* already net of `offsetPx`, where gridlineTicks / scalebarLabels /
|
|
2943
|
+
* paddingSpans are all in the staticBlocks frame. The sticky label's
|
|
2944
|
+
* position is a function of `offsetPx` rather than of block geometry, so
|
|
2945
|
+
* it has no fixed position in that frame — and for the same reason this
|
|
2946
|
+
* getter recomputes on every scroll frame where those three do not.
|
|
2947
|
+
*
|
|
2948
|
+
* `caption` accompanies the labels: the chip at the row's left edge,
|
|
2949
|
+
* saying which assembly the row is (a container view — synteny — opts
|
|
2950
|
+
* into that through `scalebarDisplayPrefix`) and whether it is flipped.
|
|
2951
|
+
* A ` [rev]` there is a fact about the ROW; the same marker on a
|
|
2952
|
+
* chromosome name means that one region, which only happens under mixed
|
|
2953
|
+
* orientation. `captionSpanPx` is the width it takes: the sticky label
|
|
2954
|
+
* pins to its right edge rather than the viewport's, and the coordinate
|
|
2955
|
+
* numbers stay out from under it. The SVG export deliberately
|
|
2956
|
+
* calls `getScalebarRefNameLabels` itself with no prefix rather than
|
|
2957
|
+
* reading this, since it draws its own assembly name above the ruler.
|
|
2958
|
+
*/
|
|
2959
|
+
readonly scalebarRefNameLabels: {
|
|
2960
|
+
labels: import("./util.ts").ScalebarRefNameLabel[];
|
|
2961
|
+
caption: string | undefined;
|
|
2962
|
+
captionSpanPx: number;
|
|
2963
|
+
};
|
|
2964
|
+
/**
|
|
2965
|
+
* #getter
|
|
2966
|
+
* Every span along the row that is not track data, as plain geometry in
|
|
2967
|
+
* the staticBlocks frame — the same frame as gridlineTicks and
|
|
2968
|
+
* scalebarLabels, so one `translateX(staticBlocksTranslateX)` places all
|
|
2969
|
+
* three. A host drawing its own chrome needs all three kinds:
|
|
2970
|
+
*
|
|
2971
|
+
* - `seam`: the 3px bar at a region's right edge. Displayed regions are
|
|
2972
|
+
* laid out **contiguously** (calculateStaticBlocks emits boundary
|
|
2973
|
+
* padding only before the first region and after the last), so this
|
|
2974
|
+
* bar is the only thing separating two of them. Without it a
|
|
2975
|
+
* two-region view looks like a single region.
|
|
2976
|
+
* `isRightEndOfDisplayedRegion` marks it; the right edge of the
|
|
2977
|
+
* currently *loaded* blocks, which block geometry gives you, is a
|
|
2978
|
+
* different set.
|
|
2979
|
+
* - `elided`: a region too narrow to draw at this zoom. Whole-genome on
|
|
2980
|
+
* a real assembly is mostly these (hg38 has 455 sequences, and all
|
|
2981
|
+
* but the 24 chromosomes are under a pixel wide), so a host that
|
|
2982
|
+
* skips them leaves that part of the row empty.
|
|
2983
|
+
* - `boundary`: past the start of the first region or the end of the
|
|
2984
|
+
* last. Greying it shows the last region's seam as the edge of a
|
|
2985
|
+
* filled area, where it would otherwise look like a line in the
|
|
2986
|
+
* middle of the track.
|
|
2987
|
+
*
|
|
2988
|
+
* Elided blocks get no seam even though they carry the flag: at the
|
|
2989
|
+
* zoom where regions elide, one bar per region would fill the row solid
|
|
2990
|
+
* grey.
|
|
2991
|
+
*
|
|
2992
|
+
* PaddingBlocks is the in-tree consumer. The SVG export does not use
|
|
2993
|
+
* it: `SVGRegionSeparators` walks dynamicBlocks itself and draws only
|
|
2994
|
+
* the seam, because `elided` and `boundary` mark state for an
|
|
2995
|
+
* interactive row. In a static figure the striped grey would cover most
|
|
2996
|
+
* of the row at whole-genome zoom. The export keeps the seam because
|
|
2997
|
+
* regions lay out contiguously and the seam is all that separates two
|
|
2998
|
+
* of them.
|
|
2999
|
+
*/
|
|
3000
|
+
readonly paddingSpans: readonly {
|
|
3001
|
+
key: string;
|
|
3002
|
+
x: number;
|
|
3003
|
+
width: number;
|
|
3004
|
+
kind: 'seam' | 'elided' | 'boundary';
|
|
3005
|
+
}[];
|
|
3006
|
+
/**
|
|
3007
|
+
* #getter
|
|
3008
|
+
* Integer-rounded sum of all visible block widths. Slightly less than
|
|
3009
|
+
* view.width when the genome ends before the right edge; use view.width
|
|
3010
|
+
* for SVG clip rects (display boundary) and this for paint canvas sizing
|
|
3011
|
+
* (actual content width).
|
|
3012
|
+
*/
|
|
3013
|
+
readonly totalWidthPx: number;
|
|
3014
|
+
/**
|
|
3015
|
+
* #getter
|
|
3016
|
+
* Like totalWidthPx but excluding inter-region boundary blocks. Used
|
|
3017
|
+
* when column layout divides the canvas width by feature count.
|
|
3018
|
+
*/
|
|
3019
|
+
readonly totalWidthPxWithoutBorders: number;
|
|
3020
|
+
/**
|
|
3021
|
+
* #getter
|
|
3022
|
+
*/
|
|
3023
|
+
readonly visibleBp: number;
|
|
3024
|
+
/**
|
|
3025
|
+
* #getter
|
|
3026
|
+
* Whether any part of a displayed region actually falls inside the
|
|
3027
|
+
* viewport. False both when the view holds no regions at all and when
|
|
3028
|
+
* it holds some but is scrolled entirely off them; either way there is
|
|
3029
|
+
* no visible span for the scalebar, ruler and refName labels to
|
|
3030
|
+
* describe. The SVG export checks it before drawing its header.
|
|
3031
|
+
* Distinct from `hasDisplayedRegions`, which only asks whether the
|
|
3032
|
+
* view has been given regions, not whether any are on screen.
|
|
3033
|
+
*/
|
|
3034
|
+
readonly hasVisibleContent: boolean;
|
|
3035
|
+
/**
|
|
3036
|
+
* #getter
|
|
3037
|
+
* What is on screen, as regions that address whole bases — what a
|
|
3038
|
+
* reader means by "the visible region" when they ask to fetch it,
|
|
3039
|
+
* bookmark it or read it back in a locString field. `visibleRegions`
|
|
3040
|
+
* below is the other half: pixels, and fractional by design.
|
|
3041
|
+
*/
|
|
3042
|
+
readonly visibleWholeBaseRegions: {
|
|
3043
|
+
assemblyName: string;
|
|
3044
|
+
refName: string;
|
|
3045
|
+
start: number;
|
|
3046
|
+
end: number;
|
|
3047
|
+
}[];
|
|
3048
|
+
/**
|
|
3049
|
+
* #getter
|
|
3050
|
+
* Returns the currently visible content blocks with screen pixel
|
|
3051
|
+
* positions and displayedRegionIndex guaranteed.
|
|
3052
|
+
* Used by WebGL displays for per-region data fetching and rendering.
|
|
3053
|
+
*/
|
|
3054
|
+
readonly visibleRegions: {
|
|
3055
|
+
refName: string;
|
|
3056
|
+
start: number;
|
|
3057
|
+
end: number;
|
|
3058
|
+
assemblyName: string;
|
|
3059
|
+
reversed: boolean | undefined;
|
|
3060
|
+
displayedRegionIndex: number;
|
|
3061
|
+
screenStartPx: number;
|
|
3062
|
+
screenEndPx: number;
|
|
3063
|
+
}[];
|
|
3064
|
+
/**
|
|
3065
|
+
* #getter
|
|
3066
|
+
* Right edge (px, viewport-relative) of the on-screen content, clamped
|
|
3067
|
+
* to the track — where a right-pinned overlay such as a wiggle's colour
|
|
3068
|
+
* or score legend belongs, rather than out in the empty gutter the
|
|
3069
|
+
* regions can leave at whole-genome zoom. `@jbrowse/display-kit`'s
|
|
3070
|
+
* `contentRightEdgePx` states the rule; an SVG export applies the same
|
|
3071
|
+
* one against the export's canvas width instead of this track's.
|
|
3072
|
+
*
|
|
3073
|
+
* Published as a SCALAR on purpose. `visibleRegions` rebuilds a fresh
|
|
3074
|
+
* array of fresh objects on every pan and zoom frame, so a component
|
|
3075
|
+
* that derived this number itself re-rendered on every frame of every
|
|
3076
|
+
* gesture — to produce, whenever content fills the track, the unchanged
|
|
3077
|
+
* `trackWidthPx`. Reading the scalar lets MobX's `===` stop the chain at
|
|
3078
|
+
* this computed instead. Measured over 20 zoom frames: the wiggle
|
|
3079
|
+
* family's three body instances fell from 66 renders to 7.
|
|
3080
|
+
*/
|
|
3081
|
+
readonly contentRightEdgePx: number;
|
|
3082
|
+
/**
|
|
3083
|
+
* #getter
|
|
3084
|
+
* visibleRegions expanded by a half-screen buffer on each side,
|
|
3085
|
+
* clamped to displayedRegion bounds, with integer-rounded coordinates.
|
|
3086
|
+
* Use this when fetching data that should extend slightly beyond the
|
|
3087
|
+
* viewport for smooth scrolling.
|
|
3088
|
+
*/
|
|
3089
|
+
readonly bufferedVisibleRegions: {
|
|
3090
|
+
region: {
|
|
3091
|
+
refName: string;
|
|
3092
|
+
start: number;
|
|
3093
|
+
end: number;
|
|
3094
|
+
assemblyName: string;
|
|
3095
|
+
reversed: boolean | undefined;
|
|
3096
|
+
};
|
|
3097
|
+
displayedRegionIndex: number;
|
|
3098
|
+
}[];
|
|
3099
|
+
/**
|
|
3100
|
+
* #getter
|
|
3101
|
+
* a single "combo-locstring" representing all the regions visible on
|
|
3102
|
+
* the screen
|
|
3103
|
+
*/
|
|
3104
|
+
readonly visibleLocStrings: string;
|
|
3105
|
+
/**
|
|
3106
|
+
* #getter
|
|
3107
|
+
* **The blocks a debounced consumer clips to**: the coarse blocks once
|
|
3108
|
+
* the view has settled at least once, the live ones before that.
|
|
3109
|
+
*
|
|
3110
|
+
* The coarse blocks stop a per-bp scan from recomputing on every
|
|
3111
|
+
* animation frame during a pan or zoom. Wiggle's autoscale domain, the
|
|
3112
|
+
* alignments coverage scale and MAF's coverage band use them. While the
|
|
3113
|
+
* coarse blocks are stale the result is a frame or two old, as the
|
|
3114
|
+
* debounce intends. **Empty coarse blocks are a different case.** A scan
|
|
3115
|
+
* over no blocks yields no entries, and the consumer falls back to the
|
|
3116
|
+
* domain `[0,1]`, which draws a line plot blank and a density plot
|
|
3117
|
+
* saturated. The coarse blocks are empty for the 500ms between a view
|
|
3118
|
+
* initializing and the coarse autorun's first run, and data can load
|
|
3119
|
+
* within that window.
|
|
3120
|
+
*
|
|
3121
|
+
* Falling back to the live blocks costs one extra recompute at that
|
|
3122
|
+
* transition, compared with N per frame without the debounce.
|
|
3123
|
+
*/
|
|
3124
|
+
readonly settledDynamicBlocks: ContentBlock[];
|
|
3125
|
+
/**
|
|
3126
|
+
* #getter
|
|
3127
|
+
* same as visibleLocStrings, but only updated every 500ms
|
|
3128
|
+
*/
|
|
3129
|
+
readonly coarseVisibleLocStrings: string;
|
|
3130
|
+
/**
|
|
3131
|
+
* #getter
|
|
3132
|
+
*/
|
|
3133
|
+
readonly coarseTotalBpDisplayStr: string;
|
|
3134
|
+
/**
|
|
3135
|
+
* #getter
|
|
3136
|
+
*/
|
|
3137
|
+
readonly effectiveTotalBp: number;
|
|
3138
|
+
/**
|
|
3139
|
+
* #getter
|
|
3140
|
+
*/
|
|
3141
|
+
readonly effectiveTotalBpDisplayStr: string;
|
|
3142
|
+
} & {
|
|
3143
|
+
/**
|
|
3144
|
+
* #action
|
|
3145
|
+
*/
|
|
3146
|
+
setCoarseDynamicBlocks(blocks: BlockSet, bpPerPx: number): void;
|
|
3147
|
+
} & {
|
|
3148
|
+
/**
|
|
3149
|
+
* #action
|
|
3150
|
+
* Bring the coarse blocks to the viewport as it stands now, for a
|
|
3151
|
+
* placement that JUMPED rather than travelled.
|
|
3152
|
+
*
|
|
3153
|
+
* The coarse blocks are a 500ms throttle, and every consumer trades
|
|
3154
|
+
* freshness for not recomputing per animation frame — the location box,
|
|
3155
|
+
* canvas's on-screen feature set, and the two per-bp scans behind
|
|
3156
|
+
* `settledDynamicBlocks`. That trade is only sound while the answer is a
|
|
3157
|
+
* few frames old. **A jump makes it unrelated instead**, because there is
|
|
3158
|
+
* nothing to coalesce: the viewport left behind is not an approximation of
|
|
3159
|
+
* the new one, it is a different place. Unsettled, the location box reads
|
|
3160
|
+
* as a navigation that didn't happen, and wiggle's autoscale domain is
|
|
3161
|
+
* computed over the window the user just left — measured at `[0,200]`
|
|
3162
|
+
* against a correct `[0,300]` when a 40bp coarse window survived a jump to
|
|
3163
|
+
* 4040bp on screen. Only the per-region fetch moving to the leading edge
|
|
3164
|
+
* made that reachable: at 600ms the data never landed inside the hole.
|
|
3165
|
+
*
|
|
3166
|
+
* **The continuous paths deliberately do not come through here.** The
|
|
3167
|
+
* spring zoom writes through `zoomTo` per frame and a drag through
|
|
3168
|
+
* `scrollTo`, so this adds no per-frame work; the settle is idempotent
|
|
3169
|
+
* (`setCoarseDynamicBlocks` compares block keys), so the debounced
|
|
3170
|
+
* autorun's own follow-up run costs nothing.
|
|
3171
|
+
*
|
|
3172
|
+
* Every placer calls it, and `placersSettleCoarseBlocks.test.ts` is what
|
|
3173
|
+
* makes that true of the next one — it scans this file for the writes and
|
|
3174
|
+
* fails on a placer that reaches neither the settle nor its named list of
|
|
3175
|
+
* continuous paths. Two passes by hand missed four.
|
|
3176
|
+
*/
|
|
3177
|
+
settleCoarseBlocks(): void;
|
|
3178
|
+
} & {
|
|
3179
|
+
/**
|
|
3180
|
+
* #action
|
|
3181
|
+
* offset is the base-pair-offset in the displayed region, index is the
|
|
3182
|
+
* index of the displayed region in the linear genome view
|
|
3183
|
+
*
|
|
3184
|
+
* @param start - object as `{start, end, offset, index}`
|
|
3185
|
+
* @param end - object as `{start, end, offset, index}`
|
|
3186
|
+
*/
|
|
3187
|
+
moveTo(start?: BpOffset, end?: BpOffset): void;
|
|
3188
|
+
/**
|
|
3189
|
+
* #action
|
|
3190
|
+
* Place the viewport by the pair of PIXEL quantities it used to be stored
|
|
3191
|
+
* as. Prefer `setWindow`: pixels mean nothing without the width they were
|
|
3192
|
+
* measured at, so a round trip through here is only exact while the width
|
|
3193
|
+
* holds still. Kept for callers that genuinely have pixels — a wheel
|
|
3194
|
+
* gesture, a rubberband.
|
|
3195
|
+
*/
|
|
3196
|
+
setNewView(bpPerPx: number, offsetPx: number): void;
|
|
3197
|
+
/**
|
|
3198
|
+
* #action
|
|
3199
|
+
* Place the viewport by the pair it is actually STORED as: the window's
|
|
3200
|
+
* width and left edge, both in bp. `setNewView`'s bp-space twin, and the
|
|
3201
|
+
* right one for anything that captures a viewport and puts it back later
|
|
3202
|
+
* (an Undo, a saved location) — those two moments can be a window resize
|
|
3203
|
+
* apart, and this pair survives one where a pixel pair does not.
|
|
3204
|
+
*
|
|
3205
|
+
* Still clamped, by the same zoom and scroll limits as every other mover:
|
|
3206
|
+
* the regions may have changed under it, and a window the new set can't
|
|
3207
|
+
* hold is not restorable however it was spelled.
|
|
3208
|
+
*/
|
|
3209
|
+
setWindow(windowWidthBp: number, windowStartBp: number): void;
|
|
3210
|
+
/**
|
|
3211
|
+
* #action
|
|
3212
|
+
* `setWindow` without the settle, for a writer that runs per animation
|
|
3213
|
+
* frame. Flushing the coarse blocks sixty times a second is the one thing
|
|
3214
|
+
* such a writer must not do: they are a 500ms throttle that a synteny
|
|
3215
|
+
* follow pass and two autoscale domains hang off, and settling each frame
|
|
3216
|
+
* turns each of those into per-frame work — `positionViewOnSpans` states
|
|
3217
|
+
* the same rule for the same reason.
|
|
3218
|
+
*/
|
|
3219
|
+
setWindowFrame(windowWidthBp: number, windowStartBp: number): void;
|
|
3220
|
+
/**
|
|
3221
|
+
* #action
|
|
3222
|
+
* The worst jump of them to leave unsettled: the coarse blocks are keyed
|
|
3223
|
+
* by `displayedRegionIndex`, so a set that outlives the region list has a
|
|
3224
|
+
* consumer reading one contig's data against another's blocks.
|
|
3225
|
+
*/
|
|
3226
|
+
setDisplayedRegions(regions: Region[]): void;
|
|
3227
|
+
/**
|
|
3228
|
+
* #action
|
|
3229
|
+
* Re-assert `maxBpPerPx` over the current zoom, for a container whose
|
|
3230
|
+
* shared ceiling just fell — otherwise the view is stranded above it with
|
|
3231
|
+
* zoom-out disabled and the slider's min past its value. Goes through
|
|
3232
|
+
* `zoomTo` so the clamp keeps one definition, and settles because a
|
|
3233
|
+
* ceiling drop moves the window in one step.
|
|
3234
|
+
*
|
|
3235
|
+
* Requires an `initialized` view; the caller checks, since an MST action
|
|
3236
|
+
* reads untracked and a guard here would never re-run once the row
|
|
3237
|
+
* arrived.
|
|
3238
|
+
*/
|
|
3239
|
+
clampZoomToCeiling(): void;
|
|
3240
|
+
/**
|
|
3241
|
+
* #action
|
|
3242
|
+
*/
|
|
3243
|
+
showAllRegions(): void;
|
|
3244
|
+
/**
|
|
3245
|
+
* #action
|
|
3246
|
+
* Fit the displayed regions to the width exactly, edge to edge.
|
|
3247
|
+
*
|
|
3248
|
+
* Not the same as `showAllRegions`, which goes to `maxBpPerPx` — the
|
|
3249
|
+
* zoom-out LIMIT, where `SHOW_ALL_REGIONS_FILL` deliberately keeps a 10%
|
|
3250
|
+
* margin so the whole genome doesn't sit flush against both edges. That
|
|
3251
|
+
* margin is right for "show me everything" and wrong for a caller that
|
|
3252
|
+
* named the regions it wants: it draws them at 1/0.9 of fit-to-width,
|
|
3253
|
+
* centered, which is a silent 11% scale difference from the
|
|
3254
|
+
* single-region path (`moveTo`, span/width) reached through the same
|
|
3255
|
+
* location box.
|
|
3256
|
+
*
|
|
3257
|
+
* The scale comes from `fitAllRegionsWindow`, which is where the rule is
|
|
3258
|
+
* written — a snapshot builder that cannot call an action needs the same
|
|
3259
|
+
* answer, and the two agreeing matters more than either being local. Where
|
|
3260
|
+
* it clamps up to `minBpPerPx` the content is narrower than the view, and
|
|
3261
|
+
* the centering is what frames it.
|
|
3262
|
+
*/
|
|
3263
|
+
fitAllRegions(): void;
|
|
3264
|
+
/**
|
|
3265
|
+
* #action
|
|
3266
|
+
*/
|
|
3267
|
+
horizontallyFlip(): void;
|
|
3268
|
+
} & {
|
|
3269
|
+
/**
|
|
3270
|
+
* #action
|
|
3271
|
+
*/
|
|
3272
|
+
showAllRegionsInAssembly(assemblyName?: string): void;
|
|
3273
|
+
/**
|
|
3274
|
+
* #action
|
|
3275
|
+
* this "clears the view" and makes the view return to the import form
|
|
3276
|
+
*/
|
|
3277
|
+
clearView(): void;
|
|
3278
|
+
/**
|
|
3279
|
+
* #action
|
|
3280
|
+
* Navigate to a location based on its refName and optionally start, end,
|
|
3281
|
+
* and assemblyName. Will not try to change displayed regions, use
|
|
3282
|
+
* `navToLocations` instead. Only navigates to a location if it is
|
|
3283
|
+
* entirely within a displayedRegion. Navigates to the first matching
|
|
3284
|
+
* location encountered.
|
|
3285
|
+
*
|
|
3286
|
+
* Throws an error if navigation was unsuccessful
|
|
3287
|
+
*
|
|
3288
|
+
* @param query - a proposed location to navigate to
|
|
3289
|
+
* @param grow - optional multiplier to expand the region by (e.g., 0.2
|
|
3290
|
+
* adds 20% padding on each side)
|
|
3291
|
+
*/
|
|
3292
|
+
navTo(query: NavLocation, grow?: number): void;
|
|
3293
|
+
/**
|
|
3294
|
+
* #action
|
|
3295
|
+
* Navigate to a location based on its refName and optionally start, end,
|
|
3296
|
+
* and assemblyName. Will not try to change displayed regions, use
|
|
3297
|
+
* navToLocations instead. Only navigates to a location if it is entirely
|
|
3298
|
+
* within a displayedRegion. Navigates to the first matching location
|
|
3299
|
+
* encountered.
|
|
3300
|
+
*
|
|
3301
|
+
* Throws an error if navigation was unsuccessful
|
|
3302
|
+
*
|
|
3303
|
+
* @param locations - proposed location to navigate to
|
|
3304
|
+
* @param grow - optional multiplier to expand the region by (e.g., 0.2
|
|
3305
|
+
* adds 20% padding on each side)
|
|
3306
|
+
*/
|
|
3307
|
+
navToMultiple(locations: NavLocation[], grow?: number): void;
|
|
3308
|
+
} & {
|
|
3309
|
+
/**
|
|
3310
|
+
* #action
|
|
3311
|
+
* Replace the region list and place the viewport in one step. The pair is
|
|
3312
|
+
* the unit a coarse-block consumer can act on: called separately they
|
|
3313
|
+
* publish the viewport in between, and post-await in `navToLocations`
|
|
3314
|
+
* they are two transactions, so a per-bp scan runs over a window that was
|
|
3315
|
+
* never on screen.
|
|
3316
|
+
*
|
|
3317
|
+
* With no location named it fits the regions rather than going through
|
|
3318
|
+
* `showAllRegions`: the caller named the regions it wants, so it gets the
|
|
3319
|
+
* width, where showAllRegions goes to the zoom-out LIMIT and its 10%
|
|
3320
|
+
* margin is dead frame for a named subset.
|
|
3321
|
+
*/
|
|
3322
|
+
showRegions(regions: Region[], location?: NavLocation): void;
|
|
3323
|
+
} & {
|
|
3324
|
+
/**
|
|
3325
|
+
* #action
|
|
3326
|
+
* Navigate to the given locstring, will change displayed regions if
|
|
3327
|
+
* needed, and wait for assemblies to be initialized
|
|
3328
|
+
*
|
|
3329
|
+
* @param input - e.g. "chr1:1-100", "chr1:1-100 chr2:1-100", "chr 1 100"
|
|
3330
|
+
* @param optAssemblyName - (optional) the assembly name to use when
|
|
3331
|
+
* navigating to the locstring
|
|
3332
|
+
* @param grow - optional multiplier to expand the region by (e.g., 0.2
|
|
3333
|
+
* adds 20% padding on each side)
|
|
3334
|
+
* @param opts - `showHitTrack: false` keeps a text-search hit from also
|
|
3335
|
+
* showing the track its index was built from
|
|
3336
|
+
* @returns whether the view moved. A multi-hit search raises the picker
|
|
3337
|
+
* instead of navigating, and both resolve — see `handleSelectedRegion`.
|
|
3338
|
+
*/
|
|
3339
|
+
navToLocString(input: string, optAssemblyName?: string, grow?: number, opts?: {
|
|
3340
|
+
showHitTrack?: boolean;
|
|
3341
|
+
}): Promise<boolean>;
|
|
3342
|
+
/**
|
|
3343
|
+
* #action
|
|
3344
|
+
* Similar to `navToLocString`, but accepts a list of parsed location
|
|
3345
|
+
* objects instead of a locstring. Will try to perform
|
|
3346
|
+
* `setDisplayedRegions` if changing regions
|
|
3347
|
+
*
|
|
3348
|
+
* @param regions - array of parsed location objects
|
|
3349
|
+
* @param assemblyName - optional assembly name
|
|
3350
|
+
* @param grow - optional multiplier to expand the region by (e.g., 0.2
|
|
3351
|
+
* adds 20% padding on each side)
|
|
3352
|
+
*/
|
|
3353
|
+
navToLocations(regions: ParsedLocString[], assemblyName?: string, grow?: number): Promise<void>;
|
|
3354
|
+
} & {
|
|
3355
|
+
/**
|
|
3356
|
+
* #action
|
|
3357
|
+
* Similar to `navToLocString`, but accepts a parsed location object
|
|
3358
|
+
* instead of a locstring. Will try to perform `setDisplayedRegions` if
|
|
3359
|
+
* changing regions
|
|
3360
|
+
*
|
|
3361
|
+
* @param parsedLocString - a parsed location object with refName, start,
|
|
3362
|
+
* end, etc.
|
|
3363
|
+
* @param assemblyName - optional assembly name
|
|
3364
|
+
* @param grow - optional multiplier to expand the region by (e.g., 0.2
|
|
3365
|
+
* adds 20% padding on each side)
|
|
3366
|
+
*/
|
|
3367
|
+
navToLocation(parsedLocString: ParsedLocString, assemblyName?: string, grow?: number): Promise<void>;
|
|
3368
|
+
/**
|
|
3369
|
+
* #action
|
|
3370
|
+
* adds the region in view to the session's highlights
|
|
3371
|
+
*/
|
|
3372
|
+
highlightCurrentRegion(): void;
|
|
3373
|
+
/**
|
|
3374
|
+
* #action
|
|
3375
|
+
* navigates to the most recently added highlight on this view's
|
|
3376
|
+
* assemblies, zoomed out a little for context
|
|
3377
|
+
*/
|
|
3378
|
+
navigateNewestHighlight(): Promise<void>;
|
|
3379
|
+
} & {
|
|
3380
|
+
/**
|
|
3381
|
+
* #method
|
|
3382
|
+
*/
|
|
3383
|
+
rubberBandMenuItems(): MenuItem[];
|
|
3384
|
+
/**
|
|
3385
|
+
* #method
|
|
3386
|
+
*/
|
|
3387
|
+
bpToPx({ refName, coord, displayedRegionIndex, }: {
|
|
3388
|
+
refName: string;
|
|
3389
|
+
coord: number;
|
|
3390
|
+
displayedRegionIndex?: number;
|
|
3391
|
+
}): {
|
|
3392
|
+
index: number;
|
|
3393
|
+
offsetPx: number;
|
|
3394
|
+
} | undefined;
|
|
3395
|
+
/**
|
|
3396
|
+
* #method
|
|
3397
|
+
* Map a highlight region to its pixel position+width inside
|
|
3398
|
+
* the tracks container. Falls back to the raw refName if the region's
|
|
3399
|
+
* assemblyName is missing or unknown so highlights authored without an
|
|
3400
|
+
* assembly still render in single-assembly views.
|
|
3401
|
+
*/
|
|
3402
|
+
getHighlightCoords(region: HighlightRegion): {
|
|
3403
|
+
width: number;
|
|
3404
|
+
left: number;
|
|
3405
|
+
} | undefined;
|
|
3406
|
+
/**
|
|
3407
|
+
* #method
|
|
3408
|
+
* like getHighlightCoords but laid out against the overview scalebar and
|
|
3409
|
+
* shifted by the cytoband offset
|
|
3410
|
+
*/
|
|
3411
|
+
getOverviewHighlightCoords(region: HighlightRegion): {
|
|
3412
|
+
width: number;
|
|
3413
|
+
left: number;
|
|
3414
|
+
} | undefined;
|
|
3415
|
+
/**
|
|
3416
|
+
* #method
|
|
3417
|
+
* scrolls the view to center on the given bp. if that is not in any of
|
|
3418
|
+
* the displayed regions, does nothing
|
|
3419
|
+
*
|
|
3420
|
+
* @param coord - basepair at which you want to center the view
|
|
3421
|
+
* @param refName - refName of the displayedRegion you are centering at
|
|
3422
|
+
* @param displayedRegionIndex - index of the displayedRegion
|
|
3423
|
+
*/
|
|
3424
|
+
centerAt(coord: number, refName: string, displayedRegionIndex?: number): void;
|
|
3425
|
+
/**
|
|
3426
|
+
* #method
|
|
3427
|
+
*/
|
|
3428
|
+
pxToBp(px: number): import("@jbrowse/core/util/Base1DUtils").PxToBpResult;
|
|
3429
|
+
/**
|
|
3430
|
+
* #getter
|
|
3431
|
+
*/
|
|
3432
|
+
readonly centerLineInfo: import("@jbrowse/core/util/Base1DUtils").PxToBpResult | undefined;
|
|
3433
|
+
} & {
|
|
3434
|
+
/**
|
|
3435
|
+
* #action
|
|
3436
|
+
* a region edit from the ruler's menu as one action, which a synteny
|
|
3437
|
+
* stack's follow reads as the reader's gesture on this row; see
|
|
3438
|
+
* `setDisplayedRegionsKeepingCenter`
|
|
3439
|
+
*/
|
|
3440
|
+
editDisplayedRegions(edit: RegionEdit): void;
|
|
3441
|
+
} & {
|
|
3442
|
+
/**
|
|
3443
|
+
* #method
|
|
3444
|
+
*/
|
|
3445
|
+
rubberbandClickMenuItems(clickOffset: BpOffset): MenuItem[];
|
|
3446
|
+
/**
|
|
3447
|
+
* #method
|
|
3448
|
+
* returns menu items for a highlight context menu. plugins can extend
|
|
3449
|
+
* this via Core-extendPluggableElement to add their own items
|
|
3450
|
+
*/
|
|
3451
|
+
highlightMenuItems(_highlight: HighlightType): MenuItem[];
|
|
3452
|
+
} & {
|
|
3453
|
+
flyTo: (centerBp: number, windowWidthBp: number) => void;
|
|
3454
|
+
/**
|
|
3455
|
+
* #action
|
|
3456
|
+
* `centerAt`'s animated twin: the same destination, reached along the
|
|
3457
|
+
* arc instead of jumped to, at the zoom the view is already on.
|
|
3458
|
+
*/
|
|
3459
|
+
flyToCenter(coord: number, refName: string, displayedRegionIndex?: number): void;
|
|
3460
|
+
/**
|
|
3461
|
+
* #action
|
|
3462
|
+
* A flight to a linear bp centre at the zoom the view is on, or is
|
|
3463
|
+
* already flying to, widened where that is narrower than `fitWidthBp`.
|
|
3464
|
+
* The current width mid-flight is a point on the arc, so a second
|
|
3465
|
+
* flight read from it would land pulled back.
|
|
3466
|
+
*/
|
|
3467
|
+
flyToFit(centerBp: number, fitWidthBp: number): void;
|
|
1656
3468
|
} & {
|
|
1657
3469
|
afterCreate(): void;
|
|
1658
3470
|
afterAttach(): void;
|
|
1659
|
-
}, import("@jbrowse/mobx-state-tree")._NotCustomized, {
|
|
3471
|
+
}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>, InitState, "bpPerPx" | "offsetPx" | "showCytobandsSetting">, {
|
|
1660
3472
|
displayName: string | undefined;
|
|
1661
3473
|
minimized: boolean;
|
|
1662
|
-
highlight: HighlightType[];
|
|
1663
|
-
showHighlightChips: boolean;
|
|
1664
3474
|
id: string;
|
|
1665
3475
|
type: string;
|
|
1666
3476
|
windowStartBp: number;
|
|
@@ -1671,11 +3481,10 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
1671
3481
|
hideHeader: boolean;
|
|
1672
3482
|
hideHeaderOverview: boolean;
|
|
1673
3483
|
hideNoTracksActive: boolean;
|
|
1674
|
-
trackSelectorType:
|
|
3484
|
+
trackSelectorType: "hierarchical";
|
|
1675
3485
|
showGridlines: boolean;
|
|
1676
|
-
labelsVisible: boolean;
|
|
1677
3486
|
scalebarOnly: boolean;
|
|
1678
|
-
|
|
3487
|
+
launch: LaunchInput<InitState> | undefined;
|
|
1679
3488
|
showCytobands?: false | undefined;
|
|
1680
3489
|
trackLabels?: string | undefined;
|
|
1681
3490
|
colorByCDS?: true | undefined;
|