@jbrowse/plugin-linear-genome-view 1.5.0 → 1.5.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/Block.d.ts +7 -10
- package/dist/LinearGenomeView/components/HelpDialog.d.ts +5 -0
- package/dist/LinearGenomeView/components/LinearGenomeView.d.ts +3 -5
- package/dist/LinearGenomeView/components/LinearGenomeViewSvg.d.ts +4 -0
- package/dist/LinearGenomeView/components/OverviewRubberBand.d.ts +2 -3
- package/dist/LinearGenomeView/components/OverviewScaleBar.d.ts +116 -2
- package/dist/LinearGenomeView/components/RefNameAutocomplete.d.ts +3 -1
- package/dist/LinearGenomeView/components/ScaleBar.d.ts +14 -0
- package/dist/LinearGenomeView/components/util.d.ts +1 -1
- package/dist/LinearGenomeView/index.d.ts +9 -2
- package/dist/plugin-linear-genome-view.cjs.development.js +3163 -2886
- package/dist/plugin-linear-genome-view.cjs.development.js.map +1 -1
- package/dist/plugin-linear-genome-view.cjs.production.min.js +1 -1
- package/dist/plugin-linear-genome-view.cjs.production.min.js.map +1 -1
- package/dist/plugin-linear-genome-view.esm.js +3122 -2845
- package/dist/plugin-linear-genome-view.esm.js.map +1 -1
- package/package.json +4 -4
- package/src/BaseLinearDisplay/components/BaseLinearDisplay.tsx +0 -1
- package/src/BaseLinearDisplay/components/Block.tsx +20 -33
- package/src/LinearGenomeView/components/Header.tsx +19 -7
- package/src/LinearGenomeView/components/HelpDialog.tsx +81 -0
- package/src/LinearGenomeView/components/ImportForm.tsx +42 -51
- package/src/LinearGenomeView/components/LinearGenomeView.tsx +30 -245
- package/src/LinearGenomeView/components/LinearGenomeViewSvg.tsx +317 -0
- package/src/LinearGenomeView/components/OverviewRubberBand.tsx +74 -34
- package/src/LinearGenomeView/components/OverviewScaleBar.tsx +326 -177
- package/src/LinearGenomeView/components/RefNameAutocomplete.tsx +145 -145
- package/src/LinearGenomeView/components/SearchResultsDialog.tsx +12 -34
- package/src/LinearGenomeView/components/SequenceDialog.tsx +9 -8
- package/src/LinearGenomeView/components/__snapshots__/LinearGenomeView.test.js.snap +127 -78
- package/src/LinearGenomeView/components/util.ts +6 -4
- package/src/LinearGenomeView/index.tsx +55 -14
- package/src/declare.d.ts +0 -1
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
import { BaseBlock } from '@jbrowse/core/util/blockTypes';
|
|
2
1
|
import React from 'react';
|
|
3
|
-
|
|
2
|
+
import { BaseBlock } from '@jbrowse/core/util/blockTypes';
|
|
3
|
+
declare const ContentBlock: ({ block, children }: {
|
|
4
4
|
block: BaseBlock;
|
|
5
5
|
children: React.ReactNode;
|
|
6
|
-
}
|
|
7
|
-
|
|
6
|
+
}) => JSX.Element;
|
|
7
|
+
declare function ElidedBlock({ width }: {
|
|
8
8
|
width: number;
|
|
9
|
-
}
|
|
10
|
-
|
|
9
|
+
}): JSX.Element;
|
|
10
|
+
declare function InterRegionPaddingBlock({ boundary, width, style, }: {
|
|
11
11
|
boundary: boolean;
|
|
12
12
|
width: number;
|
|
13
13
|
style?: React.CSSProperties;
|
|
14
|
-
}
|
|
15
|
-
declare const ContentBlock: ({ block, children }: ContentBlockProps) => JSX.Element;
|
|
16
|
-
declare function ElidedBlock({ width }: ElidedBlockProps): JSX.Element;
|
|
17
|
-
declare function InterRegionPaddingBlock({ boundary, width, style, }: InterRegionPaddingBlockProps): JSX.Element;
|
|
14
|
+
}): JSX.Element;
|
|
18
15
|
export { ContentBlock, ElidedBlock, InterRegionPaddingBlock };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
declare type LGV = Instance<LinearGenomeViewStateModel>;
|
|
2
|
+
import { LinearGenomeViewModel } from '..';
|
|
3
|
+
declare type LGV = LinearGenomeViewModel;
|
|
5
4
|
declare const LinearGenomeView: ({ model }: {
|
|
6
5
|
model: LGV;
|
|
7
|
-
}) => JSX.Element
|
|
6
|
+
}) => JSX.Element;
|
|
8
7
|
export default LinearGenomeView;
|
|
9
|
-
export declare function renderToSvg(model: LGV, opts: ExportSvgOptions): Promise<string>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Instance } from 'mobx-state-tree';
|
|
3
2
|
import ReactPropTypes from 'prop-types';
|
|
4
3
|
import { Base1DViewModel } from '@jbrowse/core/util/Base1DViewModel';
|
|
5
|
-
import {
|
|
6
|
-
declare type LGV =
|
|
4
|
+
import { LinearGenomeViewModel } from '..';
|
|
5
|
+
declare type LGV = LinearGenomeViewModel;
|
|
7
6
|
declare function OverviewRubberBand({ model, overview, ControlComponent, }: {
|
|
8
7
|
model: LGV;
|
|
9
8
|
overview: Base1DViewModel;
|
|
@@ -1,10 +1,124 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Instance } from 'mobx-state-tree';
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import { Base1DViewModel } from '@jbrowse/core/util/Base1DViewModel';
|
|
4
|
+
import { ContentBlock } from '@jbrowse/core/util/blockTypes';
|
|
5
|
+
import { Assembly } from '@jbrowse/core/assemblyManager/assembly';
|
|
6
|
+
import { LinearGenomeViewModel } from '..';
|
|
7
|
+
declare const Polygon: ({ model, overview, useOffset, }: {
|
|
8
|
+
model: LGV;
|
|
9
|
+
overview: Instance<Base1DViewModel>;
|
|
10
|
+
useOffset?: boolean | undefined;
|
|
11
|
+
}) => JSX.Element | null;
|
|
12
|
+
declare type LGV = LinearGenomeViewModel;
|
|
13
|
+
declare const Cytobands: ({ overview, block, assembly, }: {
|
|
14
|
+
overview: Base1DViewModel;
|
|
15
|
+
assembly?: (import("mobx-state-tree").ModelInstanceTypeProps<{
|
|
16
|
+
configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<import("mobx-state-tree").IAnyType>>;
|
|
17
|
+
}> & {
|
|
18
|
+
error: Error | undefined;
|
|
19
|
+
regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
|
|
20
|
+
refNameAliases: {
|
|
21
|
+
[key: string]: string;
|
|
22
|
+
} | undefined;
|
|
23
|
+
cytobands: import("@jbrowse/core/util/simpleFeature").Feature[] | undefined;
|
|
24
|
+
} & {
|
|
25
|
+
readonly initialized: boolean;
|
|
26
|
+
readonly name: string;
|
|
27
|
+
readonly aliases: string[];
|
|
28
|
+
hasName(name: string): boolean;
|
|
29
|
+
readonly allAliases: string[];
|
|
30
|
+
readonly refNames: string[] | undefined;
|
|
31
|
+
readonly allRefNames: string[] | undefined;
|
|
32
|
+
readonly rpcManager: any;
|
|
33
|
+
readonly refNameColors: string[];
|
|
34
|
+
} & {
|
|
35
|
+
getCanonicalRefName(refName: string): string;
|
|
36
|
+
getRefNameColor(refName: string): string | undefined;
|
|
37
|
+
isValidRefName(refName: string): boolean;
|
|
38
|
+
} & {
|
|
39
|
+
setLoading(): void;
|
|
40
|
+
setLoaded({ adapterRegionsWithAssembly, refNameAliases, cytobands, }: {
|
|
41
|
+
adapterRegionsWithAssembly: import("@jbrowse/core/util").Region[];
|
|
42
|
+
refNameAliases: Record<string, string>;
|
|
43
|
+
cytobands: import("@jbrowse/core/util/simpleFeature").Feature[];
|
|
44
|
+
}): void;
|
|
45
|
+
setError(e: Error): void;
|
|
46
|
+
setRegions(regions: import("@jbrowse/core/util").Region[]): void;
|
|
47
|
+
setRefNameAliases(refNameAliases: Record<string, string>): void;
|
|
48
|
+
setCytobands(cytobands: import("@jbrowse/core/util/simpleFeature").Feature[]): void;
|
|
49
|
+
afterAttach(): void;
|
|
50
|
+
} & {
|
|
51
|
+
getAdapterMapEntry(adapterConf: unknown, options: import("@jbrowse/core/assemblyManager/assembly").BaseOptions): Promise<{
|
|
52
|
+
forwardMap: {
|
|
53
|
+
[k: string]: string;
|
|
54
|
+
};
|
|
55
|
+
reverseMap: {
|
|
56
|
+
[k: string]: string;
|
|
57
|
+
};
|
|
58
|
+
}>;
|
|
59
|
+
getRefNameMapForAdapter(adapterConf: unknown, opts: import("@jbrowse/core/assemblyManager/assembly").BaseOptions): Promise<{
|
|
60
|
+
[k: string]: string;
|
|
61
|
+
}>;
|
|
62
|
+
getReverseRefNameMapForAdapter(adapterConf: unknown, opts: import("@jbrowse/core/assemblyManager/assembly").BaseOptions): Promise<{
|
|
63
|
+
[k: string]: string;
|
|
64
|
+
}>;
|
|
65
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
66
|
+
configuration: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IReferenceType<import("mobx-state-tree").IAnyType>>;
|
|
67
|
+
}, {
|
|
68
|
+
error: Error | undefined;
|
|
69
|
+
regions: import("@jbrowse/core/assemblyManager/assembly").BasicRegion[] | undefined;
|
|
70
|
+
refNameAliases: {
|
|
71
|
+
[key: string]: string;
|
|
72
|
+
} | undefined;
|
|
73
|
+
cytobands: import("@jbrowse/core/util/simpleFeature").Feature[] | undefined;
|
|
74
|
+
} & {
|
|
75
|
+
readonly initialized: boolean;
|
|
76
|
+
readonly name: string;
|
|
77
|
+
readonly aliases: string[];
|
|
78
|
+
hasName(name: string): boolean;
|
|
79
|
+
readonly allAliases: string[];
|
|
80
|
+
readonly refNames: string[] | undefined;
|
|
81
|
+
readonly allRefNames: string[] | undefined;
|
|
82
|
+
readonly rpcManager: any;
|
|
83
|
+
readonly refNameColors: string[];
|
|
84
|
+
} & {
|
|
85
|
+
getCanonicalRefName(refName: string): string;
|
|
86
|
+
getRefNameColor(refName: string): string | undefined;
|
|
87
|
+
isValidRefName(refName: string): boolean;
|
|
88
|
+
} & {
|
|
89
|
+
setLoading(): void;
|
|
90
|
+
setLoaded({ adapterRegionsWithAssembly, refNameAliases, cytobands, }: {
|
|
91
|
+
adapterRegionsWithAssembly: import("@jbrowse/core/util").Region[];
|
|
92
|
+
refNameAliases: Record<string, string>;
|
|
93
|
+
cytobands: import("@jbrowse/core/util/simpleFeature").Feature[];
|
|
94
|
+
}): void;
|
|
95
|
+
setError(e: Error): void;
|
|
96
|
+
setRegions(regions: import("@jbrowse/core/util").Region[]): void;
|
|
97
|
+
setRefNameAliases(refNameAliases: Record<string, string>): void;
|
|
98
|
+
setCytobands(cytobands: import("@jbrowse/core/util/simpleFeature").Feature[]): void;
|
|
99
|
+
afterAttach(): void;
|
|
100
|
+
} & {
|
|
101
|
+
getAdapterMapEntry(adapterConf: unknown, options: import("@jbrowse/core/assemblyManager/assembly").BaseOptions): Promise<{
|
|
102
|
+
forwardMap: {
|
|
103
|
+
[k: string]: string;
|
|
104
|
+
};
|
|
105
|
+
reverseMap: {
|
|
106
|
+
[k: string]: string;
|
|
107
|
+
};
|
|
108
|
+
}>;
|
|
109
|
+
getRefNameMapForAdapter(adapterConf: unknown, opts: import("@jbrowse/core/assemblyManager/assembly").BaseOptions): Promise<{
|
|
110
|
+
[k: string]: string;
|
|
111
|
+
}>;
|
|
112
|
+
getReverseRefNameMapForAdapter(adapterConf: unknown, opts: import("@jbrowse/core/assemblyManager/assembly").BaseOptions): Promise<{
|
|
113
|
+
[k: string]: string;
|
|
114
|
+
}>;
|
|
115
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined;
|
|
116
|
+
block: ContentBlock;
|
|
117
|
+
}) => JSX.Element | null;
|
|
5
118
|
declare function OverviewScaleBar({ model, children, }: {
|
|
6
119
|
model: LGV;
|
|
7
120
|
children: React.ReactNode;
|
|
8
121
|
}): JSX.Element;
|
|
9
122
|
declare const _default: typeof OverviewScaleBar;
|
|
10
123
|
export default _default;
|
|
124
|
+
export { Cytobands, Polygon };
|
|
@@ -6,12 +6,14 @@ export interface Option {
|
|
|
6
6
|
group?: string;
|
|
7
7
|
result: BaseResult;
|
|
8
8
|
}
|
|
9
|
-
declare function RefNameAutocomplete({ model, onSelect, assemblyName, style, value, TextFieldProps, }: {
|
|
9
|
+
declare function RefNameAutocomplete({ model, onSelect, assemblyName, style, fetchResults, value, minWidth, TextFieldProps, }: {
|
|
10
10
|
model: LinearGenomeViewModel;
|
|
11
11
|
onSelect: (region: BaseResult) => void;
|
|
12
12
|
assemblyName?: string;
|
|
13
13
|
value?: string;
|
|
14
|
+
fetchResults: (query: string) => Promise<BaseResult[]>;
|
|
14
15
|
style?: React.CSSProperties;
|
|
16
|
+
minWidth?: number;
|
|
15
17
|
TextFieldProps?: TFP;
|
|
16
18
|
}): JSX.Element;
|
|
17
19
|
declare const _default: typeof RefNameAutocomplete;
|
|
@@ -24,6 +24,7 @@ declare const _default: React.ForwardRefExoticComponent<{
|
|
|
24
24
|
trackSelectorType: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<"hierarchical">, [undefined]>;
|
|
25
25
|
trackLabels: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
26
26
|
showCenterLine: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
27
|
+
showCytobandsSetting: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
27
28
|
}> & {
|
|
28
29
|
width: number;
|
|
29
30
|
} & {
|
|
@@ -111,6 +112,7 @@ declare const _default: React.ForwardRefExoticComponent<{
|
|
|
111
112
|
assemblyName: string;
|
|
112
113
|
} | undefined;
|
|
113
114
|
} & {
|
|
115
|
+
setShowCytobands(flag: boolean): void;
|
|
114
116
|
setWidth(newWidth: number): void;
|
|
115
117
|
setError(error: Error | undefined): void;
|
|
116
118
|
toggleHeader(): void;
|
|
@@ -162,6 +164,11 @@ declare const _default: React.ForwardRefExoticComponent<{
|
|
|
162
164
|
slide: (viewWidths: number) => void;
|
|
163
165
|
} & {
|
|
164
166
|
zoom: (targetBpPerPx: number) => void;
|
|
167
|
+
} & {
|
|
168
|
+
readonly canShowCytobands: boolean;
|
|
169
|
+
readonly showCytobands: boolean;
|
|
170
|
+
readonly anyCytobandsExist: boolean;
|
|
171
|
+
readonly cytobandOffset: number;
|
|
165
172
|
} & {
|
|
166
173
|
menuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
167
174
|
readonly staticBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
@@ -213,6 +220,7 @@ declare const _default: React.ForwardRefExoticComponent<{
|
|
|
213
220
|
trackSelectorType: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<"hierarchical">, [undefined]>;
|
|
214
221
|
trackLabels: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
215
222
|
showCenterLine: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
223
|
+
showCytobandsSetting: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
216
224
|
}, {
|
|
217
225
|
width: number;
|
|
218
226
|
} & {
|
|
@@ -300,6 +308,7 @@ declare const _default: React.ForwardRefExoticComponent<{
|
|
|
300
308
|
assemblyName: string;
|
|
301
309
|
} | undefined;
|
|
302
310
|
} & {
|
|
311
|
+
setShowCytobands(flag: boolean): void;
|
|
303
312
|
setWidth(newWidth: number): void;
|
|
304
313
|
setError(error: Error | undefined): void;
|
|
305
314
|
toggleHeader(): void;
|
|
@@ -351,6 +360,11 @@ declare const _default: React.ForwardRefExoticComponent<{
|
|
|
351
360
|
slide: (viewWidths: number) => void;
|
|
352
361
|
} & {
|
|
353
362
|
zoom: (targetBpPerPx: number) => void;
|
|
363
|
+
} & {
|
|
364
|
+
readonly canShowCytobands: boolean;
|
|
365
|
+
readonly showCytobands: boolean;
|
|
366
|
+
readonly anyCytobandsExist: boolean;
|
|
367
|
+
readonly cytobandOffset: number;
|
|
354
368
|
} & {
|
|
355
369
|
menuItems(): import("@jbrowse/core/ui").MenuItem[];
|
|
356
370
|
readonly staticBlocks: import("@jbrowse/core/util/blockTypes").BlockSet;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import BaseResult from '@jbrowse/core/TextSearch/BaseResults';
|
|
2
|
-
export declare function dedupe(results
|
|
2
|
+
export declare function dedupe(results: BaseResult[] | undefined, cb: (result: BaseResult) => string): BaseResult[];
|
|
@@ -4,9 +4,8 @@ import BaseResult from '@jbrowse/core/TextSearch/BaseResults';
|
|
|
4
4
|
import { BlockSet, BaseBlock } from '@jbrowse/core/util/blockTypes';
|
|
5
5
|
import { Instance } from 'mobx-state-tree';
|
|
6
6
|
import PluginManager from '@jbrowse/core/PluginManager';
|
|
7
|
-
import { renderToSvg } from './components/
|
|
7
|
+
import { renderToSvg } from './components/LinearGenomeViewSvg';
|
|
8
8
|
import RefNameAutocomplete from './components/RefNameAutocomplete';
|
|
9
|
-
export { default as ReactComponent } from './components/LinearGenomeView';
|
|
10
9
|
export interface BpOffset {
|
|
11
10
|
refName?: string;
|
|
12
11
|
index: number;
|
|
@@ -56,6 +55,7 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
56
55
|
trackSelectorType: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<"hierarchical">, [undefined]>;
|
|
57
56
|
trackLabels: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
58
57
|
showCenterLine: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
58
|
+
showCytobandsSetting: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
59
59
|
}, {
|
|
60
60
|
width: number;
|
|
61
61
|
} & {
|
|
@@ -155,6 +155,7 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
155
155
|
assemblyName: string;
|
|
156
156
|
} | undefined;
|
|
157
157
|
} & {
|
|
158
|
+
setShowCytobands(flag: boolean): void;
|
|
158
159
|
setWidth(newWidth: number): void;
|
|
159
160
|
setError(error: Error | undefined): void;
|
|
160
161
|
toggleHeader(): void;
|
|
@@ -248,6 +249,11 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
248
249
|
slide: (viewWidths: number) => void;
|
|
249
250
|
} & {
|
|
250
251
|
zoom: (targetBpPerPx: number) => void;
|
|
252
|
+
} & {
|
|
253
|
+
readonly canShowCytobands: boolean;
|
|
254
|
+
readonly showCytobands: boolean;
|
|
255
|
+
readonly anyCytobandsExist: boolean;
|
|
256
|
+
readonly cytobandOffset: number;
|
|
251
257
|
} & {
|
|
252
258
|
menuItems(): MenuItem[];
|
|
253
259
|
readonly staticBlocks: BlockSet;
|
|
@@ -279,3 +285,4 @@ export declare function stateModelFactory(pluginManager: PluginManager): import(
|
|
|
279
285
|
export { renderToSvg, RefNameAutocomplete };
|
|
280
286
|
export declare type LinearGenomeViewStateModel = ReturnType<typeof stateModelFactory>;
|
|
281
287
|
export declare type LinearGenomeViewModel = Instance<LinearGenomeViewStateModel>;
|
|
288
|
+
export { default as ReactComponent } from './components/LinearGenomeView';
|