@jbrowse/plugin-linear-comparative-view 2.11.2 → 2.12.1
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/LGVSyntenyDisplay/components/LaunchSyntenyViewDialog.js +1 -1
- package/dist/LGVSyntenyDisplay/components/util.js +2 -3
- package/dist/LGVSyntenyDisplay/index.js +1 -1
- package/dist/LGVSyntenyDisplay/model.d.ts +35 -36
- package/dist/LaunchLinearSyntenyView.js +1 -1
- package/dist/LinearComparativeDisplay/index.js +1 -1
- package/dist/LinearComparativeDisplay/stateModelFactory.d.ts +34 -49
- package/dist/LinearComparativeView/index.js +1 -1
- package/dist/LinearComparativeView/model.d.ts +23 -178
- package/dist/LinearComparativeView/model.js +0 -23
- package/dist/LinearReadVsRef/LinearReadVsRef.js +1 -1
- package/dist/LinearReadVsRef/index.js +1 -1
- package/dist/LinearSyntenyDisplay/afterAttach.js +1 -2
- package/dist/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +54 -101
- package/dist/LinearSyntenyDisplay/components/SyntenyContextMenu.js +1 -1
- package/dist/LinearSyntenyDisplay/components/util.d.ts +10 -0
- package/dist/LinearSyntenyDisplay/components/util.js +90 -5
- package/dist/LinearSyntenyDisplay/drawSynteny.js +4 -4
- package/dist/LinearSyntenyDisplay/index.js +1 -1
- package/dist/LinearSyntenyDisplay/model.d.ts +26 -36
- package/dist/LinearSyntenyView/components/ExportSvgDialog.js +1 -1
- package/dist/LinearSyntenyView/components/Icons.js +2 -3
- package/dist/LinearSyntenyView/components/ImportForm/index.js +1 -0
- package/dist/LinearSyntenyView/components/ImportForm/util.js +4 -5
- package/dist/LinearSyntenyView/index.js +1 -1
- package/dist/LinearSyntenyView/model.d.ts +26 -943
- package/dist/LinearSyntenyView/model.js +1 -9
- package/dist/LinearSyntenyView/svgcomponents/SVGBackground.js +1 -1
- package/dist/LinearSyntenyView/svgcomponents/SVGLinearSyntenyView.js +1 -2
- package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +5 -3
- package/dist/SyntenyFeatureDetail/SyntenyFeatureDetail.js +2 -4
- package/dist/SyntenyFeatureDetail/index.js +1 -1
- package/dist/SyntenyTrack/index.js +1 -1
- package/dist/util.js +5 -6
- package/esm/LGVSyntenyDisplay/components/util.js +1 -1
- package/esm/LGVSyntenyDisplay/model.d.ts +35 -36
- package/esm/LinearComparativeDisplay/stateModelFactory.d.ts +34 -49
- package/esm/LinearComparativeView/model.d.ts +23 -178
- package/esm/LinearComparativeView/model.js +1 -24
- package/esm/LinearSyntenyDisplay/components/LinearSyntenyRendering.js +54 -101
- package/esm/LinearSyntenyDisplay/components/util.d.ts +10 -0
- package/esm/LinearSyntenyDisplay/components/util.js +84 -1
- package/esm/LinearSyntenyDisplay/model.d.ts +26 -36
- package/esm/LinearSyntenyView/components/ImportForm/index.js +1 -0
- package/esm/LinearSyntenyView/model.d.ts +26 -943
- package/esm/LinearSyntenyView/model.js +0 -8
- package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.d.ts +5 -3
- package/esm/SyntenyFeatureDetail/SyntenyFeatureDetail.js +2 -4
- package/package.json +2 -2
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { Instance, SnapshotIn } from 'mobx-state-tree';
|
|
3
2
|
import { MenuItem } from '@jbrowse/core/ui';
|
|
4
3
|
import PluginManager from '@jbrowse/core/PluginManager';
|
|
@@ -17,7 +16,6 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
17
16
|
type: import("mobx-state-tree").ISimpleType<"LinearComparativeView">;
|
|
18
17
|
trackSelectorType: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
19
18
|
showIntraviewLinks: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
20
|
-
linkViews: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
21
19
|
interactToggled: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
22
20
|
middleComparativeHeight: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
23
21
|
tracks: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyType>;
|
|
@@ -30,16 +28,7 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
30
28
|
type: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
31
29
|
offsetPx: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
32
30
|
bpPerPx: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
33
|
-
displayedRegions: import("mobx-state-tree").
|
|
34
|
-
refName: import("mobx-state-tree").ISimpleType<string>;
|
|
35
|
-
start: import("mobx-state-tree").ISimpleType<number>;
|
|
36
|
-
end: import("mobx-state-tree").ISimpleType<number>;
|
|
37
|
-
reversed: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
38
|
-
} & {
|
|
39
|
-
assemblyName: import("mobx-state-tree").ISimpleType<string>;
|
|
40
|
-
}, {
|
|
41
|
-
setRefName(newRefName: string): void;
|
|
42
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
31
|
+
displayedRegions: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<import("@jbrowse/core/util").Region[], import("@jbrowse/core/util").Region[], import("@jbrowse/core/util").Region[]>, [undefined]>;
|
|
43
32
|
tracks: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyType>;
|
|
44
33
|
hideHeader: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
45
34
|
hideHeaderOverview: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
@@ -62,15 +51,15 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
62
51
|
} & {
|
|
63
52
|
volatileWidth: number | undefined;
|
|
64
53
|
minimumBlockWidth: number;
|
|
65
|
-
draggingTrackId:
|
|
54
|
+
draggingTrackId: undefined | string;
|
|
66
55
|
volatileError: unknown;
|
|
67
56
|
afterDisplayedRegionsSetCallbacks: Function[];
|
|
68
57
|
scaleFactor: number;
|
|
69
58
|
trackRefs: Record<string, HTMLDivElement>;
|
|
70
59
|
coarseDynamicBlocks: import("@jbrowse/core/util/blockTypes").BaseBlock[];
|
|
71
60
|
coarseTotalBp: number;
|
|
72
|
-
leftOffset: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset
|
|
73
|
-
rightOffset: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset
|
|
61
|
+
leftOffset: undefined | import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset;
|
|
62
|
+
rightOffset: undefined | import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset;
|
|
74
63
|
} & {
|
|
75
64
|
readonly trackLabelsSetting: any;
|
|
76
65
|
readonly width: number;
|
|
@@ -119,8 +108,8 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
119
108
|
removeHighlight(highlight: Required<import("@jbrowse/core/util").ParsedLocString>): void;
|
|
120
109
|
scrollTo(offsetPx: number): number;
|
|
121
110
|
zoomTo(bpPerPx: number, offset?: number, centerAtOffset?: boolean): number;
|
|
122
|
-
setOffsets(left?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset
|
|
123
|
-
setSearchResults(searchResults: import("@jbrowse/core/TextSearch/BaseResults").default[], searchQuery: string, assemblyName?: string
|
|
111
|
+
setOffsets(left?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset, right?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset): void;
|
|
112
|
+
setSearchResults(searchResults: import("@jbrowse/core/TextSearch/BaseResults").default[], searchQuery: string, assemblyName?: string): void;
|
|
124
113
|
setNewView(bpPerPx: number, offsetPx: number): void;
|
|
125
114
|
horizontallyFlip(): void;
|
|
126
115
|
showTrack(trackId: string, initialSnapshot?: {}, displayInitialSnapshot?: {}): any;
|
|
@@ -133,30 +122,30 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
133
122
|
moveTrack(movingId: string, targetId: string): void;
|
|
134
123
|
closeView(): void;
|
|
135
124
|
toggleTrack(trackId: string): boolean;
|
|
136
|
-
setTrackLabels(setting: "
|
|
125
|
+
setTrackLabels(setting: "overlapping" | "offset" | "hidden"): void;
|
|
137
126
|
setShowCenterLine(b: boolean): void;
|
|
138
127
|
setDisplayedRegions(regions: import("@jbrowse/core/util").Region[]): void;
|
|
139
128
|
activateTrackSelector(): import("@jbrowse/core/util").Widget;
|
|
140
|
-
getSelectedRegions(leftOffset?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset
|
|
129
|
+
getSelectedRegions(leftOffset?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset, rightOffset?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset): {
|
|
141
130
|
start: number;
|
|
142
131
|
end: number;
|
|
143
132
|
type: string;
|
|
144
|
-
regionNumber?: number
|
|
145
|
-
reversed?: boolean
|
|
133
|
+
regionNumber?: number;
|
|
134
|
+
reversed?: boolean;
|
|
146
135
|
refName: string;
|
|
147
136
|
assemblyName: string;
|
|
148
137
|
key: string;
|
|
149
138
|
offsetPx: number;
|
|
150
139
|
widthPx: number;
|
|
151
|
-
variant?: string
|
|
152
|
-
isLeftEndOfDisplayedRegion?: boolean
|
|
140
|
+
variant?: string;
|
|
141
|
+
isLeftEndOfDisplayedRegion?: boolean;
|
|
153
142
|
}[];
|
|
154
143
|
afterDisplayedRegionsSet(cb: Function): void;
|
|
155
144
|
horizontalScroll(distance: number): number;
|
|
156
145
|
center(): void;
|
|
157
146
|
showAllRegions(): void;
|
|
158
|
-
showAllRegionsInAssembly(assemblyName?: string
|
|
159
|
-
setDraggingTrackId(idx?: string
|
|
147
|
+
showAllRegionsInAssembly(assemblyName?: string): void;
|
|
148
|
+
setDraggingTrackId(idx?: string): void;
|
|
160
149
|
setScaleFactor(factor: number): void;
|
|
161
150
|
clearView(): void;
|
|
162
151
|
exportSvg(opts?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").ExportSvgOptions): Promise<void>;
|
|
@@ -181,143 +170,13 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
181
170
|
setCoarseDynamicBlocks(blocks: import("@jbrowse/core/util/blockTypes").BlockSet): void;
|
|
182
171
|
afterAttach(): void;
|
|
183
172
|
} & {
|
|
184
|
-
moveTo(start?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset
|
|
185
|
-
navToLocString(input: string, optAssemblyName?: string
|
|
173
|
+
moveTo(start?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset, end?: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").BpOffset): void;
|
|
174
|
+
navToLocString(input: string, optAssemblyName?: string): Promise<void>;
|
|
186
175
|
navToSearchString({ input, assembly, }: {
|
|
187
176
|
input: string;
|
|
188
|
-
assembly:
|
|
189
|
-
configuration: any;
|
|
190
|
-
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
191
|
-
error: unknown;
|
|
192
|
-
loaded: boolean;
|
|
193
|
-
loadingP: Promise<void> | undefined;
|
|
194
|
-
volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
|
|
195
|
-
refNameAliases: {
|
|
196
|
-
[x: string]: string | undefined;
|
|
197
|
-
} | undefined;
|
|
198
|
-
lowerCaseRefNameAliases: {
|
|
199
|
-
[x: string]: string | undefined;
|
|
200
|
-
} | undefined;
|
|
201
|
-
cytobands: import("@jbrowse/core/util").Feature[] | undefined;
|
|
202
|
-
} & {
|
|
203
|
-
getConf(arg: string): any;
|
|
204
|
-
} & {
|
|
205
|
-
readonly initialized: boolean;
|
|
206
|
-
/**
|
|
207
|
-
* #property
|
|
208
|
-
*/
|
|
209
|
-
readonly name: string;
|
|
210
|
-
readonly regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
|
|
211
|
-
readonly aliases: string[];
|
|
212
|
-
readonly displayName: string | undefined;
|
|
213
|
-
hasName(name: string): boolean;
|
|
214
|
-
readonly allAliases: string[];
|
|
215
|
-
readonly allRefNames: string[] | undefined;
|
|
216
|
-
readonly lowerCaseRefNames: string[] | undefined;
|
|
217
|
-
readonly allRefNamesWithLowerCase: string[] | undefined;
|
|
218
|
-
readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
|
|
219
|
-
readonly refNameColors: string[];
|
|
220
|
-
} & {
|
|
221
|
-
readonly refNames: string[] | undefined;
|
|
222
|
-
} & {
|
|
223
|
-
getCanonicalRefName(refName: string): string | undefined;
|
|
224
|
-
getRefNameColor(refName: string): string | undefined;
|
|
225
|
-
isValidRefName(refName: string): boolean;
|
|
226
|
-
} & {
|
|
227
|
-
setLoaded({ adapterRegionsWithAssembly, refNameAliases, lowerCaseRefNameAliases, cytobands, }: import("@jbrowse/core/assemblyManager/assembly").Loading): void;
|
|
228
|
-
setError(e: unknown): void;
|
|
229
|
-
setRegions(regions: import("@jbrowse/core/util").Region[]): void;
|
|
230
|
-
setRefNameAliases(aliases: {
|
|
231
|
-
[x: string]: string | undefined;
|
|
232
|
-
}, lcAliases: {
|
|
233
|
-
[x: string]: string | undefined;
|
|
234
|
-
}): void;
|
|
235
|
-
setCytobands(cytobands: import("@jbrowse/core/util").Feature[]): void;
|
|
236
|
-
setLoadingP(p?: Promise<void> | undefined): void;
|
|
237
|
-
load(): Promise<void>;
|
|
238
|
-
loadPre(): Promise<void>;
|
|
239
|
-
} & {
|
|
240
|
-
getAdapterMapEntry(adapterConf: {
|
|
241
|
-
[x: string]: unknown;
|
|
242
|
-
}, options: import("@jbrowse/core/data_adapters/BaseAdapter").BaseOptions): Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameMap>;
|
|
243
|
-
getRefNameMapForAdapter(adapterConf: {
|
|
244
|
-
[x: string]: unknown;
|
|
245
|
-
}, opts: import("@jbrowse/core/data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
246
|
-
[x: string]: string | undefined;
|
|
247
|
-
}>;
|
|
248
|
-
getReverseRefNameMapForAdapter(adapterConf: {
|
|
249
|
-
[x: string]: unknown;
|
|
250
|
-
}, opts: import("@jbrowse/core/data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
251
|
-
[x: string]: string | undefined;
|
|
252
|
-
}>;
|
|
253
|
-
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
254
|
-
configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<import("mobx-state-tree").IAnyType>>;
|
|
255
|
-
}, {
|
|
256
|
-
error: unknown;
|
|
257
|
-
loaded: boolean;
|
|
258
|
-
loadingP: Promise<void> | undefined;
|
|
259
|
-
volatileRegions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
|
|
260
|
-
refNameAliases: {
|
|
261
|
-
[x: string]: string | undefined;
|
|
262
|
-
} | undefined;
|
|
263
|
-
lowerCaseRefNameAliases: {
|
|
264
|
-
[x: string]: string | undefined;
|
|
265
|
-
} | undefined;
|
|
266
|
-
cytobands: import("@jbrowse/core/util").Feature[] | undefined;
|
|
267
|
-
} & {
|
|
268
|
-
getConf(arg: string): any;
|
|
269
|
-
} & {
|
|
270
|
-
readonly initialized: boolean;
|
|
271
|
-
/**
|
|
272
|
-
* #property
|
|
273
|
-
*/
|
|
274
|
-
readonly name: string;
|
|
275
|
-
readonly regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
|
|
276
|
-
readonly aliases: string[];
|
|
277
|
-
readonly displayName: string | undefined;
|
|
278
|
-
hasName(name: string): boolean;
|
|
279
|
-
readonly allAliases: string[];
|
|
280
|
-
readonly allRefNames: string[] | undefined;
|
|
281
|
-
readonly lowerCaseRefNames: string[] | undefined;
|
|
282
|
-
readonly allRefNamesWithLowerCase: string[] | undefined;
|
|
283
|
-
readonly rpcManager: import("@jbrowse/core/rpc/RpcManager").default;
|
|
284
|
-
readonly refNameColors: string[];
|
|
285
|
-
} & {
|
|
286
|
-
readonly refNames: string[] | undefined;
|
|
287
|
-
} & {
|
|
288
|
-
getCanonicalRefName(refName: string): string | undefined;
|
|
289
|
-
getRefNameColor(refName: string): string | undefined;
|
|
290
|
-
isValidRefName(refName: string): boolean;
|
|
291
|
-
} & {
|
|
292
|
-
setLoaded({ adapterRegionsWithAssembly, refNameAliases, lowerCaseRefNameAliases, cytobands, }: import("@jbrowse/core/assemblyManager/assembly").Loading): void;
|
|
293
|
-
setError(e: unknown): void;
|
|
294
|
-
setRegions(regions: import("@jbrowse/core/util").Region[]): void;
|
|
295
|
-
setRefNameAliases(aliases: {
|
|
296
|
-
[x: string]: string | undefined;
|
|
297
|
-
}, lcAliases: {
|
|
298
|
-
[x: string]: string | undefined;
|
|
299
|
-
}): void;
|
|
300
|
-
setCytobands(cytobands: import("@jbrowse/core/util").Feature[]): void;
|
|
301
|
-
setLoadingP(p?: Promise<void> | undefined): void;
|
|
302
|
-
load(): Promise<void>;
|
|
303
|
-
loadPre(): Promise<void>;
|
|
304
|
-
} & {
|
|
305
|
-
getAdapterMapEntry(adapterConf: {
|
|
306
|
-
[x: string]: unknown;
|
|
307
|
-
}, options: import("@jbrowse/core/data_adapters/BaseAdapter").BaseOptions): Promise<import("@jbrowse/core/assemblyManager/assembly").RefNameMap>;
|
|
308
|
-
getRefNameMapForAdapter(adapterConf: {
|
|
309
|
-
[x: string]: unknown;
|
|
310
|
-
}, opts: import("@jbrowse/core/data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
311
|
-
[x: string]: string | undefined;
|
|
312
|
-
}>;
|
|
313
|
-
getReverseRefNameMapForAdapter(adapterConf: {
|
|
314
|
-
[x: string]: unknown;
|
|
315
|
-
}, opts: import("@jbrowse/core/data_adapters/BaseAdapter").BaseOptions): Promise<{
|
|
316
|
-
[x: string]: string | undefined;
|
|
317
|
-
}>;
|
|
318
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
177
|
+
assembly: import("@jbrowse/core/assemblyManager/assembly").Assembly;
|
|
319
178
|
}): Promise<void>;
|
|
320
|
-
navToLocations(parsedLocStrings: import("@jbrowse/core/util").ParsedLocString[], assemblyName?: string
|
|
179
|
+
navToLocations(parsedLocStrings: import("@jbrowse/core/util").ParsedLocString[], assemblyName?: string): Promise<void>;
|
|
321
180
|
navTo(query: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").NavLocation): void;
|
|
322
181
|
navToMultiple(locations: import("@jbrowse/plugin-linear-genome-view/src/LinearGenomeView").NavLocation[]): void;
|
|
323
182
|
} & {
|
|
@@ -325,12 +184,12 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
325
184
|
bpToPx({ refName, coord, regionNumber, }: {
|
|
326
185
|
refName: string;
|
|
327
186
|
coord: number;
|
|
328
|
-
regionNumber?: number
|
|
187
|
+
regionNumber?: number;
|
|
329
188
|
}): {
|
|
330
189
|
index: number;
|
|
331
190
|
offsetPx: number;
|
|
332
191
|
} | undefined;
|
|
333
|
-
centerAt(coord: number, refName: string, regionNumber?: number
|
|
192
|
+
centerAt(coord: number, refName: string, regionNumber?: number): void;
|
|
334
193
|
pxToBp(px: number): {
|
|
335
194
|
coord: number;
|
|
336
195
|
index: number;
|
|
@@ -340,7 +199,7 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
340
199
|
offset: number;
|
|
341
200
|
start: number;
|
|
342
201
|
end: number;
|
|
343
|
-
reversed
|
|
202
|
+
reversed?: boolean;
|
|
344
203
|
};
|
|
345
204
|
readonly centerLineInfo: {
|
|
346
205
|
coord: number;
|
|
@@ -351,7 +210,7 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
351
210
|
offset: number;
|
|
352
211
|
start: number;
|
|
353
212
|
end: number;
|
|
354
|
-
reversed
|
|
213
|
+
reversed?: boolean;
|
|
355
214
|
} | undefined;
|
|
356
215
|
} & {
|
|
357
216
|
afterCreate(): void;
|
|
@@ -364,16 +223,7 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
364
223
|
type: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
365
224
|
offsetPx: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
366
225
|
bpPerPx: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
367
|
-
displayedRegions: import("mobx-state-tree").
|
|
368
|
-
refName: import("mobx-state-tree").ISimpleType<string>;
|
|
369
|
-
start: import("mobx-state-tree").ISimpleType<number>;
|
|
370
|
-
end: import("mobx-state-tree").ISimpleType<number>;
|
|
371
|
-
reversed: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
372
|
-
} & {
|
|
373
|
-
assemblyName: import("mobx-state-tree").ISimpleType<string>;
|
|
374
|
-
}, {
|
|
375
|
-
setRefName(newRefName: string): void;
|
|
376
|
-
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
226
|
+
displayedRegions: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<import("@jbrowse/core/util").Region[], import("@jbrowse/core/util").Region[], import("@jbrowse/core/util").Region[]>, [undefined]>;
|
|
377
227
|
tracks: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IAnyType>;
|
|
378
228
|
hideHeader: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
379
229
|
hideHeaderOverview: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
@@ -415,7 +265,6 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
415
265
|
*/
|
|
416
266
|
readonly assemblyNames: string[];
|
|
417
267
|
} & {
|
|
418
|
-
afterAttach(): void;
|
|
419
268
|
beforeDestroy(): void;
|
|
420
269
|
onSubviewAction(actionName: string, path: string, args?: unknown[]): void;
|
|
421
270
|
/**
|
|
@@ -440,10 +289,6 @@ declare function stateModelFactory(pluginManager: PluginManager): import("mobx-s
|
|
|
440
289
|
* #action
|
|
441
290
|
*/
|
|
442
291
|
setMiddleComparativeHeight(n: number): number;
|
|
443
|
-
/**
|
|
444
|
-
* #action
|
|
445
|
-
*/
|
|
446
|
-
toggleLinkViews(): void;
|
|
447
292
|
/**
|
|
448
293
|
* #action
|
|
449
294
|
*/
|
|
@@ -62,10 +62,6 @@ function stateModelFactory(pluginManager) {
|
|
|
62
62
|
* #property
|
|
63
63
|
*/
|
|
64
64
|
showIntraviewLinks: true,
|
|
65
|
-
/**
|
|
66
|
-
* #property
|
|
67
|
-
*/
|
|
68
|
-
linkViews: false,
|
|
69
65
|
/**
|
|
70
66
|
* #property
|
|
71
67
|
*/
|
|
@@ -126,19 +122,6 @@ function stateModelFactory(pluginManager) {
|
|
|
126
122
|
},
|
|
127
123
|
}))
|
|
128
124
|
.actions(self => ({
|
|
129
|
-
afterAttach() {
|
|
130
|
-
(0, mobx_state_tree_1.addDisposer)(self, (0, mobx_state_tree_1.onAction)(self, param => {
|
|
131
|
-
if (self.linkViews) {
|
|
132
|
-
const { name, path, args } = param;
|
|
133
|
-
// doesn't link showTrack/hideTrack, doesn't make sense in
|
|
134
|
-
// synteny views most time
|
|
135
|
-
const actions = ['horizontalScroll', 'zoomTo', 'setScaleFactor'];
|
|
136
|
-
if (actions.includes(name) && path) {
|
|
137
|
-
this.onSubviewAction(name, path, args);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
}));
|
|
141
|
-
},
|
|
142
125
|
// automatically removes session assemblies associated with this view
|
|
143
126
|
// e.g. read vs ref
|
|
144
127
|
beforeDestroy() {
|
|
@@ -191,12 +174,6 @@ function stateModelFactory(pluginManager) {
|
|
|
191
174
|
self.middleComparativeHeight = n;
|
|
192
175
|
return self.middleComparativeHeight;
|
|
193
176
|
},
|
|
194
|
-
/**
|
|
195
|
-
* #action
|
|
196
|
-
*/
|
|
197
|
-
toggleLinkViews() {
|
|
198
|
-
self.linkViews = !self.linkViews;
|
|
199
|
-
},
|
|
200
177
|
/**
|
|
201
178
|
* #action
|
|
202
179
|
*/
|
|
@@ -23,6 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.default = ReadVsRefDialog;
|
|
26
27
|
const react_1 = __importStar(require("react"));
|
|
27
28
|
const material_1 = require("@mui/material");
|
|
28
29
|
const ui_1 = require("@jbrowse/core/ui");
|
|
@@ -281,4 +282,3 @@ function ReadVsRefDialog({ track, feature: preFeature, handleClose, }) {
|
|
|
281
282
|
react_1.default.createElement(material_1.Button, { variant: "contained", color: "secondary", onClick: handleClose }, "Cancel"),
|
|
282
283
|
react_1.default.createElement(material_1.Button, { disabled: !primaryFeature, variant: "contained", color: "primary", onClick: onSubmit }, "Submit"))));
|
|
283
284
|
}
|
|
284
|
-
exports.default = ReadVsRefDialog;
|
|
@@ -26,6 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.default = LinearReadVsRefMenuItemF;
|
|
29
30
|
const react_1 = require("react");
|
|
30
31
|
const util_1 = require("@jbrowse/core/util");
|
|
31
32
|
// icons
|
|
@@ -75,4 +76,3 @@ function LinearReadVsRefMenuItemF(pm) {
|
|
|
75
76
|
return pluggableElement;
|
|
76
77
|
});
|
|
77
78
|
}
|
|
78
|
-
exports.default = LinearReadVsRefMenuItemF;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.doAfterAttach =
|
|
3
|
+
exports.doAfterAttach = doAfterAttach;
|
|
4
4
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
5
5
|
const util_1 = require("@jbrowse/core/util");
|
|
6
6
|
const Base1DUtils_1 = require("@jbrowse/core/util/Base1DUtils");
|
|
@@ -103,4 +103,3 @@ function doAfterAttach(self) {
|
|
|
103
103
|
self.setFeatPositions(map);
|
|
104
104
|
}, { fireImmediately: true }));
|
|
105
105
|
}
|
|
106
|
-
exports.doAfterAttach = doAfterAttach;
|
|
@@ -35,6 +35,7 @@ const mui_1 = require("tss-react/mui");
|
|
|
35
35
|
const SyntenyTooltip_1 = __importDefault(require("./SyntenyTooltip"));
|
|
36
36
|
const drawSynteny_1 = require("../drawSynteny");
|
|
37
37
|
const SyntenyContextMenu_1 = __importDefault(require("./SyntenyContextMenu"));
|
|
38
|
+
const util_2 = require("./util");
|
|
38
39
|
const useStyles = (0, mui_1.makeStyles)()({
|
|
39
40
|
pix: {
|
|
40
41
|
imageRendering: 'pixelated',
|
|
@@ -59,30 +60,44 @@ const LinearSyntenyRendering = (0, mobx_react_1.observer)(function ({ model, })
|
|
|
59
60
|
const view = (0, util_1.getContainingView)(model);
|
|
60
61
|
const height = view.middleComparativeHeight;
|
|
61
62
|
const width = view.width;
|
|
63
|
+
const delta = (0, react_1.useRef)(0);
|
|
64
|
+
const timeout = (0, react_1.useRef)();
|
|
62
65
|
const [anchorEl, setAnchorEl] = (0, react_1.useState)();
|
|
63
66
|
const [tooltip, setTooltip] = (0, react_1.useState)('');
|
|
64
67
|
const [currX, setCurrX] = (0, react_1.useState)();
|
|
65
68
|
const [mouseCurrDownX, setMouseCurrDownX] = (0, react_1.useState)();
|
|
66
69
|
const [mouseInitialDownX, setMouseInitialDownX] = (0, react_1.useState)();
|
|
67
70
|
const [currY, setCurrY] = (0, react_1.useState)();
|
|
71
|
+
const { mouseoverId } = model;
|
|
68
72
|
// these useCallbacks avoid new refs from being created on any mouseover, etc.
|
|
69
73
|
const k1 = (0, react_1.useCallback)((ref) => model.setMouseoverCanvasRef(ref),
|
|
70
74
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
71
75
|
[model, height, width]);
|
|
72
|
-
const k2 = (0, react_1.useCallback)((ref) =>
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
76
|
+
const k2 = (0, react_1.useCallback)((ref) => {
|
|
77
|
+
model.setMainCanvasRef(ref);
|
|
78
|
+
function onWheel(event) {
|
|
79
|
+
event.preventDefault();
|
|
80
|
+
if (event.ctrlKey === true) {
|
|
81
|
+
delta.current += event.deltaY / 500;
|
|
82
|
+
for (const v of view.views) {
|
|
83
|
+
v.setScaleFactor(delta.current < 0 ? 1 - delta.current : 1 / (1 + delta.current));
|
|
84
|
+
}
|
|
85
|
+
if (timeout.current) {
|
|
86
|
+
clearTimeout(timeout.current);
|
|
87
|
+
}
|
|
88
|
+
timeout.current = setTimeout(() => {
|
|
89
|
+
for (const v of view.views) {
|
|
90
|
+
v.setScaleFactor(1);
|
|
91
|
+
v.zoomTo(delta.current > 0
|
|
92
|
+
? v.bpPerPx * (1 + delta.current)
|
|
93
|
+
: v.bpPerPx / (1 - delta.current), event.clientX - ((ref === null || ref === void 0 ? void 0 : ref.getBoundingClientRect().left) || 0));
|
|
94
|
+
}
|
|
95
|
+
delta.current = 0;
|
|
96
|
+
}, 300);
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
84
99
|
if (Math.abs(event.deltaY) < Math.abs(event.deltaX)) {
|
|
85
|
-
xOffset.current += event.deltaX;
|
|
100
|
+
xOffset.current += event.deltaX / 2;
|
|
86
101
|
}
|
|
87
102
|
if (currScrollFrame.current === undefined) {
|
|
88
103
|
currScrollFrame.current = requestAnimationFrame(() => {
|
|
@@ -95,7 +110,28 @@ const LinearSyntenyRendering = (0, mobx_react_1.observer)(function ({ model, })
|
|
|
95
110
|
});
|
|
96
111
|
});
|
|
97
112
|
}
|
|
98
|
-
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
if (ref) {
|
|
116
|
+
ref.addEventListener('wheel', onWheel);
|
|
117
|
+
// this is a react 19-ism to have a cleanup in the ref callback
|
|
118
|
+
// https://react.dev/blog/2024/04/25/react-19#cleanup-functions-for-refs
|
|
119
|
+
// note: it warns in earlier versions of react
|
|
120
|
+
return () => ref.removeEventListener('wheel', onWheel);
|
|
121
|
+
}
|
|
122
|
+
return () => { };
|
|
123
|
+
},
|
|
124
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
125
|
+
[model, height, width]);
|
|
126
|
+
const k3 = (0, react_1.useCallback)((ref) => model.setClickMapCanvasRef(ref),
|
|
127
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
128
|
+
[model, height, width]);
|
|
129
|
+
const k4 = (0, react_1.useCallback)((ref) => model.setCigarClickMapCanvasRef(ref),
|
|
130
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
131
|
+
[model, height, width]);
|
|
132
|
+
return (react_1.default.createElement("div", { className: classes.rel },
|
|
133
|
+
react_1.default.createElement("canvas", { ref: k1, width: width, height: height, className: cx(classes.abs, classes.none) }),
|
|
134
|
+
react_1.default.createElement("canvas", { ref: k2, onMouseMove: event => {
|
|
99
135
|
var _a;
|
|
100
136
|
if (mouseCurrDownX !== undefined) {
|
|
101
137
|
xOffset.current += mouseCurrDownX - event.clientX;
|
|
@@ -141,7 +177,7 @@ const LinearSyntenyRendering = (0, mobx_react_1.observer)(function ({ model, })
|
|
|
141
177
|
const { f, cigar } = model.featPositions[id];
|
|
142
178
|
const unitMultiplier2 = Math.floor(drawSynteny_1.MAX_COLOR_RANGE / cigar.length);
|
|
143
179
|
const cigarIdx = (0, drawSynteny_1.getId)(r2, g2, b2, unitMultiplier2);
|
|
144
|
-
setTooltip(getTooltip(f, cigar[cigarIdx], cigar[cigarIdx + 1]));
|
|
180
|
+
setTooltip((0, util_2.getTooltip)(f, cigar[cigarIdx], cigar[cigarIdx + 1]));
|
|
145
181
|
}
|
|
146
182
|
}
|
|
147
183
|
}, onMouseLeave: () => {
|
|
@@ -155,95 +191,12 @@ const LinearSyntenyRendering = (0, mobx_react_1.observer)(function ({ model, })
|
|
|
155
191
|
setMouseCurrDownX(undefined);
|
|
156
192
|
if (mouseInitialDownX !== undefined &&
|
|
157
193
|
Math.abs(evt.clientX - mouseInitialDownX) < 5) {
|
|
158
|
-
|
|
194
|
+
(0, util_2.onSynClick)(evt, model);
|
|
159
195
|
}
|
|
160
|
-
}, onContextMenu: evt =>
|
|
161
|
-
onSyntenyContextClick(evt, model, setAnchorEl);
|
|
162
|
-
}, "data-testid": "synteny_canvas", className: classes.abs, width: width, height: height }),
|
|
196
|
+
}, onContextMenu: evt => (0, util_2.onSynContextClick)(evt, model, setAnchorEl), "data-testid": "synteny_canvas", className: classes.abs, width: width, height: height }),
|
|
163
197
|
react_1.default.createElement("canvas", { ref: k3, className: classes.pix, width: width, height: height }),
|
|
164
198
|
react_1.default.createElement("canvas", { ref: k4, className: classes.pix, width: width, height: height }),
|
|
165
|
-
|
|
199
|
+
mouseoverId && tooltip && currX && currY ? (react_1.default.createElement(SyntenyTooltip_1.default, { title: tooltip })) : null,
|
|
166
200
|
anchorEl ? (react_1.default.createElement(SyntenyContextMenu_1.default, { model: model, anchorEl: anchorEl, onClose: () => setAnchorEl(undefined) })) : null));
|
|
167
201
|
});
|
|
168
|
-
function onSyntenyClick(event, model) {
|
|
169
|
-
const ref1 = model.clickMapCanvas;
|
|
170
|
-
const ref2 = model.cigarClickMapCanvas;
|
|
171
|
-
if (!ref1 || !ref2) {
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
const rect = ref1.getBoundingClientRect();
|
|
175
|
-
const ctx1 = ref1.getContext('2d');
|
|
176
|
-
const ctx2 = ref2.getContext('2d');
|
|
177
|
-
if (!ctx1 || !ctx2) {
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
|
-
const x = event.clientX - rect.left;
|
|
181
|
-
const y = event.clientY - rect.top;
|
|
182
|
-
const [r1, g1, b1] = ctx1.getImageData(x, y, 1, 1).data;
|
|
183
|
-
const unitMultiplier = Math.floor(drawSynteny_1.MAX_COLOR_RANGE / model.numFeats);
|
|
184
|
-
const id = (0, drawSynteny_1.getId)(r1, g1, b1, unitMultiplier);
|
|
185
|
-
const feat = model.featPositions[id];
|
|
186
|
-
if (feat) {
|
|
187
|
-
const { f } = feat;
|
|
188
|
-
model.setClickId(f.id());
|
|
189
|
-
const session = (0, util_1.getSession)(model);
|
|
190
|
-
if ((0, util_1.isSessionModelWithWidgets)(session)) {
|
|
191
|
-
session.showWidget(session.addWidget('SyntenyFeatureWidget', 'syntenyFeature', {
|
|
192
|
-
featureData: {
|
|
193
|
-
feature1: f.toJSON(),
|
|
194
|
-
feature2: f.get('mate'),
|
|
195
|
-
},
|
|
196
|
-
}));
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
return feat;
|
|
200
|
-
}
|
|
201
|
-
function onSyntenyContextClick(event, model, setAnchorEl) {
|
|
202
|
-
event.preventDefault();
|
|
203
|
-
const ref1 = model.clickMapCanvas;
|
|
204
|
-
const ref2 = model.cigarClickMapCanvas;
|
|
205
|
-
if (!ref1 || !ref2) {
|
|
206
|
-
return;
|
|
207
|
-
}
|
|
208
|
-
const rect = ref1.getBoundingClientRect();
|
|
209
|
-
const ctx1 = ref1.getContext('2d');
|
|
210
|
-
const ctx2 = ref2.getContext('2d');
|
|
211
|
-
if (!ctx1 || !ctx2) {
|
|
212
|
-
return;
|
|
213
|
-
}
|
|
214
|
-
const { clientX, clientY } = event;
|
|
215
|
-
const x = clientX - rect.left;
|
|
216
|
-
const y = clientY - rect.top;
|
|
217
|
-
const [r1, g1, b1] = ctx1.getImageData(x, y, 1, 1).data;
|
|
218
|
-
const unitMultiplier = Math.floor(drawSynteny_1.MAX_COLOR_RANGE / model.numFeats);
|
|
219
|
-
const id = (0, drawSynteny_1.getId)(r1, g1, b1, unitMultiplier);
|
|
220
|
-
const f = model.featPositions[id];
|
|
221
|
-
if (f) {
|
|
222
|
-
model.setClickId(f.f.id());
|
|
223
|
-
setAnchorEl({ clientX, clientY, feature: f });
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
function getTooltip(f, cigarOp, cigarOpLen) {
|
|
227
|
-
// @ts-expect-error
|
|
228
|
-
const f1 = f.toJSON();
|
|
229
|
-
const f2 = f1.mate;
|
|
230
|
-
const l1 = f1.end - f1.start;
|
|
231
|
-
const l2 = f2.end - f2.start;
|
|
232
|
-
const identity = f1.identity;
|
|
233
|
-
const n1 = f1.name;
|
|
234
|
-
const n2 = f2.name;
|
|
235
|
-
return [
|
|
236
|
-
`Loc1: ${(0, util_1.assembleLocString)(f1)}`,
|
|
237
|
-
`Loc2: ${(0, util_1.assembleLocString)(f2)}`,
|
|
238
|
-
`Inverted: ${f1.strand === -1}`,
|
|
239
|
-
`Query len: ${l1.toLocaleString('en-US')}`,
|
|
240
|
-
`Target len: ${l2.toLocaleString('en-US')}`,
|
|
241
|
-
identity ? `Identity: ${identity.toPrecision(2)}` : '',
|
|
242
|
-
cigarOp ? `CIGAR operator: ${cigarOp}${cigarOpLen}` : '',
|
|
243
|
-
n1 ? `Name 1: ${n1}` : '',
|
|
244
|
-
n2 ? `Name 1: ${n2}` : '',
|
|
245
|
-
]
|
|
246
|
-
.filter(f => !!f)
|
|
247
|
-
.join('<br/>');
|
|
248
|
-
}
|
|
249
202
|
exports.default = LinearSyntenyRendering;
|
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = SyntenyContextMenu;
|
|
6
7
|
const react_1 = __importDefault(require("react"));
|
|
7
8
|
const util_1 = require("@jbrowse/core/util");
|
|
8
9
|
const ui_1 = require("@jbrowse/core/ui");
|
|
@@ -54,4 +55,3 @@ function SyntenyContextMenu({ model, onClose, anchorEl, }) {
|
|
|
54
55
|
},
|
|
55
56
|
] }));
|
|
56
57
|
}
|
|
57
|
-
exports.default = SyntenyContextMenu;
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { Feature } from '@jbrowse/core/util';
|
|
3
|
+
import { LinearSyntenyDisplayModel } from '../model';
|
|
2
4
|
interface Pos {
|
|
3
5
|
offsetPx: number;
|
|
4
6
|
}
|
|
7
|
+
export interface ClickCoord {
|
|
8
|
+
clientX: number;
|
|
9
|
+
clientY: number;
|
|
10
|
+
feature: any;
|
|
11
|
+
}
|
|
5
12
|
interface FeatPos {
|
|
6
13
|
p11: Pos;
|
|
7
14
|
p12: Pos;
|
|
@@ -24,4 +31,7 @@ export declare function drawMatchSimple({ feature, ctx, offsets, cb, height, dra
|
|
|
24
31
|
export declare function draw(ctx: CanvasRenderingContext2D, x1: number, x2: number, y1: number, x3: number, x4: number, y2: number, mid: number, drawCurves?: boolean): void;
|
|
25
32
|
export declare function drawBox(ctx: CanvasRenderingContext2D, x1: number, x2: number, y1: number, x3: number, x4: number, y2: number): void;
|
|
26
33
|
export declare function drawBezierBox(ctx: CanvasRenderingContext2D, x1: number, x2: number, y1: number, x3: number, x4: number, y2: number, mid: number): void;
|
|
34
|
+
export declare function onSynClick(event: React.MouseEvent, model: LinearSyntenyDisplayModel): import("../model").FeatPos | undefined;
|
|
35
|
+
export declare function onSynContextClick(event: React.MouseEvent, model: LinearSyntenyDisplayModel, setAnchorEl: (arg: ClickCoord) => void): void;
|
|
36
|
+
export declare function getTooltip(f: Feature, cigarOp?: string, cigarOpLen?: string): string;
|
|
27
37
|
export {};
|