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
package/dist/model.d.ts
CHANGED
|
@@ -2,11 +2,13 @@ import type { ColumnStats } from './columnStats.ts';
|
|
|
2
2
|
import type { ScrollZoomAxis } from './constants.ts';
|
|
3
3
|
import type { HierarchyNode } from './hierarchy.ts';
|
|
4
4
|
import type { ExportSvgOptions } from './renderToSvg.tsx';
|
|
5
|
-
import type { Annotation, Arc, BasicTrack, Cell, Clade, ResidueMappingProblem, ColumnTrackSpec, DomainBand, Encoding, Highlight, Legend, NodeWithIds,
|
|
5
|
+
import type { Annotation, Arc, BasicTrack, Cell, Clade, ResidueMappingProblem, ColumnTrackSpec, DomainBand, Encoding, Highlight, Legend, NodeWithIds, Region, ResidueMapping, ResolvedClade, ResolvedEncoding, ResolvedFeaturePanel, ResolvedHighlight, TreeOrder, TreeRoot, ResolvedRowPanel, ResolvedStripPanel, RowPanelSpec, RowResidue, StructureResidue, TrackKind, UnshareableData, Viewport } from './types.ts';
|
|
6
6
|
import type { FileLocation as FileLocationType } from '@jbrowse/core/util/types';
|
|
7
7
|
import type { Instance } from '@jbrowse/mobx-state-tree';
|
|
8
8
|
import type { InterProScanResults } from 'msa-parsers';
|
|
9
9
|
export declare const defaultTrackHeights: Partial<Record<TrackKind, number>>;
|
|
10
|
+
type StripPanelScale = Omit<ResolvedStripPanel, 'id' | 'width' | 'offsetX'>;
|
|
11
|
+
type FeaturePanelScale = Omit<ResolvedFeaturePanel, 'id' | 'width' | 'offsetX' | 'spans'>;
|
|
10
12
|
/**
|
|
11
13
|
* The snapshot properties reset() carries across a return to the import form:
|
|
12
14
|
* display preferences and layout, nothing derived from the loaded file.
|
|
@@ -40,12 +42,13 @@ export declare const preservedOnReset: Set<string>;
|
|
|
40
42
|
* root.view.setData({ msa: '>seq1\nACGT\n>seq2\nACGT' })
|
|
41
43
|
* ```
|
|
42
44
|
*/
|
|
43
|
-
declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelType<Omit<Omit<Omit<{}, "autoTreeAreaWidth" | "drawLabels" | "drawNodeBubbles" | "drawNodeLabels" | "drawTree" | "labelsAlignRight" | "overviewHeight" | "showBranchLen" | "showTreeOverview" | "treeAreaWidth" | "treeWidth"> & {
|
|
45
|
+
declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelType<Omit<Omit<Omit<{}, "autoTreeAreaWidth" | "drawLabels" | "drawNodeBubbles" | "drawNodeLabels" | "drawTree" | "labelsAlignRight" | "overviewHeight" | "showBranchLen" | "showTreeOverview" | "treeAreaWidth" | "treeOrder" | "treeWidth"> & {
|
|
44
46
|
drawLabels: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
45
47
|
labelsAlignRight: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
46
48
|
treeAreaWidth: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
47
49
|
treeWidth: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
48
50
|
showBranchLen: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
51
|
+
treeOrder: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<TreeOrder>, [undefined]>;
|
|
49
52
|
drawTree: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
50
53
|
drawNodeBubbles: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
51
54
|
drawNodeLabels: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
@@ -57,7 +60,7 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
57
60
|
colorSchemeName: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
58
61
|
showColumnStats: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
59
62
|
msaFormat: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<import("msa-parsers").MSAFormat>>;
|
|
60
|
-
}, "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"> & {
|
|
63
|
+
}, "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"> & {
|
|
61
64
|
/**
|
|
62
65
|
* #property
|
|
63
66
|
* id of view, randomly generated if not provided
|
|
@@ -533,6 +536,20 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
533
536
|
* hidden)
|
|
534
537
|
*/
|
|
535
538
|
collapsed: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
539
|
+
/**
|
|
540
|
+
* #property
|
|
541
|
+
* tree nodes whose children draw in reverse order, which is ggtree's
|
|
542
|
+
* `rotate`: the same tree, with the clades on either side of the node
|
|
543
|
+
* swapped
|
|
544
|
+
*/
|
|
545
|
+
rotated: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
546
|
+
/**
|
|
547
|
+
* #property
|
|
548
|
+
* where the tree is rooted: `midpoint` roots it halfway along the
|
|
549
|
+
* longest path between two tips, `{outgroup}` on the branch above
|
|
550
|
+
* the tips named, and undefined keeps the file's root
|
|
551
|
+
*/
|
|
552
|
+
treeRoot: import("@jbrowse/mobx-state-tree").IType<TreeRoot | undefined, TreeRoot | undefined, TreeRoot | undefined>;
|
|
536
553
|
/**
|
|
537
554
|
* #property
|
|
538
555
|
* focus on particular subtree
|
|
@@ -629,7 +646,8 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
629
646
|
* clades of the tree with a mark drawn over them. `mrca` names tips
|
|
630
647
|
* whose common ancestor is the clade, or `range` its first and last
|
|
631
648
|
* tip in display order, and `tips` is the leaf count the producer
|
|
632
|
-
* measured. `mark` is `highlight`, `bracket`, `collapse` or
|
|
649
|
+
* measured. `mark` is `highlight`, `bracket`, `collapse`, `focus` or
|
|
650
|
+
* `rotate`.
|
|
633
651
|
* See docs/layers.md
|
|
634
652
|
*/
|
|
635
653
|
clades: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<Clade, Clade, Clade>>, [undefined]>;
|
|
@@ -664,6 +682,7 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
664
682
|
setDrawTree(arg: boolean): void;
|
|
665
683
|
setAutoTreeAreaWidth(arg: boolean): void;
|
|
666
684
|
setShowBranchLen(arg: boolean): void;
|
|
685
|
+
setTreeOrder(order: TreeOrder): void;
|
|
667
686
|
setDrawNodeBubbles(arg: boolean): void;
|
|
668
687
|
setDrawNodeLabels(arg: boolean): void;
|
|
669
688
|
setShowTreeOverview(arg: boolean): void;
|
|
@@ -774,9 +793,15 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
774
793
|
* #volatile
|
|
775
794
|
* non-fatal load problems: an optional layer that failed to load, an
|
|
776
795
|
* overlay that failed to parse. `error` replaces the view and is for the
|
|
777
|
-
* alignment itself
|
|
796
|
+
* alignment itself. `warnings` adds the ones derived from the data
|
|
778
797
|
*/
|
|
779
|
-
|
|
798
|
+
loadWarnings: string[];
|
|
799
|
+
/**
|
|
800
|
+
* #volatile
|
|
801
|
+
* derived warnings the user dismissed, which stay hidden while the data
|
|
802
|
+
* behind them holds
|
|
803
|
+
*/
|
|
804
|
+
dismissedWarnings: string[];
|
|
780
805
|
/**
|
|
781
806
|
* #volatile
|
|
782
807
|
* bumped by reset(). The error boundary above the view uses it as its key,
|
|
@@ -846,10 +871,6 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
846
871
|
* that failed to parse. A message already on the list is not added again
|
|
847
872
|
*/
|
|
848
873
|
addWarning(warning: string): void;
|
|
849
|
-
/**
|
|
850
|
-
* #action
|
|
851
|
-
*/
|
|
852
|
-
clearWarnings(): void;
|
|
853
874
|
/**
|
|
854
875
|
* #action
|
|
855
876
|
* declare that this host restores the loaded documents itself, which
|
|
@@ -930,8 +951,9 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
930
951
|
/**
|
|
931
952
|
* #action
|
|
932
953
|
* switch to another alignment of a multi-alignment file (Stockholm).
|
|
933
|
-
* Clears the collapsed node ids, the subtree in focus, the
|
|
934
|
-
* and the scroll position, which all refer to the
|
|
954
|
+
* Clears the collapsed and rotated node ids, the subtree in focus, the
|
|
955
|
+
* reference row and the scroll position, which all refer to the
|
|
956
|
+
* previous alignment
|
|
935
957
|
*/
|
|
936
958
|
setCurrentAlignment(n: number): void;
|
|
937
959
|
/**
|
|
@@ -939,6 +961,21 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
939
961
|
* collapse or un-collapse the subtree rooted at the given tree node id
|
|
940
962
|
*/
|
|
941
963
|
toggleCollapsed(node: string): void;
|
|
964
|
+
/**
|
|
965
|
+
* #action
|
|
966
|
+
* reverse the order of the given node's children, or restore it
|
|
967
|
+
*/
|
|
968
|
+
toggleRotated(node: string): void;
|
|
969
|
+
/**
|
|
970
|
+
* #action
|
|
971
|
+
*/
|
|
972
|
+
clearRotated(): void;
|
|
973
|
+
/**
|
|
974
|
+
* #action
|
|
975
|
+
* reroot the tree. Clears `collapsed`, `rotated` and `showOnly`, whose
|
|
976
|
+
* path-derived node ids name other nodes in the rerooted tree
|
|
977
|
+
*/
|
|
978
|
+
setTreeRoot(treeRoot?: TreeRoot): void;
|
|
942
979
|
/**
|
|
943
980
|
* #action
|
|
944
981
|
* show only the subtree rooted at the given node id (pass undefined to
|
|
@@ -1058,12 +1095,13 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1058
1095
|
* from disk or pasted in becomes inline text, and DataModel drops an
|
|
1059
1096
|
* inline document past `maxInlineSnapshotBytes`.
|
|
1060
1097
|
*
|
|
1061
|
-
* The header lists these, and the standalone app
|
|
1062
|
-
* address bar while the list is non-empty
|
|
1063
|
-
*
|
|
1064
|
-
*
|
|
1098
|
+
* The header lists these, and the standalone app drops `?data=` from
|
|
1099
|
+
* the address bar while the list is non-empty or the encoded link would
|
|
1100
|
+
* pass 8,000 characters, so a copied link never opens an empty viewer
|
|
1101
|
+
* unannounced. A document fetched from a URL never appears here, since
|
|
1102
|
+
* the snapshot keeps its filehandle.
|
|
1065
1103
|
*
|
|
1066
|
-
* Empty when `
|
|
1104
|
+
* Empty when `hostCarriesData` is true.
|
|
1067
1105
|
*/
|
|
1068
1106
|
readonly unshareableData: UnshareableData[];
|
|
1069
1107
|
menuItems(): never[];
|
|
@@ -1098,6 +1136,14 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1098
1136
|
readonly numColumns: number;
|
|
1099
1137
|
/**
|
|
1100
1138
|
* #getter
|
|
1139
|
+
* the tree the file or the alignment gives, before `treeRoot`
|
|
1140
|
+
*/
|
|
1141
|
+
readonly inputTree: NodeWithIds;
|
|
1142
|
+
/**
|
|
1143
|
+
* #getter
|
|
1144
|
+
* the tree as the file or the alignment gives it, rerooted where
|
|
1145
|
+
* `treeRoot` asks. Every node id, and so `collapsed`, `rotated` and
|
|
1146
|
+
* `showOnly`, refers to this tree.
|
|
1101
1147
|
*/
|
|
1102
1148
|
readonly tree: NodeWithIds;
|
|
1103
1149
|
/**
|
|
@@ -1115,8 +1161,8 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1115
1161
|
* `clades` resolved to the rows each one covers. The tip names resolve
|
|
1116
1162
|
* against `tree` rather than `root`, so a clade whose ancestor the user
|
|
1117
1163
|
* collapsed keeps its rows. One leaf pass over the tree serves every
|
|
1118
|
-
* clade. A `range` record names no node, so `collapse
|
|
1119
|
-
* need one, drop it.
|
|
1164
|
+
* clade. A `range` record names no node, so `collapse`, `focus` and
|
|
1165
|
+
* `rotate`, which need one, drop it.
|
|
1120
1166
|
*/
|
|
1121
1167
|
readonly resolvedClades: ResolvedClade[];
|
|
1122
1168
|
/**
|
|
@@ -1143,6 +1189,12 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1143
1189
|
* #getter
|
|
1144
1190
|
*/
|
|
1145
1191
|
readonly root: HierarchyNode<NodeWithIds>;
|
|
1192
|
+
/**
|
|
1193
|
+
* #getter
|
|
1194
|
+
* the tree as Newick in the order and with the root it is drawn, with
|
|
1195
|
+
* every clade, collapsed or out of focus
|
|
1196
|
+
*/
|
|
1197
|
+
readonly treeNewick: string;
|
|
1146
1198
|
/**
|
|
1147
1199
|
* #getter
|
|
1148
1200
|
* height of the band the tree overview draws in, zero when it is off
|
|
@@ -1308,9 +1360,21 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1308
1360
|
readonly propertyConservation: number[];
|
|
1309
1361
|
/**
|
|
1310
1362
|
* #getter
|
|
1311
|
-
*
|
|
1363
|
+
* `root` laid out on new nodes in row and branch-length units, read in
|
|
1364
|
+
* pixels through `rowHeight` and `treeWidth`. A zoom leaves it and every
|
|
1365
|
+
* node in it as they are, and an observer reading a node's `x` or `len`
|
|
1366
|
+
* observes the size it scales by.
|
|
1312
1367
|
*/
|
|
1313
|
-
readonly
|
|
1368
|
+
readonly treeLayout: {
|
|
1369
|
+
root: import("./hierarchy.ts").LaidOutNode<NodeWithIds>;
|
|
1370
|
+
leaves: import("./hierarchy.ts").LaidOutNode<NodeWithIds>[];
|
|
1371
|
+
rootToTipLength: number;
|
|
1372
|
+
};
|
|
1373
|
+
/**
|
|
1374
|
+
* #getter
|
|
1375
|
+
* the laid-out tree, with pixel positions on every node
|
|
1376
|
+
*/
|
|
1377
|
+
readonly hierarchy: HierarchyNode<NodeWithIds>;
|
|
1314
1378
|
/**
|
|
1315
1379
|
* #getter
|
|
1316
1380
|
*/
|
|
@@ -1318,7 +1382,7 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1318
1382
|
/**
|
|
1319
1383
|
* #getter
|
|
1320
1384
|
*/
|
|
1321
|
-
readonly leaves: HierarchyNode<
|
|
1385
|
+
readonly leaves: HierarchyNode<NodeWithIds>[];
|
|
1322
1386
|
/**
|
|
1323
1387
|
* #getter
|
|
1324
1388
|
* branch-length extent of the displayed tree, root to farthest tip, in
|
|
@@ -1411,10 +1475,6 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1411
1475
|
* #getter
|
|
1412
1476
|
*/
|
|
1413
1477
|
readonly secondaryStructureConsensus: string | undefined;
|
|
1414
|
-
/**
|
|
1415
|
-
* #getter
|
|
1416
|
-
*/
|
|
1417
|
-
readonly seqConsensus: string | undefined;
|
|
1418
1478
|
/**
|
|
1419
1479
|
* #getter
|
|
1420
1480
|
* the base pairs of the consensus secondary structure, as arcs, in
|
|
@@ -1449,11 +1509,13 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1449
1509
|
readonly showHorizontalScrollbar: boolean;
|
|
1450
1510
|
/**
|
|
1451
1511
|
* #method
|
|
1452
|
-
* Return a row
|
|
1512
|
+
* Return the character a row holds at a visible column: a residue, or
|
|
1513
|
+
* the gap character (`-` or `.`) on a gap. Undefined for a row name the
|
|
1514
|
+
* alignment does not have or a column past the row's end.
|
|
1453
1515
|
*
|
|
1454
1516
|
* @param rowName - The name of the row
|
|
1455
1517
|
* @param visibleCol - The visible column index (what the user sees on screen)
|
|
1456
|
-
* @returns The
|
|
1518
|
+
* @returns The character at that position
|
|
1457
1519
|
*/
|
|
1458
1520
|
visibleColToRowLetter(rowName: string, visibleCol: number): string | undefined;
|
|
1459
1521
|
/**
|
|
@@ -1511,6 +1573,16 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1511
1573
|
* @returns The global column index in the full MSA, or undefined
|
|
1512
1574
|
*/
|
|
1513
1575
|
seqPosToGlobalCol(rowName: string, seqPos: number): number | undefined;
|
|
1576
|
+
/**
|
|
1577
|
+
* #method
|
|
1578
|
+
* the global column of a span's last residue, clamping a position past
|
|
1579
|
+
* the end of the row to its last residue. Undefined for a row name the
|
|
1580
|
+
* alignment does not have, or a row with no residues.
|
|
1581
|
+
*
|
|
1582
|
+
* @param rowName - The name of the row
|
|
1583
|
+
* @param seqPos - The sequence position (0-based, ungapped)
|
|
1584
|
+
*/
|
|
1585
|
+
seqEndToGlobalCol(rowName: string, seqPos: number): number | undefined;
|
|
1514
1586
|
/**
|
|
1515
1587
|
* #method
|
|
1516
1588
|
* Convert a sequence position (ungapped) directly to a visible column index.
|
|
@@ -1636,6 +1708,22 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1636
1708
|
*/
|
|
1637
1709
|
readonly blocksY: number[];
|
|
1638
1710
|
} & {
|
|
1711
|
+
/**
|
|
1712
|
+
* #getter
|
|
1713
|
+
*/
|
|
1714
|
+
readonly verticalScrollbarWidth: 0 | 20;
|
|
1715
|
+
/**
|
|
1716
|
+
* #getter
|
|
1717
|
+
* width of the alignment canvas: the msa area less the vertical
|
|
1718
|
+
* scrollbar. showHorizontalScrollbar must not read it, since that feeds
|
|
1719
|
+
* msaAreaHeight -> showVerticalScrollbar and would form a cycle
|
|
1720
|
+
*/
|
|
1721
|
+
readonly msaCanvasWidth: number;
|
|
1722
|
+
/**
|
|
1723
|
+
* #getter
|
|
1724
|
+
* most-negative allowed scrollX, which keeps the last column in view
|
|
1725
|
+
*/
|
|
1726
|
+
readonly maxScrollX: number;
|
|
1639
1727
|
/**
|
|
1640
1728
|
* #getter
|
|
1641
1729
|
*/
|
|
@@ -1646,8 +1734,16 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1646
1734
|
readonly isLoading: boolean;
|
|
1647
1735
|
/**
|
|
1648
1736
|
* #getter
|
|
1737
|
+
* warnings that follow from the loaded data and clear when it changes. A
|
|
1738
|
+
* GFF whose first column names rows of some other alignment parses
|
|
1739
|
+
* without error and draws nothing
|
|
1649
1740
|
*/
|
|
1650
|
-
readonly
|
|
1741
|
+
readonly dataWarnings: string[];
|
|
1742
|
+
/**
|
|
1743
|
+
* #getter
|
|
1744
|
+
* the load warnings and the undismissed data warnings, for the header
|
|
1745
|
+
*/
|
|
1746
|
+
readonly warnings: string[];
|
|
1651
1747
|
/**
|
|
1652
1748
|
* #getter
|
|
1653
1749
|
* most-negative allowed scrollY, which keeps the last row in view
|
|
@@ -1665,6 +1761,10 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1665
1761
|
* #action
|
|
1666
1762
|
*/
|
|
1667
1763
|
setDrawMsaLetters(arg: boolean): void;
|
|
1764
|
+
/**
|
|
1765
|
+
* #action
|
|
1766
|
+
*/
|
|
1767
|
+
clearWarnings(): void;
|
|
1668
1768
|
/**
|
|
1669
1769
|
* #action
|
|
1670
1770
|
*/
|
|
@@ -1688,8 +1788,16 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1688
1788
|
calculateNeighborJoiningTreeFromMSA(): void;
|
|
1689
1789
|
/**
|
|
1690
1790
|
* #action
|
|
1691
|
-
*
|
|
1692
|
-
* and
|
|
1791
|
+
* root the tree on the branch above the given node. The node's tips are
|
|
1792
|
+
* a split of the unrooted tree, and the side of it that is a clade in
|
|
1793
|
+
* the tree as written stands for it as an outgroup, by its first and
|
|
1794
|
+
* last tip, so the root survives the path ids changing under it
|
|
1795
|
+
*/
|
|
1796
|
+
rerootAt(nodeId: string): void;
|
|
1797
|
+
/**
|
|
1798
|
+
* #action
|
|
1799
|
+
* swap in a different tree over the same alignment. Clears `collapsed`,
|
|
1800
|
+
* `rotated` and `showOnly`, since path-derived node ids (node-0-0-1) from the old
|
|
1693
1801
|
* tree would match unrelated nodes in the new one.
|
|
1694
1802
|
*/
|
|
1695
1803
|
replaceTree(newick: string): void;
|
|
@@ -1698,6 +1806,11 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1698
1806
|
* restore the default column width and row height
|
|
1699
1807
|
*/
|
|
1700
1808
|
resetZoom(): void;
|
|
1809
|
+
/**
|
|
1810
|
+
* #action
|
|
1811
|
+
* zoom by `scaleFactor` about the center of the alignment area
|
|
1812
|
+
*/
|
|
1813
|
+
zoomAtCenter(scaleFactor: number, axis?: ScrollZoomAxis): void;
|
|
1701
1814
|
/**
|
|
1702
1815
|
* #action
|
|
1703
1816
|
*/
|
|
@@ -1805,21 +1918,11 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1805
1918
|
onCancel?: () => void;
|
|
1806
1919
|
}): void;
|
|
1807
1920
|
} & {
|
|
1808
|
-
/**
|
|
1809
|
-
* #getter
|
|
1810
|
-
*/
|
|
1811
|
-
readonly verticalScrollbarWidth: 0 | 20;
|
|
1812
|
-
/**
|
|
1813
|
-
* #getter
|
|
1814
|
-
* width of the alignment canvas: the msa area less the vertical
|
|
1815
|
-
* scrollbar. showHorizontalScrollbar must not read it, since that feeds
|
|
1816
|
-
* msaAreaHeight -> showVerticalScrollbar and would form a cycle
|
|
1817
|
-
*/
|
|
1818
|
-
readonly msaCanvasWidth: number;
|
|
1819
1921
|
/**
|
|
1820
1922
|
* #method
|
|
1821
1923
|
* the cell at a visible column and row index, in the coordinates a host
|
|
1822
|
-
* writes highlights in
|
|
1924
|
+
* writes highlights in. On a gap `residue` is undefined and `letter` is
|
|
1925
|
+
* the gap character
|
|
1823
1926
|
*/
|
|
1824
1927
|
cellAt(visibleCol: number, rowIndex?: number): Cell;
|
|
1825
1928
|
/**
|
|
@@ -2001,10 +2104,17 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
2001
2104
|
readonly resolvedEncodings: ResolvedEncoding[];
|
|
2002
2105
|
/**
|
|
2003
2106
|
* #getter
|
|
2004
|
-
* each row panel
|
|
2005
|
-
*
|
|
2006
|
-
*
|
|
2007
|
-
|
|
2107
|
+
* each row panel's scale resolved against the values its field takes,
|
|
2108
|
+
* giving the colors, labels and legend entries. Reads no cell size, so
|
|
2109
|
+
* a zoom reuses it and the legends built from it.
|
|
2110
|
+
*/
|
|
2111
|
+
readonly rowPanelScales: (StripPanelScale | FeaturePanelScale)[];
|
|
2112
|
+
/**
|
|
2113
|
+
* #getter
|
|
2114
|
+
* each row panel with its scale from `rowPanelScales` and its geometry:
|
|
2115
|
+
* the pixel column it draws in and, for a features panel, the spans per
|
|
2116
|
+
* row. Resolved once per change of those inputs, never per block per
|
|
2117
|
+
* frame.
|
|
2008
2118
|
*/
|
|
2009
2119
|
readonly resolvedRowPanels: ResolvedRowPanel[];
|
|
2010
2120
|
/**
|
|
@@ -2073,6 +2183,11 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
2073
2183
|
* #action
|
|
2074
2184
|
*/
|
|
2075
2185
|
exportSVG(opts: ExportSvgOptions): Promise<void>;
|
|
2186
|
+
/**
|
|
2187
|
+
* #action
|
|
2188
|
+
* save `treeNewick` as a file
|
|
2189
|
+
*/
|
|
2190
|
+
exportNewick(): void;
|
|
2076
2191
|
/**
|
|
2077
2192
|
* #action
|
|
2078
2193
|
* show or hide an annotation type. Only hidden types are recorded; see
|
|
@@ -2109,6 +2224,7 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
2109
2224
|
treeAreaWidth: number;
|
|
2110
2225
|
treeWidth: number;
|
|
2111
2226
|
showBranchLen: boolean;
|
|
2227
|
+
treeOrder: TreeOrder;
|
|
2112
2228
|
drawTree: boolean;
|
|
2113
2229
|
drawNodeBubbles: boolean;
|
|
2114
2230
|
drawNodeLabels: boolean;
|
|
@@ -2213,6 +2329,8 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
2213
2329
|
} | undefined;
|
|
2214
2330
|
currentAlignment: number;
|
|
2215
2331
|
collapsed: string[];
|
|
2332
|
+
rotated: string[];
|
|
2333
|
+
treeRoot: TreeRoot | undefined;
|
|
2216
2334
|
showOnly: string | undefined;
|
|
2217
2335
|
turnedOffTracks: import("mobx").IKeyValueMap<boolean>;
|
|
2218
2336
|
trackHeights: import("mobx").IKeyValueMap<number>;
|
|
@@ -2241,6 +2359,7 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
2241
2359
|
treeAreaWidth: number;
|
|
2242
2360
|
treeWidth: number;
|
|
2243
2361
|
showBranchLen: boolean;
|
|
2362
|
+
treeOrder: TreeOrder;
|
|
2244
2363
|
drawTree: boolean;
|
|
2245
2364
|
drawNodeBubbles: boolean;
|
|
2246
2365
|
drawNodeLabels: boolean;
|
|
@@ -2345,6 +2464,8 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
2345
2464
|
} | undefined;
|
|
2346
2465
|
currentAlignment: number;
|
|
2347
2466
|
collapsed: string[];
|
|
2467
|
+
rotated: string[];
|
|
2468
|
+
treeRoot: TreeRoot | undefined;
|
|
2348
2469
|
showOnly: string | undefined;
|
|
2349
2470
|
turnedOffTracks: import("mobx").IKeyValueMap<boolean>;
|
|
2350
2471
|
trackHeights: import("mobx").IKeyValueMap<number>;
|