@jbrowse/plugin-linear-genome-view 1.7.0 → 1.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BaseLinearDisplay/components/BaseLinearDisplay.d.ts +13 -13
- package/dist/BaseLinearDisplay/components/BaseLinearDisplay.js +18 -18
- package/dist/BaseLinearDisplay/components/Block.d.ts +15 -15
- package/dist/BaseLinearDisplay/components/Block.js +4 -4
- package/dist/BaseLinearDisplay/components/LinearBlocks.d.ts +12 -12
- package/dist/BaseLinearDisplay/components/LinearBlocks.js +11 -11
- package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.d.ts +4 -4
- package/dist/BaseLinearDisplay/components/ServerSideRenderedBlockContent.js +16 -16
- package/dist/BaseLinearDisplay/index.d.ts +5 -5
- package/dist/BaseLinearDisplay/index.js +2 -2
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.d.ts +227 -230
- package/dist/BaseLinearDisplay/models/BaseLinearDisplayModel.js +32 -32
- package/dist/BaseLinearDisplay/models/baseLinearDisplayConfigSchema.d.ts +1 -1
- package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.d.ts +96 -96
- package/dist/BaseLinearDisplay/models/serverSideRenderedBlock.js +9 -9
- package/dist/LinearBareDisplay/configSchema.d.ts +2 -2
- package/dist/LinearBareDisplay/index.d.ts +2 -2
- package/dist/LinearBareDisplay/model.d.ts +192 -192
- package/dist/LinearBareDisplay/model.js +1 -1
- package/dist/LinearBasicDisplay/components/SetMaxHeight.d.ts +10 -10
- package/dist/LinearBasicDisplay/components/SetMaxHeight.js +11 -11
- package/dist/LinearBasicDisplay/configSchema.d.ts +2 -2
- package/dist/LinearBasicDisplay/configSchema.js +1 -1
- package/dist/LinearBasicDisplay/index.d.ts +2 -2
- package/dist/LinearBasicDisplay/index.js +2 -2
- package/dist/LinearBasicDisplay/model.d.ts +213 -213
- package/dist/LinearBasicDisplay/model.js +10 -10
- package/dist/LinearGenomeView/components/CenterLine.d.ts +14 -14
- package/dist/LinearGenomeView/components/CenterLine.js +5 -5
- package/dist/LinearGenomeView/components/ExportSvgDialog.d.ts +6 -6
- package/dist/LinearGenomeView/components/ExportSvgDialog.js +16 -16
- package/dist/LinearGenomeView/components/Header.d.ts +7 -7
- package/dist/LinearGenomeView/components/Header.js +20 -20
- package/dist/LinearGenomeView/components/HelpDialog.d.ts +5 -5
- package/dist/LinearGenomeView/components/HelpDialog.js +4 -4
- package/dist/LinearGenomeView/components/ImportForm.d.ts +7 -7
- package/dist/LinearGenomeView/components/ImportForm.js +28 -28
- package/dist/LinearGenomeView/components/LinearGenomeView.d.ts +7 -7
- package/dist/LinearGenomeView/components/LinearGenomeView.js +15 -15
- package/dist/LinearGenomeView/components/LinearGenomeView.test.js +9 -9
- package/dist/LinearGenomeView/components/LinearGenomeViewSvg.d.ts +4 -4
- package/dist/LinearGenomeView/components/LinearGenomeViewSvg.js +40 -40
- package/dist/LinearGenomeView/components/MiniControls.d.ts +6 -6
- package/dist/LinearGenomeView/components/MiniControls.js +9 -9
- package/dist/LinearGenomeView/components/OverviewRubberBand.d.ts +22 -22
- package/dist/LinearGenomeView/components/OverviewRubberBand.js +19 -19
- package/dist/LinearGenomeView/components/OverviewScaleBar.d.ts +132 -124
- package/dist/LinearGenomeView/components/OverviewScaleBar.js +28 -28
- package/dist/LinearGenomeView/components/RefNameAutocomplete.d.ts +21 -21
- package/dist/LinearGenomeView/components/RefNameAutocomplete.js +27 -27
- package/dist/LinearGenomeView/components/RubberBand.d.ts +9 -20
- package/dist/LinearGenomeView/components/RubberBand.js +18 -18
- package/dist/LinearGenomeView/components/Ruler.d.ts +27 -27
- package/dist/LinearGenomeView/components/Ruler.js +11 -11
- package/dist/LinearGenomeView/components/ScaleBar.d.ts +401 -401
- package/dist/LinearGenomeView/components/ScaleBar.js +19 -19
- package/dist/LinearGenomeView/components/ScaleBar.test.js +3 -3
- package/dist/LinearGenomeView/components/SearchBox.d.ts +8 -8
- package/dist/LinearGenomeView/components/SearchBox.js +9 -9
- package/dist/LinearGenomeView/components/SearchResultsDialog.d.ts +8 -8
- package/dist/LinearGenomeView/components/SearchResultsDialog.js +15 -15
- package/dist/LinearGenomeView/components/SequenceDialog.d.ts +8 -8
- package/dist/LinearGenomeView/components/SequenceDialog.js +21 -21
- package/dist/LinearGenomeView/components/TrackContainer.d.ts +9 -9
- package/dist/LinearGenomeView/components/TrackContainer.js +14 -14
- package/dist/LinearGenomeView/components/TrackLabel.d.ts +44 -44
- package/dist/LinearGenomeView/components/TrackLabel.js +14 -14
- package/dist/LinearGenomeView/components/TracksContainer.d.ts +10 -10
- package/dist/LinearGenomeView/components/TracksContainer.js +10 -10
- package/dist/LinearGenomeView/components/VerticalGuides.d.ts +9 -9
- package/dist/LinearGenomeView/components/VerticalGuides.js +11 -11
- package/dist/LinearGenomeView/components/ZoomControls.d.ts +7 -7
- package/dist/LinearGenomeView/components/ZoomControls.js +9 -9
- package/dist/LinearGenomeView/components/util.d.ts +2 -2
- package/dist/LinearGenomeView/index.d.ts +292 -292
- package/dist/LinearGenomeView/index.js +35 -35
- package/dist/LinearGenomeView/index.test.js +19 -19
- package/dist/LinearGenomeView/util.d.ts +14 -14
- package/dist/index.d.ts +565 -565
- package/dist/index.js +18 -18
- package/package.json +5 -5
- package/dist/LinearBareDisplay/index.test.d.ts +0 -1
- package/dist/LinearGenomeView/components/LinearGenomeView.test.d.ts +0 -1
- package/dist/plugin-linear-genome-view.cjs.development.js +0 -8121
- package/dist/plugin-linear-genome-view.cjs.development.js.map +0 -1
- package/dist/plugin-linear-genome-view.cjs.production.min.js +0 -2
- package/dist/plugin-linear-genome-view.cjs.production.min.js.map +0 -1
- package/dist/plugin-linear-genome-view.esm.js +0 -8105
- package/dist/plugin-linear-genome-view.esm.js.map +0 -1
|
@@ -1,292 +1,292 @@
|
|
|
1
|
-
import { Region } from '@jbrowse/core/util/types';
|
|
2
|
-
import { MenuItem } from '@jbrowse/core/ui';
|
|
3
|
-
import BaseResult from '@jbrowse/core/TextSearch/BaseResults';
|
|
4
|
-
import { BlockSet, BaseBlock } from '@jbrowse/core/util/blockTypes';
|
|
5
|
-
import { Instance } from 'mobx-state-tree';
|
|
6
|
-
import PluginManager from '@jbrowse/core/PluginManager';
|
|
7
|
-
import { renderToSvg } from './components/LinearGenomeViewSvg';
|
|
8
|
-
import RefNameAutocomplete from './components/RefNameAutocomplete';
|
|
9
|
-
import SearchBox from './components/SearchBox';
|
|
10
|
-
export interface BpOffset {
|
|
11
|
-
refName?: string;
|
|
12
|
-
index: number;
|
|
13
|
-
offset: number;
|
|
14
|
-
start?: number;
|
|
15
|
-
end?: number;
|
|
16
|
-
coord?: number;
|
|
17
|
-
reversed?: boolean;
|
|
18
|
-
assemblyName?: string;
|
|
19
|
-
oob?: boolean;
|
|
20
|
-
}
|
|
21
|
-
export interface ExportSvgOptions {
|
|
22
|
-
rasterizeLayers?: boolean;
|
|
23
|
-
}
|
|
24
|
-
export interface NavLocation {
|
|
25
|
-
refName: string;
|
|
26
|
-
start?: number;
|
|
27
|
-
end?: number;
|
|
28
|
-
assemblyName?: string;
|
|
29
|
-
}
|
|
30
|
-
export declare const HEADER_BAR_HEIGHT = 48;
|
|
31
|
-
export declare const HEADER_OVERVIEW_HEIGHT = 20;
|
|
32
|
-
export declare const SCALE_BAR_HEIGHT = 17;
|
|
33
|
-
export declare const RESIZE_HANDLE_HEIGHT = 3;
|
|
34
|
-
export declare const INTER_REGION_PADDING_WIDTH = 2;
|
|
35
|
-
export declare const
|
|
36
|
-
export declare const
|
|
37
|
-
export declare function stateModelFactory(pluginManager: PluginManager): import("mobx-state-tree").IModelType<{
|
|
38
|
-
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
39
|
-
displayName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
40
|
-
} & {
|
|
41
|
-
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
42
|
-
type: import("mobx-state-tree").ISimpleType<"LinearGenomeView">;
|
|
43
|
-
offsetPx: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
44
|
-
bpPerPx: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
45
|
-
displayedRegions: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
46
|
-
refName: import("mobx-state-tree").ISimpleType<string>;
|
|
47
|
-
start: import("mobx-state-tree").ISimpleType<number>;
|
|
48
|
-
end: import("mobx-state-tree").ISimpleType<number>;
|
|
49
|
-
reversed: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
50
|
-
} & {
|
|
51
|
-
assemblyName: import("mobx-state-tree").ISimpleType<string>;
|
|
52
|
-
}, {
|
|
53
|
-
setRefName(newRefName: string): void;
|
|
54
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
55
|
-
tracks: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyType>;
|
|
56
|
-
hideHeader: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
57
|
-
hideHeaderOverview: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
58
|
-
trackSelectorType: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<"hierarchical">, [undefined]>;
|
|
59
|
-
trackLabels: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
60
|
-
showCenterLine: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
61
|
-
showCytobandsSetting: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
62
|
-
}, {
|
|
63
|
-
width: number;
|
|
64
|
-
} & {
|
|
65
|
-
menuItems(): MenuItem[];
|
|
66
|
-
} & {
|
|
67
|
-
setDisplayName(name: string): void;
|
|
68
|
-
setWidth(newWidth: number): void;
|
|
69
|
-
} & {
|
|
70
|
-
volatileWidth: number | undefined;
|
|
71
|
-
minimumBlockWidth: number;
|
|
72
|
-
draggingTrackId: string | undefined;
|
|
73
|
-
volatileError: Error | undefined;
|
|
74
|
-
afterDisplayedRegionsSetCallbacks: Function[];
|
|
75
|
-
scaleFactor: number;
|
|
76
|
-
trackRefs: {
|
|
77
|
-
[key: string]: any;
|
|
78
|
-
};
|
|
79
|
-
coarseDynamicBlocks: BaseBlock[];
|
|
80
|
-
coarseTotalBp: number;
|
|
81
|
-
leftOffset: BpOffset | undefined;
|
|
82
|
-
rightOffset: BpOffset | undefined;
|
|
83
|
-
searchResults: BaseResult[] | undefined;
|
|
84
|
-
searchQuery: string | undefined;
|
|
85
|
-
seqDialogDisplayed: boolean;
|
|
86
|
-
} & {
|
|
87
|
-
readonly width: number;
|
|
88
|
-
readonly interRegionPaddingWidth: number;
|
|
89
|
-
} & {
|
|
90
|
-
readonly assemblyErrors: string;
|
|
91
|
-
readonly assembliesInitialized: boolean;
|
|
92
|
-
readonly initialized: boolean;
|
|
93
|
-
readonly hasDisplayedRegions: boolean;
|
|
94
|
-
readonly isSearchDialogDisplayed: boolean;
|
|
95
|
-
readonly scaleBarHeight: number;
|
|
96
|
-
readonly headerHeight: number;
|
|
97
|
-
readonly trackHeights: any;
|
|
98
|
-
readonly trackHeightsWithResizeHandles: any;
|
|
99
|
-
readonly height: any;
|
|
100
|
-
readonly totalBp: number;
|
|
101
|
-
readonly maxBpPerPx: number;
|
|
102
|
-
readonly minBpPerPx: number;
|
|
103
|
-
readonly error: string | Error;
|
|
104
|
-
readonly maxOffset: number;
|
|
105
|
-
readonly minOffset: number;
|
|
106
|
-
readonly displayedRegionsTotalPx: number;
|
|
107
|
-
renderProps(): any;
|
|
108
|
-
readonly assemblyNames: string[];
|
|
109
|
-
searchScope(assemblyName: string): {
|
|
110
|
-
assemblyName: string;
|
|
111
|
-
includeAggregateIndexes: boolean;
|
|
112
|
-
tracks: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").IAnyType> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyType>>;
|
|
113
|
-
};
|
|
114
|
-
/**
|
|
115
|
-
* @param refName - refName of the displayedRegion
|
|
116
|
-
* @param coord - coordinate at the displayed Region
|
|
117
|
-
* @param regionNumber - optional param used as identifier when
|
|
118
|
-
* there are multiple displayedRegions with the same refName
|
|
119
|
-
* @returns offsetPx of the displayed region that it lands in
|
|
120
|
-
*/
|
|
121
|
-
bpToPx({ refName, coord, regionNumber, }: {
|
|
122
|
-
refName: string;
|
|
123
|
-
coord: number;
|
|
124
|
-
regionNumber?: number | undefined;
|
|
125
|
-
}): {
|
|
126
|
-
index: number;
|
|
127
|
-
offsetPx: number;
|
|
128
|
-
} | undefined;
|
|
129
|
-
/**
|
|
130
|
-
*
|
|
131
|
-
* @param px - px in the view area, return value is the displayed regions
|
|
132
|
-
* @returns BpOffset of the displayed region that it lands in
|
|
133
|
-
*/
|
|
134
|
-
pxToBp(px: number): {
|
|
135
|
-
oob: boolean;
|
|
136
|
-
coord: number;
|
|
137
|
-
offset: number;
|
|
138
|
-
index: number;
|
|
139
|
-
refName: string;
|
|
140
|
-
start: number;
|
|
141
|
-
end: number;
|
|
142
|
-
reversed: boolean;
|
|
143
|
-
assemblyName: string;
|
|
144
|
-
};
|
|
145
|
-
getTrack(id: string): any;
|
|
146
|
-
rankSearchResults(results: BaseResult[]): BaseResult[];
|
|
147
|
-
rewriteOnClicks(trackType: string, viewMenuActions: MenuItem[]): void;
|
|
148
|
-
readonly trackTypeActions: Map<string, MenuItem[]>;
|
|
149
|
-
readonly centerLineInfo: {
|
|
150
|
-
oob: boolean;
|
|
151
|
-
coord: number;
|
|
152
|
-
offset: number;
|
|
153
|
-
index: number;
|
|
154
|
-
refName: string;
|
|
155
|
-
start: number;
|
|
156
|
-
end: number;
|
|
157
|
-
reversed: boolean;
|
|
158
|
-
assemblyName: string;
|
|
159
|
-
} | undefined;
|
|
160
|
-
} & {
|
|
161
|
-
setShowCytobands(flag: boolean): void;
|
|
162
|
-
setWidth(newWidth: number): void;
|
|
163
|
-
setError(error: Error | undefined): void;
|
|
164
|
-
toggleHeader(): void;
|
|
165
|
-
toggleHeaderOverview(): void;
|
|
166
|
-
scrollTo(offsetPx: number): number;
|
|
167
|
-
zoomTo(bpPerPx: number): number;
|
|
168
|
-
setOffsets(left: undefined | BpOffset, right: undefined | BpOffset): void;
|
|
169
|
-
setSearchResults(results: BaseResult[] | undefined, query: string | undefined): void;
|
|
170
|
-
setSequenceDialogOpen(open: boolean): void;
|
|
171
|
-
setNewView(bpPerPx: number, offsetPx: number): void;
|
|
172
|
-
horizontallyFlip(): void;
|
|
173
|
-
showTrack(trackId: string, initialSnapshot?: {}, displayInitialSnapshot?: {}): any;
|
|
174
|
-
hideTrack(trackId: string): number;
|
|
175
|
-
} & {
|
|
176
|
-
moveTrack(movingTrackId: string, targetTrackId: string): void;
|
|
177
|
-
closeView(): void;
|
|
178
|
-
toggleTrack(trackId: string): void;
|
|
179
|
-
setTrackLabels(setting: 'overlapping' | 'offset' | 'hidden'): void;
|
|
180
|
-
toggleCenterLine(): void;
|
|
181
|
-
setDisplayedRegions(regions: Region[]): void;
|
|
182
|
-
activateTrackSelector(): import("@jbrowse/core/util").Widget;
|
|
183
|
-
navToLocString(locString: string, optAssemblyName?: string | undefined): void;
|
|
184
|
-
/**
|
|
185
|
-
* Navigate to a location based on its refName and optionally start, end,
|
|
186
|
-
* and assemblyName. Can handle if there are multiple displayedRegions
|
|
187
|
-
* from same refName. Only navigates to a location if it is entirely
|
|
188
|
-
* within a displayedRegion. Navigates to the first matching location
|
|
189
|
-
* encountered.
|
|
190
|
-
*
|
|
191
|
-
* Throws an error if navigation was unsuccessful
|
|
192
|
-
*
|
|
193
|
-
* @param location - a proposed location to navigate to
|
|
194
|
-
*/
|
|
195
|
-
navTo(query: NavLocation): void;
|
|
196
|
-
navToMultiple(locations: NavLocation[]): void;
|
|
197
|
-
/**
|
|
198
|
-
* Navigate to a location based on user clicking and dragging on the
|
|
199
|
-
* overview scale bar to select a region to zoom into.
|
|
200
|
-
* Can handle if there are multiple displayedRegions from same refName.
|
|
201
|
-
* Only navigates to a location if it is entirely within a displayedRegion.
|
|
202
|
-
*
|
|
203
|
-
* @param leftPx- `object as {start, end, index, offset}`, offset = start of user drag
|
|
204
|
-
* @param rightPx- `object as {start, end, index, offset}`, offset = end of user drag
|
|
205
|
-
*/
|
|
206
|
-
zoomToDisplayedRegions(leftPx: BpOffset, rightPx: BpOffset): void;
|
|
207
|
-
/**
|
|
208
|
-
* Helper method for the fetchSequence.
|
|
209
|
-
* Retrieves the corresponding regions that were selected by the rubberband
|
|
210
|
-
*
|
|
211
|
-
* @param leftOffset - `object as {start, end, index, offset}`, offset = start of user drag
|
|
212
|
-
* @param rightOffset - `object as {start, end, index, offset}`, offset = end of user drag
|
|
213
|
-
* @returns array of Region[]
|
|
214
|
-
*/
|
|
215
|
-
getSelectedRegions(leftOffset: BpOffset | undefined, rightOffset: BpOffset | undefined): {
|
|
216
|
-
start: number;
|
|
217
|
-
end: number;
|
|
218
|
-
regionNumber?: number | undefined;
|
|
219
|
-
reversed?: boolean | undefined;
|
|
220
|
-
refName: string;
|
|
221
|
-
assemblyName: string;
|
|
222
|
-
key: string;
|
|
223
|
-
offsetPx: number;
|
|
224
|
-
widthPx: number;
|
|
225
|
-
variant?: string | undefined;
|
|
226
|
-
isLeftEndOfDisplayedRegion?: boolean | undefined;
|
|
227
|
-
}[];
|
|
228
|
-
afterDisplayedRegionsSet(cb: Function): void;
|
|
229
|
-
/**
|
|
230
|
-
* offset is the base-pair-offset in the displayed region, index is the index of the
|
|
231
|
-
* displayed region in the linear genome view
|
|
232
|
-
*
|
|
233
|
-
* @param start - object as `{start, end, offset, index}`
|
|
234
|
-
* @param end - object as `{start, end, offset, index}`
|
|
235
|
-
*/
|
|
236
|
-
moveTo(start: BpOffset, end: BpOffset): void;
|
|
237
|
-
horizontalScroll(distance: number): number;
|
|
238
|
-
/**
|
|
239
|
-
* scrolls the view to center on the given bp. if that is not in any
|
|
240
|
-
* of the displayed regions, does nothing
|
|
241
|
-
* @param bp - basepair at which you want to center the view
|
|
242
|
-
* @param refName - refName of the displayedRegion you are centering at
|
|
243
|
-
* @param regionIndex - index of the displayedRegion
|
|
244
|
-
*/
|
|
245
|
-
centerAt(bp: number, refName: string, regionIndex: number): void;
|
|
246
|
-
center(): void;
|
|
247
|
-
showAllRegions(): void;
|
|
248
|
-
showAllRegionsInAssembly(assemblyName?: string | undefined): void;
|
|
249
|
-
setDraggingTrackId(idx?: string | undefined): void;
|
|
250
|
-
setScaleFactor(factor: number): void;
|
|
251
|
-
} & {
|
|
252
|
-
slide: (viewWidths: number) => void;
|
|
253
|
-
} & {
|
|
254
|
-
zoom: (targetBpPerPx: number) => void;
|
|
255
|
-
} & {
|
|
256
|
-
readonly canShowCytobands: boolean;
|
|
257
|
-
readonly showCytobands: boolean;
|
|
258
|
-
readonly anyCytobandsExist: boolean;
|
|
259
|
-
readonly cytobandOffset: number;
|
|
260
|
-
} & {
|
|
261
|
-
menuItems(): MenuItem[];
|
|
262
|
-
} & {
|
|
263
|
-
readonly staticBlocks: BlockSet;
|
|
264
|
-
readonly dynamicBlocks: BlockSet;
|
|
265
|
-
readonly roundedDynamicBlocks: {
|
|
266
|
-
start: number;
|
|
267
|
-
end: number;
|
|
268
|
-
regionNumber?: number | undefined;
|
|
269
|
-
reversed?: boolean | undefined;
|
|
270
|
-
refName: string;
|
|
271
|
-
assemblyName: string;
|
|
272
|
-
key: string;
|
|
273
|
-
offsetPx: number;
|
|
274
|
-
widthPx: number;
|
|
275
|
-
variant?: string | undefined;
|
|
276
|
-
isLeftEndOfDisplayedRegion?: boolean | undefined;
|
|
277
|
-
}[];
|
|
278
|
-
readonly visibleLocStrings: string;
|
|
279
|
-
readonly coarseVisibleLocStrings: string;
|
|
280
|
-
} & {
|
|
281
|
-
clearView(): void;
|
|
282
|
-
setCoarseDynamicBlocks(blocks: BlockSet): void;
|
|
283
|
-
afterAttach(): void;
|
|
284
|
-
} & {
|
|
285
|
-
exportSvg(opts?: ExportSvgOptions): Promise<void>;
|
|
286
|
-
} & {
|
|
287
|
-
rubberBandMenuItems(): MenuItem[];
|
|
288
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
289
|
-
export { renderToSvg, RefNameAutocomplete, SearchBox };
|
|
290
|
-
export declare type LinearGenomeViewStateModel = ReturnType<typeof stateModelFactory>;
|
|
291
|
-
export declare type LinearGenomeViewModel = Instance<LinearGenomeViewStateModel>;
|
|
292
|
-
export { default as ReactComponent } from './components/LinearGenomeView';
|
|
1
|
+
import { Region } from '@jbrowse/core/util/types';
|
|
2
|
+
import { MenuItem } from '@jbrowse/core/ui';
|
|
3
|
+
import BaseResult from '@jbrowse/core/TextSearch/BaseResults';
|
|
4
|
+
import { BlockSet, BaseBlock } from '@jbrowse/core/util/blockTypes';
|
|
5
|
+
import { Instance } from 'mobx-state-tree';
|
|
6
|
+
import PluginManager from '@jbrowse/core/PluginManager';
|
|
7
|
+
import { renderToSvg } from './components/LinearGenomeViewSvg';
|
|
8
|
+
import RefNameAutocomplete from './components/RefNameAutocomplete';
|
|
9
|
+
import SearchBox from './components/SearchBox';
|
|
10
|
+
export interface BpOffset {
|
|
11
|
+
refName?: string;
|
|
12
|
+
index: number;
|
|
13
|
+
offset: number;
|
|
14
|
+
start?: number;
|
|
15
|
+
end?: number;
|
|
16
|
+
coord?: number;
|
|
17
|
+
reversed?: boolean;
|
|
18
|
+
assemblyName?: string;
|
|
19
|
+
oob?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface ExportSvgOptions {
|
|
22
|
+
rasterizeLayers?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface NavLocation {
|
|
25
|
+
refName: string;
|
|
26
|
+
start?: number;
|
|
27
|
+
end?: number;
|
|
28
|
+
assemblyName?: string;
|
|
29
|
+
}
|
|
30
|
+
export declare const HEADER_BAR_HEIGHT = 48;
|
|
31
|
+
export declare const HEADER_OVERVIEW_HEIGHT = 20;
|
|
32
|
+
export declare const SCALE_BAR_HEIGHT = 17;
|
|
33
|
+
export declare const RESIZE_HANDLE_HEIGHT = 3;
|
|
34
|
+
export declare const INTER_REGION_PADDING_WIDTH = 2;
|
|
35
|
+
export declare const SPACING = 7;
|
|
36
|
+
export declare const WIDGET_HEIGHT = 32;
|
|
37
|
+
export declare function stateModelFactory(pluginManager: PluginManager): import("mobx-state-tree").IModelType<{
|
|
38
|
+
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
39
|
+
displayName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
40
|
+
} & {
|
|
41
|
+
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
42
|
+
type: import("mobx-state-tree").ISimpleType<"LinearGenomeView">;
|
|
43
|
+
offsetPx: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
44
|
+
bpPerPx: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
45
|
+
displayedRegions: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
46
|
+
refName: import("mobx-state-tree").ISimpleType<string>;
|
|
47
|
+
start: import("mobx-state-tree").ISimpleType<number>;
|
|
48
|
+
end: import("mobx-state-tree").ISimpleType<number>;
|
|
49
|
+
reversed: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
50
|
+
} & {
|
|
51
|
+
assemblyName: import("mobx-state-tree").ISimpleType<string>;
|
|
52
|
+
}, {
|
|
53
|
+
setRefName(newRefName: string): void;
|
|
54
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
55
|
+
tracks: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyType>;
|
|
56
|
+
hideHeader: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
57
|
+
hideHeaderOverview: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
58
|
+
trackSelectorType: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<"hierarchical">, [undefined]>;
|
|
59
|
+
trackLabels: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
60
|
+
showCenterLine: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
61
|
+
showCytobandsSetting: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
62
|
+
}, {
|
|
63
|
+
width: number;
|
|
64
|
+
} & {
|
|
65
|
+
menuItems(): MenuItem[];
|
|
66
|
+
} & {
|
|
67
|
+
setDisplayName(name: string): void;
|
|
68
|
+
setWidth(newWidth: number): void;
|
|
69
|
+
} & {
|
|
70
|
+
volatileWidth: number | undefined;
|
|
71
|
+
minimumBlockWidth: number;
|
|
72
|
+
draggingTrackId: string | undefined;
|
|
73
|
+
volatileError: Error | undefined;
|
|
74
|
+
afterDisplayedRegionsSetCallbacks: Function[];
|
|
75
|
+
scaleFactor: number;
|
|
76
|
+
trackRefs: {
|
|
77
|
+
[key: string]: any;
|
|
78
|
+
};
|
|
79
|
+
coarseDynamicBlocks: BaseBlock[];
|
|
80
|
+
coarseTotalBp: number;
|
|
81
|
+
leftOffset: BpOffset | undefined;
|
|
82
|
+
rightOffset: BpOffset | undefined;
|
|
83
|
+
searchResults: BaseResult[] | undefined;
|
|
84
|
+
searchQuery: string | undefined;
|
|
85
|
+
seqDialogDisplayed: boolean;
|
|
86
|
+
} & {
|
|
87
|
+
readonly width: number;
|
|
88
|
+
readonly interRegionPaddingWidth: number;
|
|
89
|
+
} & {
|
|
90
|
+
readonly assemblyErrors: string;
|
|
91
|
+
readonly assembliesInitialized: boolean;
|
|
92
|
+
readonly initialized: boolean;
|
|
93
|
+
readonly hasDisplayedRegions: boolean;
|
|
94
|
+
readonly isSearchDialogDisplayed: boolean;
|
|
95
|
+
readonly scaleBarHeight: number;
|
|
96
|
+
readonly headerHeight: number;
|
|
97
|
+
readonly trackHeights: any;
|
|
98
|
+
readonly trackHeightsWithResizeHandles: any;
|
|
99
|
+
readonly height: any;
|
|
100
|
+
readonly totalBp: number;
|
|
101
|
+
readonly maxBpPerPx: number;
|
|
102
|
+
readonly minBpPerPx: number;
|
|
103
|
+
readonly error: string | Error;
|
|
104
|
+
readonly maxOffset: number;
|
|
105
|
+
readonly minOffset: number;
|
|
106
|
+
readonly displayedRegionsTotalPx: number;
|
|
107
|
+
renderProps(): any;
|
|
108
|
+
readonly assemblyNames: string[];
|
|
109
|
+
searchScope(assemblyName: string): {
|
|
110
|
+
assemblyName: string;
|
|
111
|
+
includeAggregateIndexes: boolean;
|
|
112
|
+
tracks: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").IAnyType> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyType>>;
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* @param refName - refName of the displayedRegion
|
|
116
|
+
* @param coord - coordinate at the displayed Region
|
|
117
|
+
* @param regionNumber - optional param used as identifier when
|
|
118
|
+
* there are multiple displayedRegions with the same refName
|
|
119
|
+
* @returns offsetPx of the displayed region that it lands in
|
|
120
|
+
*/
|
|
121
|
+
bpToPx({ refName, coord, regionNumber, }: {
|
|
122
|
+
refName: string;
|
|
123
|
+
coord: number;
|
|
124
|
+
regionNumber?: number | undefined;
|
|
125
|
+
}): {
|
|
126
|
+
index: number;
|
|
127
|
+
offsetPx: number;
|
|
128
|
+
} | undefined;
|
|
129
|
+
/**
|
|
130
|
+
*
|
|
131
|
+
* @param px - px in the view area, return value is the displayed regions
|
|
132
|
+
* @returns BpOffset of the displayed region that it lands in
|
|
133
|
+
*/
|
|
134
|
+
pxToBp(px: number): {
|
|
135
|
+
oob: boolean;
|
|
136
|
+
coord: number;
|
|
137
|
+
offset: number;
|
|
138
|
+
index: number;
|
|
139
|
+
refName: string;
|
|
140
|
+
start: number;
|
|
141
|
+
end: number;
|
|
142
|
+
reversed: boolean;
|
|
143
|
+
assemblyName: string;
|
|
144
|
+
};
|
|
145
|
+
getTrack(id: string): any;
|
|
146
|
+
rankSearchResults(results: BaseResult[]): BaseResult[];
|
|
147
|
+
rewriteOnClicks(trackType: string, viewMenuActions: MenuItem[]): void;
|
|
148
|
+
readonly trackTypeActions: Map<string, MenuItem[]>;
|
|
149
|
+
readonly centerLineInfo: {
|
|
150
|
+
oob: boolean;
|
|
151
|
+
coord: number;
|
|
152
|
+
offset: number;
|
|
153
|
+
index: number;
|
|
154
|
+
refName: string;
|
|
155
|
+
start: number;
|
|
156
|
+
end: number;
|
|
157
|
+
reversed: boolean;
|
|
158
|
+
assemblyName: string;
|
|
159
|
+
} | undefined;
|
|
160
|
+
} & {
|
|
161
|
+
setShowCytobands(flag: boolean): void;
|
|
162
|
+
setWidth(newWidth: number): void;
|
|
163
|
+
setError(error: Error | undefined): void;
|
|
164
|
+
toggleHeader(): void;
|
|
165
|
+
toggleHeaderOverview(): void;
|
|
166
|
+
scrollTo(offsetPx: number): number;
|
|
167
|
+
zoomTo(bpPerPx: number): number;
|
|
168
|
+
setOffsets(left: undefined | BpOffset, right: undefined | BpOffset): void;
|
|
169
|
+
setSearchResults(results: BaseResult[] | undefined, query: string | undefined): void;
|
|
170
|
+
setSequenceDialogOpen(open: boolean): void;
|
|
171
|
+
setNewView(bpPerPx: number, offsetPx: number): void;
|
|
172
|
+
horizontallyFlip(): void;
|
|
173
|
+
showTrack(trackId: string, initialSnapshot?: {}, displayInitialSnapshot?: {}): any;
|
|
174
|
+
hideTrack(trackId: string): number;
|
|
175
|
+
} & {
|
|
176
|
+
moveTrack(movingTrackId: string, targetTrackId: string): void;
|
|
177
|
+
closeView(): void;
|
|
178
|
+
toggleTrack(trackId: string): void;
|
|
179
|
+
setTrackLabels(setting: 'overlapping' | 'offset' | 'hidden'): void;
|
|
180
|
+
toggleCenterLine(): void;
|
|
181
|
+
setDisplayedRegions(regions: Region[]): void;
|
|
182
|
+
activateTrackSelector(): import("@jbrowse/core/util").Widget;
|
|
183
|
+
navToLocString(locString: string, optAssemblyName?: string | undefined): void;
|
|
184
|
+
/**
|
|
185
|
+
* Navigate to a location based on its refName and optionally start, end,
|
|
186
|
+
* and assemblyName. Can handle if there are multiple displayedRegions
|
|
187
|
+
* from same refName. Only navigates to a location if it is entirely
|
|
188
|
+
* within a displayedRegion. Navigates to the first matching location
|
|
189
|
+
* encountered.
|
|
190
|
+
*
|
|
191
|
+
* Throws an error if navigation was unsuccessful
|
|
192
|
+
*
|
|
193
|
+
* @param location - a proposed location to navigate to
|
|
194
|
+
*/
|
|
195
|
+
navTo(query: NavLocation): void;
|
|
196
|
+
navToMultiple(locations: NavLocation[]): void;
|
|
197
|
+
/**
|
|
198
|
+
* Navigate to a location based on user clicking and dragging on the
|
|
199
|
+
* overview scale bar to select a region to zoom into.
|
|
200
|
+
* Can handle if there are multiple displayedRegions from same refName.
|
|
201
|
+
* Only navigates to a location if it is entirely within a displayedRegion.
|
|
202
|
+
*
|
|
203
|
+
* @param leftPx- `object as {start, end, index, offset}`, offset = start of user drag
|
|
204
|
+
* @param rightPx- `object as {start, end, index, offset}`, offset = end of user drag
|
|
205
|
+
*/
|
|
206
|
+
zoomToDisplayedRegions(leftPx: BpOffset, rightPx: BpOffset): void;
|
|
207
|
+
/**
|
|
208
|
+
* Helper method for the fetchSequence.
|
|
209
|
+
* Retrieves the corresponding regions that were selected by the rubberband
|
|
210
|
+
*
|
|
211
|
+
* @param leftOffset - `object as {start, end, index, offset}`, offset = start of user drag
|
|
212
|
+
* @param rightOffset - `object as {start, end, index, offset}`, offset = end of user drag
|
|
213
|
+
* @returns array of Region[]
|
|
214
|
+
*/
|
|
215
|
+
getSelectedRegions(leftOffset: BpOffset | undefined, rightOffset: BpOffset | undefined): {
|
|
216
|
+
start: number;
|
|
217
|
+
end: number;
|
|
218
|
+
regionNumber?: number | undefined;
|
|
219
|
+
reversed?: boolean | undefined;
|
|
220
|
+
refName: string;
|
|
221
|
+
assemblyName: string;
|
|
222
|
+
key: string;
|
|
223
|
+
offsetPx: number;
|
|
224
|
+
widthPx: number;
|
|
225
|
+
variant?: string | undefined;
|
|
226
|
+
isLeftEndOfDisplayedRegion?: boolean | undefined;
|
|
227
|
+
}[];
|
|
228
|
+
afterDisplayedRegionsSet(cb: Function): void;
|
|
229
|
+
/**
|
|
230
|
+
* offset is the base-pair-offset in the displayed region, index is the index of the
|
|
231
|
+
* displayed region in the linear genome view
|
|
232
|
+
*
|
|
233
|
+
* @param start - object as `{start, end, offset, index}`
|
|
234
|
+
* @param end - object as `{start, end, offset, index}`
|
|
235
|
+
*/
|
|
236
|
+
moveTo(start: BpOffset, end: BpOffset): void;
|
|
237
|
+
horizontalScroll(distance: number): number;
|
|
238
|
+
/**
|
|
239
|
+
* scrolls the view to center on the given bp. if that is not in any
|
|
240
|
+
* of the displayed regions, does nothing
|
|
241
|
+
* @param bp - basepair at which you want to center the view
|
|
242
|
+
* @param refName - refName of the displayedRegion you are centering at
|
|
243
|
+
* @param regionIndex - index of the displayedRegion
|
|
244
|
+
*/
|
|
245
|
+
centerAt(bp: number, refName: string, regionIndex: number): void;
|
|
246
|
+
center(): void;
|
|
247
|
+
showAllRegions(): void;
|
|
248
|
+
showAllRegionsInAssembly(assemblyName?: string | undefined): void;
|
|
249
|
+
setDraggingTrackId(idx?: string | undefined): void;
|
|
250
|
+
setScaleFactor(factor: number): void;
|
|
251
|
+
} & {
|
|
252
|
+
slide: (viewWidths: number) => void;
|
|
253
|
+
} & {
|
|
254
|
+
zoom: (targetBpPerPx: number) => void;
|
|
255
|
+
} & {
|
|
256
|
+
readonly canShowCytobands: boolean;
|
|
257
|
+
readonly showCytobands: boolean;
|
|
258
|
+
readonly anyCytobandsExist: boolean;
|
|
259
|
+
readonly cytobandOffset: number;
|
|
260
|
+
} & {
|
|
261
|
+
menuItems(): MenuItem[];
|
|
262
|
+
} & {
|
|
263
|
+
readonly staticBlocks: BlockSet;
|
|
264
|
+
readonly dynamicBlocks: BlockSet;
|
|
265
|
+
readonly roundedDynamicBlocks: {
|
|
266
|
+
start: number;
|
|
267
|
+
end: number;
|
|
268
|
+
regionNumber?: number | undefined;
|
|
269
|
+
reversed?: boolean | undefined;
|
|
270
|
+
refName: string;
|
|
271
|
+
assemblyName: string;
|
|
272
|
+
key: string;
|
|
273
|
+
offsetPx: number;
|
|
274
|
+
widthPx: number;
|
|
275
|
+
variant?: string | undefined;
|
|
276
|
+
isLeftEndOfDisplayedRegion?: boolean | undefined;
|
|
277
|
+
}[];
|
|
278
|
+
readonly visibleLocStrings: string;
|
|
279
|
+
readonly coarseVisibleLocStrings: string;
|
|
280
|
+
} & {
|
|
281
|
+
clearView(): void;
|
|
282
|
+
setCoarseDynamicBlocks(blocks: BlockSet): void;
|
|
283
|
+
afterAttach(): void;
|
|
284
|
+
} & {
|
|
285
|
+
exportSvg(opts?: ExportSvgOptions): Promise<void>;
|
|
286
|
+
} & {
|
|
287
|
+
rubberBandMenuItems(): MenuItem[];
|
|
288
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
289
|
+
export { renderToSvg, RefNameAutocomplete, SearchBox };
|
|
290
|
+
export declare type LinearGenomeViewStateModel = ReturnType<typeof stateModelFactory>;
|
|
291
|
+
export declare type LinearGenomeViewModel = Instance<LinearGenomeViewStateModel>;
|
|
292
|
+
export { default as ReactComponent } from './components/LinearGenomeView';
|