react-msaview 8.2.0 → 8.3.0
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/bundle/index.js +104 -117
- package/bundle/index.js.map +4 -4
- package/dist/columnCounts.d.ts +4 -3
- package/dist/columnCounts.js +11 -6
- package/dist/columnCounts.js.map +1 -1
- package/dist/components/CopyButton.d.ts +1 -1
- package/dist/components/CopyButton.js +1 -1
- package/dist/components/CopyButton.js.map +1 -1
- package/dist/components/DragHandle.js +14 -2
- package/dist/components/DragHandle.js.map +1 -1
- package/dist/components/Loading.js +10 -11
- package/dist/components/Loading.js.map +1 -1
- package/dist/components/MSAViewer.d.ts +12 -1
- package/dist/components/MSAViewer.js +12 -1
- package/dist/components/MSAViewer.js.map +1 -1
- package/dist/components/SequenceTextArea.d.ts +11 -0
- package/dist/components/SequenceTextArea.js +40 -8
- package/dist/components/SequenceTextArea.js.map +1 -1
- package/dist/components/StatusMessage.d.ts +12 -0
- package/dist/components/StatusMessage.js +43 -0
- package/dist/components/StatusMessage.js.map +1 -0
- package/dist/components/Track.js +3 -3
- package/dist/components/Track.js.map +1 -1
- package/dist/components/VerticalScrollbar.js +6 -1
- package/dist/components/VerticalScrollbar.js.map +1 -1
- package/dist/components/dialogs/ExportSVGDialog.d.ts +3 -2
- package/dist/components/dialogs/ExportSVGDialog.js +4 -2
- package/dist/components/dialogs/ExportSVGDialog.js.map +1 -1
- package/dist/components/dialogs/FeatureDialog.js +15 -10
- package/dist/components/dialogs/FeatureDialog.js.map +1 -1
- package/dist/components/getVisibleLeaves.d.ts +1 -1
- package/dist/components/header/FileMenu.js +9 -0
- package/dist/components/header/FileMenu.js.map +1 -1
- package/dist/components/header/GappynessSlider.js +15 -3
- package/dist/components/header/GappynessSlider.js.map +1 -1
- package/dist/components/header/Header.js +6 -7
- package/dist/components/header/Header.js.map +1 -1
- package/dist/components/header/{HeaderStatusArea.d.ts → RowSearch.d.ts} +2 -2
- package/dist/components/header/RowSearch.js +15 -0
- package/dist/components/header/RowSearch.js.map +1 -0
- package/dist/components/header/revealRow.d.ts +3 -0
- package/dist/components/header/revealRow.js +15 -0
- package/dist/components/header/revealRow.js.map +1 -0
- package/dist/components/header/settingsMenuItems.js +57 -1
- package/dist/components/header/settingsMenuItems.js.map +1 -1
- package/dist/components/import/ImportForm.js +10 -4
- package/dist/components/import/ImportForm.js.map +1 -1
- package/dist/components/import/ImportFormExamples.js +19 -27
- package/dist/components/import/ImportFormExamples.js.map +1 -1
- package/dist/components/minimap/Minimap.js +6 -1
- package/dist/components/minimap/Minimap.js.map +1 -1
- package/dist/components/msa/AnnotationLegend.js +11 -5
- package/dist/components/msa/AnnotationLegend.js.map +1 -1
- package/dist/components/msa/MSACanvas.js +6 -1
- package/dist/components/msa/MSACanvas.js.map +1 -1
- package/dist/components/msa/MSACanvasBlock.js +3 -7
- package/dist/components/msa/MSACanvasBlock.js.map +1 -1
- package/dist/components/msa/msaKeys.d.ts +5 -0
- package/dist/components/msa/msaKeys.js +35 -0
- package/dist/components/msa/msaKeys.js.map +1 -0
- package/dist/components/msa/useMsaBlockMouse.d.ts +2 -4
- package/dist/components/msa/useMsaBlockMouse.js +18 -5
- package/dist/components/msa/useMsaBlockMouse.js.map +1 -1
- package/dist/components/rowpanels/RowPanelBlock.js +10 -14
- package/dist/components/rowpanels/RowPanelBlock.js.map +1 -1
- package/dist/components/tracks/drawTracks.d.ts +1 -0
- package/dist/components/tracks/drawTracks.js +14 -2
- package/dist/components/tracks/drawTracks.js.map +1 -1
- package/dist/components/tracks/useTrackHover.d.ts +1 -5
- package/dist/components/tracks/useTrackHover.js +5 -5
- package/dist/components/tracks/useTrackHover.js.map +1 -1
- package/dist/components/tree/ScaleBarSVG.d.ts +14 -0
- package/dist/components/tree/ScaleBarSVG.js +11 -0
- package/dist/components/tree/ScaleBarSVG.js.map +1 -0
- package/dist/components/tree/TreeCanvas.js +8 -26
- package/dist/components/tree/TreeCanvas.js.map +1 -1
- package/dist/components/tree/TreeCanvasBlock.js +11 -20
- package/dist/components/tree/TreeCanvasBlock.js.map +1 -1
- package/dist/components/tree/{TreeBranchMenu.d.ts → TreeMenu.d.ts} +5 -4
- package/dist/components/tree/TreeMenu.js +48 -0
- package/dist/components/tree/TreeMenu.js.map +1 -0
- package/dist/components/tree/TreeRuler.js +3 -3
- package/dist/components/tree/TreeRuler.js.map +1 -1
- package/dist/components/tree/renderTreeCanvas.js +19 -9
- package/dist/components/tree/renderTreeCanvas.js.map +1 -1
- package/dist/components/tree/renderTreeMouseover.d.ts +5 -0
- package/dist/components/tree/renderTreeMouseover.js +20 -0
- package/dist/components/tree/renderTreeMouseover.js.map +1 -0
- package/dist/components/tree/useTreeHover.d.ts +3 -8
- package/dist/components/tree/useTreeHover.js +8 -10
- package/dist/components/tree/useTreeHover.js.map +1 -1
- package/dist/components/useHoverAnchor.d.ts +19 -0
- package/dist/components/useHoverAnchor.js +18 -0
- package/dist/components/useHoverAnchor.js.map +1 -0
- package/dist/constants.d.ts +4 -1
- package/dist/constants.js +12 -3
- package/dist/constants.js.map +1 -1
- package/dist/expandSpec.js +3 -3
- package/dist/expandSpec.js.map +1 -1
- package/dist/exportFileName.d.ts +3 -3
- package/dist/exportFileName.js +4 -4
- package/dist/exportFileName.js.map +1 -1
- package/dist/hierarchy.d.ts +51 -0
- package/dist/hierarchy.js +125 -0
- package/dist/hierarchy.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/model/treeModel.d.ts +12 -0
- package/dist/model/treeModel.js +14 -1
- package/dist/model/treeModel.js.map +1 -1
- package/dist/model.d.ts +168 -47
- package/dist/model.js +435 -192
- package/dist/model.js.map +1 -1
- package/dist/renderToSvg.js +2 -4
- package/dist/renderToSvg.js.map +1 -1
- package/dist/rerootTree.d.ts +33 -0
- package/dist/rerootTree.js +144 -0
- package/dist/rerootTree.js.map +1 -0
- package/dist/svgTestUtil.d.ts +106 -20
- package/dist/types.d.ts +25 -12
- package/dist/useMsaSvgFigure.d.ts +2 -1
- package/dist/useMsaSvgFigure.js +11 -4
- package/dist/useMsaSvgFigure.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/writeNewick.d.ts +8 -0
- package/dist/writeNewick.js +34 -0
- package/dist/writeNewick.js.map +1 -0
- package/package.json +3 -3
- package/src/columnCounts.ts +14 -6
- package/src/components/CopyButton.tsx +2 -2
- package/src/components/DragHandle.tsx +21 -1
- package/src/components/Loading.tsx +14 -30
- package/src/components/MSAViewer.tsx +26 -0
- package/src/components/SequenceTextArea.tsx +54 -8
- package/src/components/StatusMessage.tsx +70 -0
- package/src/components/Track.tsx +8 -4
- package/src/components/VerticalScrollbar.tsx +7 -0
- package/src/components/dialogs/ExportSVGDialog.tsx +5 -2
- package/src/components/dialogs/FeatureDialog.tsx +59 -38
- package/src/components/header/FileMenu.tsx +9 -0
- package/src/components/header/GappynessSlider.tsx +17 -4
- package/src/components/header/Header.tsx +7 -8
- package/src/components/header/RowSearch.tsx +34 -0
- package/src/components/header/revealRow.ts +17 -0
- package/src/components/header/settingsMenuItems.ts +66 -0
- package/src/components/import/ImportForm.tsx +14 -7
- package/src/components/import/ImportFormExamples.tsx +20 -28
- package/src/components/minimap/Minimap.tsx +7 -0
- package/src/components/msa/AnnotationLegend.tsx +12 -6
- package/src/components/msa/MSACanvas.tsx +8 -0
- package/src/components/msa/MSACanvasBlock.tsx +5 -11
- package/src/components/msa/msaKeys.ts +39 -0
- package/src/components/msa/useMsaBlockMouse.ts +23 -7
- package/src/components/rowpanels/RowPanelBlock.tsx +16 -23
- package/src/components/tracks/drawTracks.ts +15 -2
- package/src/components/tracks/useTrackHover.ts +5 -5
- package/src/components/tree/ScaleBarSVG.tsx +30 -0
- package/src/components/tree/TreeCanvas.tsx +9 -40
- package/src/components/tree/TreeCanvasBlock.tsx +19 -39
- package/src/components/tree/TreeMenu.tsx +129 -0
- package/src/components/tree/TreeRuler.tsx +7 -13
- package/src/components/tree/renderTreeCanvas.ts +20 -8
- package/src/components/tree/renderTreeMouseover.ts +41 -0
- package/src/components/tree/useTreeHover.ts +8 -17
- package/src/components/useHoverAnchor.ts +31 -0
- package/src/constants.ts +14 -3
- package/src/expandSpec.ts +3 -3
- package/src/exportFileName.ts +4 -3
- package/src/hierarchy.ts +151 -4
- package/src/index.ts +3 -1
- package/src/model/treeModel.ts +22 -0
- package/src/model.ts +534 -223
- package/src/renderToSvg.tsx +6 -9
- package/src/rerootTree.ts +172 -0
- package/src/types.ts +34 -12
- package/src/useMsaSvgFigure.ts +11 -4
- package/src/version.ts +1 -1
- package/src/writeNewick.ts +38 -0
- package/dist/components/PortalTooltip.d.ts +0 -11
- package/dist/components/PortalTooltip.js +0 -29
- package/dist/components/PortalTooltip.js.map +0 -1
- package/dist/components/header/HeaderStatusArea.js +0 -21
- package/dist/components/header/HeaderStatusArea.js.map +0 -1
- package/dist/components/tree/TreeBranchMenu.js +0 -29
- package/dist/components/tree/TreeBranchMenu.js.map +0 -1
- package/dist/components/tree/TreeNodeMenu.d.ts +0 -13
- package/dist/components/tree/TreeNodeMenu.js +0 -41
- package/dist/components/tree/TreeNodeMenu.js.map +0 -1
- package/src/components/PortalTooltip.tsx +0 -47
- package/src/components/header/HeaderStatusArea.tsx +0 -32
- package/src/components/tree/TreeBranchMenu.tsx +0 -68
- package/src/components/tree/TreeNodeMenu.tsx +0 -95
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
function preorder(root) {
|
|
2
|
+
const order = [];
|
|
3
|
+
const parents = new Map();
|
|
4
|
+
const stack = [root];
|
|
5
|
+
while (stack.length > 0) {
|
|
6
|
+
const node = stack.pop();
|
|
7
|
+
order.push(node);
|
|
8
|
+
for (const child of (node.children ?? [])) {
|
|
9
|
+
parents.set(child, node);
|
|
10
|
+
stack.push(child);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
return { order, parents };
|
|
14
|
+
}
|
|
15
|
+
function hasLengths(order) {
|
|
16
|
+
return order.some(n => n.length !== undefined);
|
|
17
|
+
}
|
|
18
|
+
// the root's two children make one branch of the unrooted tree, which is the
|
|
19
|
+
// branch a rerooting at either of them splits
|
|
20
|
+
function mergedSibling(root, target) {
|
|
21
|
+
return root.children?.length === 2
|
|
22
|
+
? root.children.find(c => c !== target)
|
|
23
|
+
: undefined;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The tree rooted on the branch above `target`, `offset` up from it, or at the
|
|
27
|
+
* middle of that branch without one. Where the root has two children, their
|
|
28
|
+
* branches are one branch of the unrooted tree, and `offset` runs across both.
|
|
29
|
+
*
|
|
30
|
+
* The nodes between `target` and the old root turn over. A name on one of them
|
|
31
|
+
* labels the branch above it, which is where a support value sits, so the name
|
|
32
|
+
* follows that branch to the node now at its lower end. A two-child root has
|
|
33
|
+
* nothing left to split once one child leaves, so it drops out and its
|
|
34
|
+
* branches join.
|
|
35
|
+
*/
|
|
36
|
+
export function rerootTree(root, target, offset) {
|
|
37
|
+
const { order, parents } = preorder(root);
|
|
38
|
+
if (!parents.has(target)) {
|
|
39
|
+
return root;
|
|
40
|
+
}
|
|
41
|
+
const lengths = hasLengths(order);
|
|
42
|
+
const sibling = parents.get(target) === root ? mergedSibling(root, target) : undefined;
|
|
43
|
+
const branch = (target.length ?? 0) + (sibling?.length ?? 0);
|
|
44
|
+
const at = Math.min(Math.max(offset ?? branch / 2, 0), branch);
|
|
45
|
+
const length = (n) => (lengths ? n : undefined);
|
|
46
|
+
const path = [target];
|
|
47
|
+
for (let n = parents.get(target); n; n = parents.get(n)) {
|
|
48
|
+
path.push(n);
|
|
49
|
+
}
|
|
50
|
+
// Built from the old root down, so the node each turned node now hangs
|
|
51
|
+
// `above` it already exists. undefined where the old root dropped out.
|
|
52
|
+
let above;
|
|
53
|
+
for (let i = path.length - 1; i >= 1; i--) {
|
|
54
|
+
const node = path[i];
|
|
55
|
+
const below = path[i - 1];
|
|
56
|
+
const children = node.children.filter(c => c !== below);
|
|
57
|
+
if (above) {
|
|
58
|
+
children.push(above);
|
|
59
|
+
}
|
|
60
|
+
if (children.length === 0) {
|
|
61
|
+
above = undefined;
|
|
62
|
+
}
|
|
63
|
+
else if (i === path.length - 1 && children.length === 1) {
|
|
64
|
+
const only = children[0];
|
|
65
|
+
above = {
|
|
66
|
+
...only,
|
|
67
|
+
length: length((only.length ?? 0) + (below.length ?? 0) - (i === 1 ? at : 0)),
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
above = {
|
|
72
|
+
...node,
|
|
73
|
+
name: i === 1 ? undefined : below.name,
|
|
74
|
+
children,
|
|
75
|
+
length: length((below.length ?? 0) - (i === 1 ? at : 0)),
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
children: [{ ...target, length: length(at) }, ...(above ? [above] : [])],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* The tree rooted halfway along the longest path between two tips, which is
|
|
85
|
+
* where a clock would put the root: the usual choice for the unrooted tree
|
|
86
|
+
* FastTree, IQ-TREE or neighbor joining writes. A tree with no branch lengths
|
|
87
|
+
* counts branches.
|
|
88
|
+
*/
|
|
89
|
+
export function midpointRoot(root) {
|
|
90
|
+
const { order, parents } = preorder(root);
|
|
91
|
+
const tips = order.filter(n => !n.children?.length);
|
|
92
|
+
if (tips.length < 2) {
|
|
93
|
+
return root;
|
|
94
|
+
}
|
|
95
|
+
const lengths = hasLengths(order);
|
|
96
|
+
const weight = (n) => (lengths ? (n.length ?? 0) : 1);
|
|
97
|
+
// distance from `from` to every node over the unrooted tree, and the
|
|
98
|
+
// neighbor each was reached through
|
|
99
|
+
function reach(from) {
|
|
100
|
+
const dist = new Map([[from, 0]]);
|
|
101
|
+
const via = new Map();
|
|
102
|
+
const stack = [from];
|
|
103
|
+
while (stack.length > 0) {
|
|
104
|
+
const node = stack.pop();
|
|
105
|
+
const d = dist.get(node);
|
|
106
|
+
const parent = parents.get(node);
|
|
107
|
+
if (parent && !dist.has(parent)) {
|
|
108
|
+
dist.set(parent, d + weight(node));
|
|
109
|
+
via.set(parent, node);
|
|
110
|
+
stack.push(parent);
|
|
111
|
+
}
|
|
112
|
+
for (const child of (node.children ?? [])) {
|
|
113
|
+
if (!dist.has(child)) {
|
|
114
|
+
dist.set(child, d + weight(child));
|
|
115
|
+
via.set(child, node);
|
|
116
|
+
stack.push(child);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return { dist, via };
|
|
121
|
+
}
|
|
122
|
+
function farthest(dist) {
|
|
123
|
+
return tips.reduce((best, tip) => dist.get(tip) > dist.get(best) ? tip : best);
|
|
124
|
+
}
|
|
125
|
+
const a = farthest(reach(tips[0]).dist);
|
|
126
|
+
const { dist, via } = reach(a);
|
|
127
|
+
const b = farthest(dist);
|
|
128
|
+
if (b === a) {
|
|
129
|
+
return root;
|
|
130
|
+
}
|
|
131
|
+
const half = dist.get(b) / 2;
|
|
132
|
+
let node = b;
|
|
133
|
+
let next = via.get(node);
|
|
134
|
+
while (dist.get(next) > half) {
|
|
135
|
+
node = next;
|
|
136
|
+
next = via.get(node);
|
|
137
|
+
}
|
|
138
|
+
// the midpoint lies on the branch between `node` and `next`, and whichever
|
|
139
|
+
// of them is the child carries that branch
|
|
140
|
+
return parents.get(node) === next
|
|
141
|
+
? rerootTree(root, node, dist.get(node) - half)
|
|
142
|
+
: rerootTree(root, next, half - dist.get(next));
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=rerootTree.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rerootTree.js","sourceRoot":"","sources":["../src/rerootTree.ts"],"names":[],"mappings":"AAeA,SAAS,QAAQ,CAAqB,IAAO;IAC3C,MAAM,KAAK,GAAQ,EAAE,CAAA;IACrB,MAAM,OAAO,GAAG,IAAI,GAAG,EAAQ,CAAA;IAC/B,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,CAAA;IACpB,OAAO,KAAK,CA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,CAAC;QAC9B,IAAI,GAAG,IAAI,CAAA;QACX,IAAI,GAAG,GAAG,CAAC,GAAG,CAAC,IAAI,CAAE,CAAA;IACvB,CAAC;IACD,2EAA2E;IAC3E,2CAA2C;IAC3C,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,IAAI;QAC/B,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAE,GAAG,IAAI,CAAC;QAChD,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAE,CAAC,CAAA;AACpD,CAAC"}
|
package/dist/svgTestUtil.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import MSAModelF from './model.ts';
|
|
2
2
|
type Snapshot = NonNullable<Parameters<ReturnType<typeof MSAModelF>['create']>[0]>;
|
|
3
3
|
export declare function installSvgTestEnv(contextExtras?: Partial<CanvasRenderingContext2D>): void;
|
|
4
|
-
export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?: number): import("@jbrowse/mobx-state-tree").ModelInstanceTypeProps<Omit<Omit<Omit<{}, "autoTreeAreaWidth" | "drawLabels" | "drawNodeBubbles" | "drawNodeLabels" | "drawTree" | "labelsAlignRight" | "overviewHeight" | "showBranchLen" | "showTreeOverview" | "treeAreaWidth" | "treeWidth"> & {
|
|
4
|
+
export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?: number): import("@jbrowse/mobx-state-tree").ModelInstanceTypeProps<Omit<Omit<Omit<{}, "autoTreeAreaWidth" | "drawLabels" | "drawNodeBubbles" | "drawNodeLabels" | "drawTree" | "labelsAlignRight" | "overviewHeight" | "showBranchLen" | "showTreeOverview" | "treeAreaWidth" | "treeOrder" | "treeWidth"> & {
|
|
5
5
|
drawLabels: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
6
6
|
labelsAlignRight: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
7
7
|
treeAreaWidth: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
8
8
|
treeWidth: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
9
9
|
showBranchLen: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
10
|
+
treeOrder: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<import("./types.ts").TreeOrder>, [undefined]>;
|
|
10
11
|
drawTree: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
11
12
|
drawNodeBubbles: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
12
13
|
drawNodeLabels: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
@@ -18,7 +19,7 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
18
19
|
colorSchemeName: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
19
20
|
showColumnStats: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
20
21
|
msaFormat: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<import("msa-parsers").MSAFormat>>;
|
|
21
|
-
}, "allowedGappyness" | "clades" | "colWidth" | "collapsed" | "columnTracks" | "currentAlignment" | "data" | "drawMsaLetters" | "encodings" | "gffFilehandle" | "height" | "hideGaps" | "highlightColumns" | "highlights" | "id" | "msaFilehandle" | "region" | "relativeTo" | "residueMappings" | "rowHeight" | "rowPanels" | "scrollX" | "scrollY" | "scrollZoom" | "scrollZoomAxis" | "showDomainLegend" | "showDomains" | "showOnly" | "subFeatureRows" | "trackHeights" | "treeFilehandle" | "treeMetadataFilehandle" | "turnedOffFeatures" | "turnedOffTracks" | "type"> & {
|
|
22
|
+
}, "allowedGappyness" | "clades" | "colWidth" | "collapsed" | "columnTracks" | "currentAlignment" | "data" | "drawMsaLetters" | "encodings" | "gffFilehandle" | "height" | "hideGaps" | "highlightColumns" | "highlights" | "id" | "msaFilehandle" | "region" | "relativeTo" | "residueMappings" | "rotated" | "rowHeight" | "rowPanels" | "scrollX" | "scrollY" | "scrollZoom" | "scrollZoomAxis" | "showDomainLegend" | "showDomains" | "showOnly" | "subFeatureRows" | "trackHeights" | "treeFilehandle" | "treeMetadataFilehandle" | "treeRoot" | "turnedOffFeatures" | "turnedOffTracks" | "type"> & {
|
|
22
23
|
id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
23
24
|
showDomains: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
24
25
|
showDomainLegend: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
@@ -412,6 +413,8 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
412
413
|
}>, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
|
|
413
414
|
currentAlignment: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
414
415
|
collapsed: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
416
|
+
rotated: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
417
|
+
treeRoot: import("@jbrowse/mobx-state-tree").IType<import("./types.ts").TreeRoot | undefined, import("./types.ts").TreeRoot | undefined, import("./types.ts").TreeRoot | undefined>;
|
|
415
418
|
showOnly: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
416
419
|
turnedOffTracks: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IMapType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>>, [undefined]>;
|
|
417
420
|
trackHeights: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IMapType<import("@jbrowse/mobx-state-tree").ISimpleType<number>>, [undefined]>;
|
|
@@ -453,6 +456,7 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
453
456
|
setDrawTree(arg: boolean): void;
|
|
454
457
|
setAutoTreeAreaWidth(arg: boolean): void;
|
|
455
458
|
setShowBranchLen(arg: boolean): void;
|
|
459
|
+
setTreeOrder(order: import("./types.ts").TreeOrder): void;
|
|
456
460
|
setDrawNodeBubbles(arg: boolean): void;
|
|
457
461
|
setDrawNodeLabels(arg: boolean): void;
|
|
458
462
|
setShowTreeOverview(arg: boolean): void;
|
|
@@ -489,7 +493,8 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
489
493
|
minimapHeight: number;
|
|
490
494
|
marginLeft: number;
|
|
491
495
|
error: unknown;
|
|
492
|
-
|
|
496
|
+
loadWarnings: string[];
|
|
497
|
+
dismissedWarnings: string[];
|
|
493
498
|
resetCount: number;
|
|
494
499
|
hostCarriesData: boolean;
|
|
495
500
|
annotations: import("msa-parsers").Annotation[];
|
|
@@ -504,7 +509,6 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
504
509
|
setHeight(height: number): void;
|
|
505
510
|
setError(error?: unknown): void;
|
|
506
511
|
addWarning(warning: string): void;
|
|
507
|
-
clearWarnings(): void;
|
|
508
512
|
setHostCarriesData(arg: boolean): void;
|
|
509
513
|
setMousePos(col?: number, row?: number): void;
|
|
510
514
|
setHighlightedColumns(columns?: number[]): void;
|
|
@@ -521,6 +525,9 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
521
525
|
setColWidth(n: number): void;
|
|
522
526
|
setCurrentAlignment(n: number): void;
|
|
523
527
|
toggleCollapsed(node: string): void;
|
|
528
|
+
toggleRotated(node: string): void;
|
|
529
|
+
clearRotated(): void;
|
|
530
|
+
setTreeRoot(treeRoot?: import("./types.ts").TreeRoot): void;
|
|
524
531
|
setShowOnly(node?: string): void;
|
|
525
532
|
setData(data: {
|
|
526
533
|
msa?: string;
|
|
@@ -567,6 +574,7 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
567
574
|
readonly rowFields: string[];
|
|
568
575
|
readonly MSA: import("msa-parsers").MSAParserType | null;
|
|
569
576
|
readonly numColumns: number;
|
|
577
|
+
readonly inputTree: import("./types.ts").NodeWithIds;
|
|
570
578
|
readonly tree: import("./types.ts").NodeWithIds;
|
|
571
579
|
readonly rowNames: string[];
|
|
572
580
|
readonly rowNamesSet: Map<string, number>;
|
|
@@ -579,6 +587,7 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
579
587
|
letters: string;
|
|
580
588
|
} | undefined;
|
|
581
589
|
readonly root: import("./hierarchy.ts").HierarchyNode<import("./types.ts").NodeWithIds>;
|
|
590
|
+
readonly treeNewick: string;
|
|
582
591
|
readonly treeOverviewHeight: number;
|
|
583
592
|
readonly treeOverviewLayout: {
|
|
584
593
|
root: import("./hierarchy.ts").HierarchyNode<import("./types.ts").NodeWithIds>;
|
|
@@ -618,9 +627,14 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
618
627
|
readonly conservation: number[];
|
|
619
628
|
readonly alphabetMaxBits: number;
|
|
620
629
|
readonly propertyConservation: number[];
|
|
621
|
-
readonly
|
|
630
|
+
readonly treeLayout: {
|
|
631
|
+
root: import("./hierarchy.ts").LaidOutNode<import("./types.ts").NodeWithIds>;
|
|
632
|
+
leaves: import("./hierarchy.ts").LaidOutNode<import("./types.ts").NodeWithIds>[];
|
|
633
|
+
rootToTipLength: number;
|
|
634
|
+
};
|
|
635
|
+
readonly hierarchy: import("./hierarchy.ts").HierarchyNode<import("./types.ts").NodeWithIds>;
|
|
622
636
|
readonly totalHeight: number;
|
|
623
|
-
readonly leaves: import("./hierarchy.ts").HierarchyNode<import("./types.ts").
|
|
637
|
+
readonly leaves: import("./hierarchy.ts").HierarchyNode<import("./types.ts").NodeWithIds>[];
|
|
624
638
|
readonly rootToTipLength: number;
|
|
625
639
|
readonly maxBranchLength: number;
|
|
626
640
|
readonly pxPerBranchLength: number;
|
|
@@ -646,7 +660,6 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
646
660
|
readonly labelWidthScale: number;
|
|
647
661
|
readonly labelsWidth: number;
|
|
648
662
|
readonly secondaryStructureConsensus: string | undefined;
|
|
649
|
-
readonly seqConsensus: string | undefined;
|
|
650
663
|
readonly secondaryStructureArcs: import("./types.ts").Arc[] | undefined;
|
|
651
664
|
readonly adapterTrackModels: import("./types.ts").BasicTrack[];
|
|
652
665
|
readonly basePairTrackModels: import("./types.ts").BasicTrack[];
|
|
@@ -660,6 +673,7 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
660
673
|
globalColToVisibleCol(globalCol: number): number | undefined;
|
|
661
674
|
visibleColToGlobalCol(visibleCol: number): number;
|
|
662
675
|
seqPosToGlobalCol(rowName: string, seqPos: number): number | undefined;
|
|
676
|
+
seqEndToGlobalCol(rowName: string, seqPos: number): number | undefined;
|
|
663
677
|
seqPosToVisibleCol(rowName: string, seqPos: number): number | undefined;
|
|
664
678
|
visibleSpan({ row, start: rawStart, end: rawEnd }: import("./types.ts").Region): {
|
|
665
679
|
startCol: number;
|
|
@@ -692,19 +706,26 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
692
706
|
readonly blocksX: number[];
|
|
693
707
|
readonly blocksY: number[];
|
|
694
708
|
} & {
|
|
709
|
+
readonly verticalScrollbarWidth: 0 | 20;
|
|
710
|
+
readonly msaCanvasWidth: number;
|
|
711
|
+
readonly maxScrollX: number;
|
|
695
712
|
readonly blocks2d: (readonly [number, number])[];
|
|
696
713
|
readonly isLoading: boolean;
|
|
697
|
-
readonly
|
|
714
|
+
readonly dataWarnings: string[];
|
|
715
|
+
readonly warnings: string[];
|
|
698
716
|
readonly maxScrollY: number;
|
|
699
717
|
readonly wheelZoomAxis: import("./constants.ts").ScrollZoomAxis;
|
|
700
718
|
} & {
|
|
701
719
|
setDrawMsaLetters(arg: boolean): void;
|
|
720
|
+
clearWarnings(): void;
|
|
702
721
|
setScrollZoom(arg: boolean): void;
|
|
703
722
|
setScrollZoomAxis(arg: import("./constants.ts").ScrollZoomAxis): void;
|
|
704
723
|
setHoveredTreeNode(nodeId?: string): void;
|
|
705
724
|
calculateNeighborJoiningTreeFromMSA(): void;
|
|
725
|
+
rerootAt(nodeId: string): void;
|
|
706
726
|
replaceTree(newick: string): void;
|
|
707
727
|
resetZoom(): void;
|
|
728
|
+
zoomAtCenter(scaleFactor: number, axis?: import("./constants.ts").ScrollZoomAxis): void;
|
|
708
729
|
zoomOutHorizontal(): void;
|
|
709
730
|
zoomInHorizontal(): void;
|
|
710
731
|
zoomInVertical(): void;
|
|
@@ -730,8 +751,6 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
730
751
|
onCancel?: () => void;
|
|
731
752
|
}): void;
|
|
732
753
|
} & {
|
|
733
|
-
readonly verticalScrollbarWidth: 0 | 20;
|
|
734
|
-
readonly msaCanvasWidth: number;
|
|
735
754
|
cellAt(visibleCol: number, rowIndex?: number): import("./types.ts").Cell;
|
|
736
755
|
readonly hoveredCell: import("./types.ts").Cell | undefined;
|
|
737
756
|
readonly clickedCell: import("./types.ts").Cell | undefined;
|
|
@@ -772,6 +791,26 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
772
791
|
rowData: Record<string, string> | undefined;
|
|
773
792
|
};
|
|
774
793
|
readonly resolvedEncodings: import("./types.ts").ResolvedEncoding[];
|
|
794
|
+
readonly rowPanelScales: ({
|
|
795
|
+
header: string;
|
|
796
|
+
legend: import("./types.ts").LegendEntry[];
|
|
797
|
+
legendTitle?: string;
|
|
798
|
+
kind: 'strip';
|
|
799
|
+
field: string;
|
|
800
|
+
colors: Map<string, string>;
|
|
801
|
+
} | {
|
|
802
|
+
header: string;
|
|
803
|
+
legend: import("./types.ts").LegendEntry[];
|
|
804
|
+
legendTitle?: string;
|
|
805
|
+
kind: 'features';
|
|
806
|
+
x: 'column' | 'position';
|
|
807
|
+
field?: string;
|
|
808
|
+
colors: Map<import("msa-parsers").Annotation, {
|
|
809
|
+
fill: string;
|
|
810
|
+
stroke: string;
|
|
811
|
+
}>;
|
|
812
|
+
labels?: Map<import("msa-parsers").Annotation, string>;
|
|
813
|
+
})[];
|
|
775
814
|
readonly resolvedRowPanels: import("./types.ts").ResolvedRowPanel[];
|
|
776
815
|
readonly featureAlignShifts: Map<string, Map<string, number>>;
|
|
777
816
|
readonly tipLabelColors: Map<string, string> | undefined;
|
|
@@ -784,18 +823,20 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
784
823
|
setTrackHeight(heightKey: string, height: number): void;
|
|
785
824
|
reset(): void;
|
|
786
825
|
exportSVG(opts: import("./renderToSvg.tsx").ExportSvgOptions): Promise<void>;
|
|
826
|
+
exportNewick(): void;
|
|
787
827
|
setFilter(accession: string, shown: boolean): void;
|
|
788
828
|
fit(): void;
|
|
789
829
|
fitVertically(): void;
|
|
790
830
|
zoomToRegion(region: import("./types.ts").Region): void;
|
|
791
831
|
fitHorizontally(): void;
|
|
792
832
|
afterCreate(): void;
|
|
793
|
-
} & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<Omit<Omit<Omit<{}, "autoTreeAreaWidth" | "drawLabels" | "drawNodeBubbles" | "drawNodeLabels" | "drawTree" | "labelsAlignRight" | "overviewHeight" | "showBranchLen" | "showTreeOverview" | "treeAreaWidth" | "treeWidth"> & {
|
|
833
|
+
} & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<Omit<Omit<Omit<{}, "autoTreeAreaWidth" | "drawLabels" | "drawNodeBubbles" | "drawNodeLabels" | "drawTree" | "labelsAlignRight" | "overviewHeight" | "showBranchLen" | "showTreeOverview" | "treeAreaWidth" | "treeOrder" | "treeWidth"> & {
|
|
794
834
|
drawLabels: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
795
835
|
labelsAlignRight: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
796
836
|
treeAreaWidth: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
797
837
|
treeWidth: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
798
838
|
showBranchLen: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
839
|
+
treeOrder: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<import("./types.ts").TreeOrder>, [undefined]>;
|
|
799
840
|
drawTree: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
800
841
|
drawNodeBubbles: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
801
842
|
drawNodeLabels: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
@@ -807,7 +848,7 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
807
848
|
colorSchemeName: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
808
849
|
showColumnStats: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
809
850
|
msaFormat: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<import("msa-parsers").MSAFormat>>;
|
|
810
|
-
}, "allowedGappyness" | "clades" | "colWidth" | "collapsed" | "columnTracks" | "currentAlignment" | "data" | "drawMsaLetters" | "encodings" | "gffFilehandle" | "height" | "hideGaps" | "highlightColumns" | "highlights" | "id" | "msaFilehandle" | "region" | "relativeTo" | "residueMappings" | "rowHeight" | "rowPanels" | "scrollX" | "scrollY" | "scrollZoom" | "scrollZoomAxis" | "showDomainLegend" | "showDomains" | "showOnly" | "subFeatureRows" | "trackHeights" | "treeFilehandle" | "treeMetadataFilehandle" | "turnedOffFeatures" | "turnedOffTracks" | "type"> & {
|
|
851
|
+
}, "allowedGappyness" | "clades" | "colWidth" | "collapsed" | "columnTracks" | "currentAlignment" | "data" | "drawMsaLetters" | "encodings" | "gffFilehandle" | "height" | "hideGaps" | "highlightColumns" | "highlights" | "id" | "msaFilehandle" | "region" | "relativeTo" | "residueMappings" | "rotated" | "rowHeight" | "rowPanels" | "scrollX" | "scrollY" | "scrollZoom" | "scrollZoomAxis" | "showDomainLegend" | "showDomains" | "showOnly" | "subFeatureRows" | "trackHeights" | "treeFilehandle" | "treeMetadataFilehandle" | "treeRoot" | "turnedOffFeatures" | "turnedOffTracks" | "type"> & {
|
|
811
852
|
id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
812
853
|
showDomains: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
813
854
|
showDomainLegend: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
@@ -1201,6 +1242,8 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
1201
1242
|
}>, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
|
|
1202
1243
|
currentAlignment: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
1203
1244
|
collapsed: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
1245
|
+
rotated: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
1246
|
+
treeRoot: import("@jbrowse/mobx-state-tree").IType<import("./types.ts").TreeRoot | undefined, import("./types.ts").TreeRoot | undefined, import("./types.ts").TreeRoot | undefined>;
|
|
1204
1247
|
showOnly: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
1205
1248
|
turnedOffTracks: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IMapType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>>, [undefined]>;
|
|
1206
1249
|
trackHeights: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IMapType<import("@jbrowse/mobx-state-tree").ISimpleType<number>>, [undefined]>;
|
|
@@ -1242,6 +1285,7 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
1242
1285
|
setDrawTree(arg: boolean): void;
|
|
1243
1286
|
setAutoTreeAreaWidth(arg: boolean): void;
|
|
1244
1287
|
setShowBranchLen(arg: boolean): void;
|
|
1288
|
+
setTreeOrder(order: import("./types.ts").TreeOrder): void;
|
|
1245
1289
|
setDrawNodeBubbles(arg: boolean): void;
|
|
1246
1290
|
setDrawNodeLabels(arg: boolean): void;
|
|
1247
1291
|
setShowTreeOverview(arg: boolean): void;
|
|
@@ -1278,7 +1322,8 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
1278
1322
|
minimapHeight: number;
|
|
1279
1323
|
marginLeft: number;
|
|
1280
1324
|
error: unknown;
|
|
1281
|
-
|
|
1325
|
+
loadWarnings: string[];
|
|
1326
|
+
dismissedWarnings: string[];
|
|
1282
1327
|
resetCount: number;
|
|
1283
1328
|
hostCarriesData: boolean;
|
|
1284
1329
|
annotations: import("msa-parsers").Annotation[];
|
|
@@ -1293,7 +1338,6 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
1293
1338
|
setHeight(height: number): void;
|
|
1294
1339
|
setError(error?: unknown): void;
|
|
1295
1340
|
addWarning(warning: string): void;
|
|
1296
|
-
clearWarnings(): void;
|
|
1297
1341
|
setHostCarriesData(arg: boolean): void;
|
|
1298
1342
|
setMousePos(col?: number, row?: number): void;
|
|
1299
1343
|
setHighlightedColumns(columns?: number[]): void;
|
|
@@ -1310,6 +1354,9 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
1310
1354
|
setColWidth(n: number): void;
|
|
1311
1355
|
setCurrentAlignment(n: number): void;
|
|
1312
1356
|
toggleCollapsed(node: string): void;
|
|
1357
|
+
toggleRotated(node: string): void;
|
|
1358
|
+
clearRotated(): void;
|
|
1359
|
+
setTreeRoot(treeRoot?: import("./types.ts").TreeRoot): void;
|
|
1313
1360
|
setShowOnly(node?: string): void;
|
|
1314
1361
|
setData(data: {
|
|
1315
1362
|
msa?: string;
|
|
@@ -1356,6 +1403,7 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
1356
1403
|
readonly rowFields: string[];
|
|
1357
1404
|
readonly MSA: import("msa-parsers").MSAParserType | null;
|
|
1358
1405
|
readonly numColumns: number;
|
|
1406
|
+
readonly inputTree: import("./types.ts").NodeWithIds;
|
|
1359
1407
|
readonly tree: import("./types.ts").NodeWithIds;
|
|
1360
1408
|
readonly rowNames: string[];
|
|
1361
1409
|
readonly rowNamesSet: Map<string, number>;
|
|
@@ -1368,6 +1416,7 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
1368
1416
|
letters: string;
|
|
1369
1417
|
} | undefined;
|
|
1370
1418
|
readonly root: import("./hierarchy.ts").HierarchyNode<import("./types.ts").NodeWithIds>;
|
|
1419
|
+
readonly treeNewick: string;
|
|
1371
1420
|
readonly treeOverviewHeight: number;
|
|
1372
1421
|
readonly treeOverviewLayout: {
|
|
1373
1422
|
root: import("./hierarchy.ts").HierarchyNode<import("./types.ts").NodeWithIds>;
|
|
@@ -1407,9 +1456,14 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
1407
1456
|
readonly conservation: number[];
|
|
1408
1457
|
readonly alphabetMaxBits: number;
|
|
1409
1458
|
readonly propertyConservation: number[];
|
|
1410
|
-
readonly
|
|
1459
|
+
readonly treeLayout: {
|
|
1460
|
+
root: import("./hierarchy.ts").LaidOutNode<import("./types.ts").NodeWithIds>;
|
|
1461
|
+
leaves: import("./hierarchy.ts").LaidOutNode<import("./types.ts").NodeWithIds>[];
|
|
1462
|
+
rootToTipLength: number;
|
|
1463
|
+
};
|
|
1464
|
+
readonly hierarchy: import("./hierarchy.ts").HierarchyNode<import("./types.ts").NodeWithIds>;
|
|
1411
1465
|
readonly totalHeight: number;
|
|
1412
|
-
readonly leaves: import("./hierarchy.ts").HierarchyNode<import("./types.ts").
|
|
1466
|
+
readonly leaves: import("./hierarchy.ts").HierarchyNode<import("./types.ts").NodeWithIds>[];
|
|
1413
1467
|
readonly rootToTipLength: number;
|
|
1414
1468
|
readonly maxBranchLength: number;
|
|
1415
1469
|
readonly pxPerBranchLength: number;
|
|
@@ -1435,7 +1489,6 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
1435
1489
|
readonly labelWidthScale: number;
|
|
1436
1490
|
readonly labelsWidth: number;
|
|
1437
1491
|
readonly secondaryStructureConsensus: string | undefined;
|
|
1438
|
-
readonly seqConsensus: string | undefined;
|
|
1439
1492
|
readonly secondaryStructureArcs: import("./types.ts").Arc[] | undefined;
|
|
1440
1493
|
readonly adapterTrackModels: import("./types.ts").BasicTrack[];
|
|
1441
1494
|
readonly basePairTrackModels: import("./types.ts").BasicTrack[];
|
|
@@ -1449,6 +1502,7 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
1449
1502
|
globalColToVisibleCol(globalCol: number): number | undefined;
|
|
1450
1503
|
visibleColToGlobalCol(visibleCol: number): number;
|
|
1451
1504
|
seqPosToGlobalCol(rowName: string, seqPos: number): number | undefined;
|
|
1505
|
+
seqEndToGlobalCol(rowName: string, seqPos: number): number | undefined;
|
|
1452
1506
|
seqPosToVisibleCol(rowName: string, seqPos: number): number | undefined;
|
|
1453
1507
|
visibleSpan({ row, start: rawStart, end: rawEnd }: import("./types.ts").Region): {
|
|
1454
1508
|
startCol: number;
|
|
@@ -1481,19 +1535,26 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
1481
1535
|
readonly blocksX: number[];
|
|
1482
1536
|
readonly blocksY: number[];
|
|
1483
1537
|
} & {
|
|
1538
|
+
readonly verticalScrollbarWidth: 0 | 20;
|
|
1539
|
+
readonly msaCanvasWidth: number;
|
|
1540
|
+
readonly maxScrollX: number;
|
|
1484
1541
|
readonly blocks2d: (readonly [number, number])[];
|
|
1485
1542
|
readonly isLoading: boolean;
|
|
1486
|
-
readonly
|
|
1543
|
+
readonly dataWarnings: string[];
|
|
1544
|
+
readonly warnings: string[];
|
|
1487
1545
|
readonly maxScrollY: number;
|
|
1488
1546
|
readonly wheelZoomAxis: import("./constants.ts").ScrollZoomAxis;
|
|
1489
1547
|
} & {
|
|
1490
1548
|
setDrawMsaLetters(arg: boolean): void;
|
|
1549
|
+
clearWarnings(): void;
|
|
1491
1550
|
setScrollZoom(arg: boolean): void;
|
|
1492
1551
|
setScrollZoomAxis(arg: import("./constants.ts").ScrollZoomAxis): void;
|
|
1493
1552
|
setHoveredTreeNode(nodeId?: string): void;
|
|
1494
1553
|
calculateNeighborJoiningTreeFromMSA(): void;
|
|
1554
|
+
rerootAt(nodeId: string): void;
|
|
1495
1555
|
replaceTree(newick: string): void;
|
|
1496
1556
|
resetZoom(): void;
|
|
1557
|
+
zoomAtCenter(scaleFactor: number, axis?: import("./constants.ts").ScrollZoomAxis): void;
|
|
1497
1558
|
zoomOutHorizontal(): void;
|
|
1498
1559
|
zoomInHorizontal(): void;
|
|
1499
1560
|
zoomInVertical(): void;
|
|
@@ -1519,8 +1580,6 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
1519
1580
|
onCancel?: () => void;
|
|
1520
1581
|
}): void;
|
|
1521
1582
|
} & {
|
|
1522
|
-
readonly verticalScrollbarWidth: 0 | 20;
|
|
1523
|
-
readonly msaCanvasWidth: number;
|
|
1524
1583
|
cellAt(visibleCol: number, rowIndex?: number): import("./types.ts").Cell;
|
|
1525
1584
|
readonly hoveredCell: import("./types.ts").Cell | undefined;
|
|
1526
1585
|
readonly clickedCell: import("./types.ts").Cell | undefined;
|
|
@@ -1561,6 +1620,26 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
1561
1620
|
rowData: Record<string, string> | undefined;
|
|
1562
1621
|
};
|
|
1563
1622
|
readonly resolvedEncodings: import("./types.ts").ResolvedEncoding[];
|
|
1623
|
+
readonly rowPanelScales: ({
|
|
1624
|
+
header: string;
|
|
1625
|
+
legend: import("./types.ts").LegendEntry[];
|
|
1626
|
+
legendTitle?: string;
|
|
1627
|
+
kind: 'strip';
|
|
1628
|
+
field: string;
|
|
1629
|
+
colors: Map<string, string>;
|
|
1630
|
+
} | {
|
|
1631
|
+
header: string;
|
|
1632
|
+
legend: import("./types.ts").LegendEntry[];
|
|
1633
|
+
legendTitle?: string;
|
|
1634
|
+
kind: 'features';
|
|
1635
|
+
x: 'column' | 'position';
|
|
1636
|
+
field?: string;
|
|
1637
|
+
colors: Map<import("msa-parsers").Annotation, {
|
|
1638
|
+
fill: string;
|
|
1639
|
+
stroke: string;
|
|
1640
|
+
}>;
|
|
1641
|
+
labels?: Map<import("msa-parsers").Annotation, string>;
|
|
1642
|
+
})[];
|
|
1564
1643
|
readonly resolvedRowPanels: import("./types.ts").ResolvedRowPanel[];
|
|
1565
1644
|
readonly featureAlignShifts: Map<string, Map<string, number>>;
|
|
1566
1645
|
readonly tipLabelColors: Map<string, string> | undefined;
|
|
@@ -1573,6 +1652,7 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
1573
1652
|
setTrackHeight(heightKey: string, height: number): void;
|
|
1574
1653
|
reset(): void;
|
|
1575
1654
|
exportSVG(opts: import("./renderToSvg.tsx").ExportSvgOptions): Promise<void>;
|
|
1655
|
+
exportNewick(): void;
|
|
1576
1656
|
setFilter(accession: string, shown: boolean): void;
|
|
1577
1657
|
fit(): void;
|
|
1578
1658
|
fitVertically(): void;
|
|
@@ -1589,6 +1669,7 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
1589
1669
|
treeAreaWidth: number;
|
|
1590
1670
|
treeWidth: number;
|
|
1591
1671
|
showBranchLen: boolean;
|
|
1672
|
+
treeOrder: import("./types.ts").TreeOrder;
|
|
1592
1673
|
drawTree: boolean;
|
|
1593
1674
|
drawNodeBubbles: boolean;
|
|
1594
1675
|
drawNodeLabels: boolean;
|
|
@@ -1693,6 +1774,8 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
1693
1774
|
} | undefined;
|
|
1694
1775
|
currentAlignment: number;
|
|
1695
1776
|
collapsed: string[];
|
|
1777
|
+
rotated: string[];
|
|
1778
|
+
treeRoot: import("./types.ts").TreeRoot | undefined;
|
|
1696
1779
|
showOnly: string | undefined;
|
|
1697
1780
|
turnedOffTracks: import("mobx").IKeyValueMap<boolean>;
|
|
1698
1781
|
trackHeights: import("mobx").IKeyValueMap<number>;
|
|
@@ -1721,6 +1804,7 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
1721
1804
|
treeAreaWidth: number;
|
|
1722
1805
|
treeWidth: number;
|
|
1723
1806
|
showBranchLen: boolean;
|
|
1807
|
+
treeOrder: import("./types.ts").TreeOrder;
|
|
1724
1808
|
drawTree: boolean;
|
|
1725
1809
|
drawNodeBubbles: boolean;
|
|
1726
1810
|
drawNodeLabels: boolean;
|
|
@@ -1825,6 +1909,8 @@ export declare function createTestModel(snapshot: Omit<Snapshot, 'type'>, width?
|
|
|
1825
1909
|
} | undefined;
|
|
1826
1910
|
currentAlignment: number;
|
|
1827
1911
|
collapsed: string[];
|
|
1912
|
+
rotated: string[];
|
|
1913
|
+
treeRoot: import("./types.ts").TreeRoot | undefined;
|
|
1828
1914
|
showOnly: string | undefined;
|
|
1829
1915
|
turnedOffTracks: import("mobx").IKeyValueMap<boolean>;
|
|
1830
1916
|
trackHeights: import("mobx").IKeyValueMap<number>;
|
package/dist/types.d.ts
CHANGED
|
@@ -269,10 +269,27 @@ export interface Highlight {
|
|
|
269
269
|
/**
|
|
270
270
|
* What the viewer draws over a clade. `highlight` fills the rows behind it,
|
|
271
271
|
* across the tree and the alignment. `bracket` draws a bar and the clade's
|
|
272
|
-
* `label` in the gutter right of the tip labels. `collapse
|
|
273
|
-
* the collapsed list
|
|
272
|
+
* `label` in the gutter right of the tip labels. `collapse`, `focus` and
|
|
273
|
+
* `rotate` seed the collapsed list, the subtree in focus and the rotated nodes
|
|
274
|
+
* at load.
|
|
274
275
|
*/
|
|
275
|
-
export type CladeMark = 'highlight' | 'bracket' | 'collapse' | 'focus';
|
|
276
|
+
export type CladeMark = 'highlight' | 'bracket' | 'collapse' | 'focus' | 'rotate';
|
|
277
|
+
/**
|
|
278
|
+
* The order each node's children draw in, top to bottom. `branchLength` puts
|
|
279
|
+
* the shortest branch first, `input` keeps the file's order, `ladderize` puts
|
|
280
|
+
* the clade with the fewest tips first, so the deep clades step down toward
|
|
281
|
+
* the bottom, and `ladderizeReverse` puts the one with the most tips first.
|
|
282
|
+
*/
|
|
283
|
+
export type TreeOrder = 'branchLength' | 'input' | 'ladderize' | 'ladderizeReverse';
|
|
284
|
+
/**
|
|
285
|
+
* Where the tree is rooted: `midpoint` halfway along the longest path between
|
|
286
|
+
* two tips, and `{outgroup}` on the branch above those tips' most recent common
|
|
287
|
+
* ancestor, or above the rest of the tips' where the outgroup straddles the
|
|
288
|
+
* root the file gives.
|
|
289
|
+
*/
|
|
290
|
+
export type TreeRoot = 'midpoint' | {
|
|
291
|
+
outgroup: string[];
|
|
292
|
+
};
|
|
276
293
|
/**
|
|
277
294
|
* A clade of the tree and the mark drawn over it. `mrca` names tips whose most
|
|
278
295
|
* recent common ancestor is the clade; `range` names the first and last tip of
|
|
@@ -316,8 +333,9 @@ export interface Region {
|
|
|
316
333
|
/**
|
|
317
334
|
* A cell of the alignment in the host's coordinates, 1-based like Highlight:
|
|
318
335
|
* `column` counts every column of the file, hidden gappy ones included, and
|
|
319
|
-
* `residue` counts the row's own letters, absent on a gap.
|
|
320
|
-
*
|
|
336
|
+
* `residue` counts the row's own letters, absent on a gap. `letter` is the
|
|
337
|
+
* character in the cell, the gap character (`-` or `.`) on a gap. A pointer
|
|
338
|
+
* over a track has a column and no row.
|
|
321
339
|
*/
|
|
322
340
|
export interface Cell {
|
|
323
341
|
column: number;
|
|
@@ -369,10 +387,5 @@ export interface NodeWithIds {
|
|
|
369
387
|
length?: number;
|
|
370
388
|
noTree?: boolean;
|
|
371
389
|
}
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
name: string;
|
|
375
|
-
children: NodeWithIdsAndLength[];
|
|
376
|
-
noTree?: boolean;
|
|
377
|
-
length: number;
|
|
378
|
-
}
|
|
390
|
+
/** @deprecated the same type as `NodeWithIds` */
|
|
391
|
+
export type NodeWithIdsAndLength = NodeWithIds;
|
|
@@ -8,7 +8,8 @@ export interface MsaSvgFigure {
|
|
|
8
8
|
/**
|
|
9
9
|
* The viewer's SVG export of its viewport, as markup for the page to insert.
|
|
10
10
|
* It redraws after the view settles: `delay` ms after the last scroll, zoom,
|
|
11
|
-
* resize or change to the snapshot. A draw a later one overtakes is
|
|
11
|
+
* resize, highlight or change to the snapshot. A draw a later one overtakes is
|
|
12
|
+
* dropped.
|
|
12
13
|
*
|
|
13
14
|
* The figure's row names and letters are SVG text, so the browser's find
|
|
14
15
|
* locates them, a reader can select them, and print stylesheets apply.
|