react-msaview 8.1.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.d.ts +46 -0
- package/dist/expandSpec.js +127 -0
- package/dist/expandSpec.js.map +1 -0
- 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 +4 -2
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- 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 +188 -47
- package/dist/model.js +482 -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 +114 -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 +196 -0
- package/src/exportFileName.ts +4 -3
- package/src/hierarchy.ts +151 -4
- package/src/index.ts +11 -1
- package/src/model/treeModel.ts +22 -0
- package/src/model.ts +588 -221
- 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" | "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
|
|
@@ -616,12 +633,21 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
616
633
|
* Persists in the snapshot and the URL.
|
|
617
634
|
*/
|
|
618
635
|
highlights: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<Highlight, Highlight, Highlight>>, [undefined]>;
|
|
636
|
+
/**
|
|
637
|
+
* #property
|
|
638
|
+
* where the view opens, in `highlights` coordinates: `{row, start,
|
|
639
|
+
* end}` zooms onto residues of that row, `{start, end}` onto alignment
|
|
640
|
+
* columns. Applied once the alignment and any tree file have loaded,
|
|
641
|
+
* then cleared, so a reloaded session keeps the reader's own scroll.
|
|
642
|
+
*/
|
|
643
|
+
region: import("@jbrowse/mobx-state-tree").IType<Region | undefined, Region | undefined, Region | undefined>;
|
|
619
644
|
/**
|
|
620
645
|
* #property
|
|
621
646
|
* clades of the tree with a mark drawn over them. `mrca` names tips
|
|
622
647
|
* whose common ancestor is the clade, or `range` its first and last
|
|
623
648
|
* tip in display order, and `tips` is the leaf count the producer
|
|
624
|
-
* measured. `mark` is `highlight`, `bracket`, `collapse` or
|
|
649
|
+
* measured. `mark` is `highlight`, `bracket`, `collapse`, `focus` or
|
|
650
|
+
* `rotate`.
|
|
625
651
|
* See docs/layers.md
|
|
626
652
|
*/
|
|
627
653
|
clades: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<Clade, Clade, Clade>>, [undefined]>;
|
|
@@ -656,6 +682,7 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
656
682
|
setDrawTree(arg: boolean): void;
|
|
657
683
|
setAutoTreeAreaWidth(arg: boolean): void;
|
|
658
684
|
setShowBranchLen(arg: boolean): void;
|
|
685
|
+
setTreeOrder(order: TreeOrder): void;
|
|
659
686
|
setDrawNodeBubbles(arg: boolean): void;
|
|
660
687
|
setDrawNodeLabels(arg: boolean): void;
|
|
661
688
|
setShowTreeOverview(arg: boolean): void;
|
|
@@ -766,9 +793,15 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
766
793
|
* #volatile
|
|
767
794
|
* non-fatal load problems: an optional layer that failed to load, an
|
|
768
795
|
* overlay that failed to parse. `error` replaces the view and is for the
|
|
769
|
-
* alignment itself
|
|
796
|
+
* alignment itself. `warnings` adds the ones derived from the data
|
|
797
|
+
*/
|
|
798
|
+
loadWarnings: string[];
|
|
799
|
+
/**
|
|
800
|
+
* #volatile
|
|
801
|
+
* derived warnings the user dismissed, which stay hidden while the data
|
|
802
|
+
* behind them holds
|
|
770
803
|
*/
|
|
771
|
-
|
|
804
|
+
dismissedWarnings: string[];
|
|
772
805
|
/**
|
|
773
806
|
* #volatile
|
|
774
807
|
* bumped by reset(). The error boundary above the view uses it as its key,
|
|
@@ -838,10 +871,6 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
838
871
|
* that failed to parse. A message already on the list is not added again
|
|
839
872
|
*/
|
|
840
873
|
addWarning(warning: string): void;
|
|
841
|
-
/**
|
|
842
|
-
* #action
|
|
843
|
-
*/
|
|
844
|
-
clearWarnings(): void;
|
|
845
874
|
/**
|
|
846
875
|
* #action
|
|
847
876
|
* declare that this host restores the loaded documents itself, which
|
|
@@ -866,6 +895,10 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
866
895
|
* through it.
|
|
867
896
|
*/
|
|
868
897
|
setHighlightedColumns(columns?: number[]): void;
|
|
898
|
+
/**
|
|
899
|
+
* #action
|
|
900
|
+
*/
|
|
901
|
+
setRegion(region?: Region): void;
|
|
869
902
|
/**
|
|
870
903
|
* #action
|
|
871
904
|
*/
|
|
@@ -918,8 +951,9 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
918
951
|
/**
|
|
919
952
|
* #action
|
|
920
953
|
* switch to another alignment of a multi-alignment file (Stockholm).
|
|
921
|
-
* Clears the collapsed node ids, the subtree in focus, the
|
|
922
|
-
* 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
|
|
923
957
|
*/
|
|
924
958
|
setCurrentAlignment(n: number): void;
|
|
925
959
|
/**
|
|
@@ -927,6 +961,21 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
927
961
|
* collapse or un-collapse the subtree rooted at the given tree node id
|
|
928
962
|
*/
|
|
929
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;
|
|
930
979
|
/**
|
|
931
980
|
* #action
|
|
932
981
|
* show only the subtree rooted at the given node id (pass undefined to
|
|
@@ -1046,12 +1095,13 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1046
1095
|
* from disk or pasted in becomes inline text, and DataModel drops an
|
|
1047
1096
|
* inline document past `maxInlineSnapshotBytes`.
|
|
1048
1097
|
*
|
|
1049
|
-
* The header lists these, and the standalone app
|
|
1050
|
-
* address bar while the list is non-empty
|
|
1051
|
-
*
|
|
1052
|
-
*
|
|
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.
|
|
1053
1103
|
*
|
|
1054
|
-
* Empty when `
|
|
1104
|
+
* Empty when `hostCarriesData` is true.
|
|
1055
1105
|
*/
|
|
1056
1106
|
readonly unshareableData: UnshareableData[];
|
|
1057
1107
|
menuItems(): never[];
|
|
@@ -1086,6 +1136,14 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1086
1136
|
readonly numColumns: number;
|
|
1087
1137
|
/**
|
|
1088
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.
|
|
1089
1147
|
*/
|
|
1090
1148
|
readonly tree: NodeWithIds;
|
|
1091
1149
|
/**
|
|
@@ -1103,8 +1161,8 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1103
1161
|
* `clades` resolved to the rows each one covers. The tip names resolve
|
|
1104
1162
|
* against `tree` rather than `root`, so a clade whose ancestor the user
|
|
1105
1163
|
* collapsed keeps its rows. One leaf pass over the tree serves every
|
|
1106
|
-
* clade. A `range` record names no node, so `collapse
|
|
1107
|
-
* need one, drop it.
|
|
1164
|
+
* clade. A `range` record names no node, so `collapse`, `focus` and
|
|
1165
|
+
* `rotate`, which need one, drop it.
|
|
1108
1166
|
*/
|
|
1109
1167
|
readonly resolvedClades: ResolvedClade[];
|
|
1110
1168
|
/**
|
|
@@ -1131,6 +1189,12 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1131
1189
|
* #getter
|
|
1132
1190
|
*/
|
|
1133
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;
|
|
1134
1198
|
/**
|
|
1135
1199
|
* #getter
|
|
1136
1200
|
* height of the band the tree overview draws in, zero when it is off
|
|
@@ -1296,9 +1360,21 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1296
1360
|
readonly propertyConservation: number[];
|
|
1297
1361
|
/**
|
|
1298
1362
|
* #getter
|
|
1299
|
-
*
|
|
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.
|
|
1367
|
+
*/
|
|
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
|
|
1300
1376
|
*/
|
|
1301
|
-
readonly hierarchy: HierarchyNode<
|
|
1377
|
+
readonly hierarchy: HierarchyNode<NodeWithIds>;
|
|
1302
1378
|
/**
|
|
1303
1379
|
* #getter
|
|
1304
1380
|
*/
|
|
@@ -1306,7 +1382,7 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1306
1382
|
/**
|
|
1307
1383
|
* #getter
|
|
1308
1384
|
*/
|
|
1309
|
-
readonly leaves: HierarchyNode<
|
|
1385
|
+
readonly leaves: HierarchyNode<NodeWithIds>[];
|
|
1310
1386
|
/**
|
|
1311
1387
|
* #getter
|
|
1312
1388
|
* branch-length extent of the displayed tree, root to farthest tip, in
|
|
@@ -1399,10 +1475,6 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1399
1475
|
* #getter
|
|
1400
1476
|
*/
|
|
1401
1477
|
readonly secondaryStructureConsensus: string | undefined;
|
|
1402
|
-
/**
|
|
1403
|
-
* #getter
|
|
1404
|
-
*/
|
|
1405
|
-
readonly seqConsensus: string | undefined;
|
|
1406
1478
|
/**
|
|
1407
1479
|
* #getter
|
|
1408
1480
|
* the base pairs of the consensus secondary structure, as arcs, in
|
|
@@ -1437,11 +1509,13 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1437
1509
|
readonly showHorizontalScrollbar: boolean;
|
|
1438
1510
|
/**
|
|
1439
1511
|
* #method
|
|
1440
|
-
* 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.
|
|
1441
1515
|
*
|
|
1442
1516
|
* @param rowName - The name of the row
|
|
1443
1517
|
* @param visibleCol - The visible column index (what the user sees on screen)
|
|
1444
|
-
* @returns The
|
|
1518
|
+
* @returns The character at that position
|
|
1445
1519
|
*/
|
|
1446
1520
|
visibleColToRowLetter(rowName: string, visibleCol: number): string | undefined;
|
|
1447
1521
|
/**
|
|
@@ -1499,6 +1573,16 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1499
1573
|
* @returns The global column index in the full MSA, or undefined
|
|
1500
1574
|
*/
|
|
1501
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;
|
|
1502
1586
|
/**
|
|
1503
1587
|
* #method
|
|
1504
1588
|
* Convert a sequence position (ungapped) directly to a visible column index.
|
|
@@ -1624,6 +1708,22 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1624
1708
|
*/
|
|
1625
1709
|
readonly blocksY: number[];
|
|
1626
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;
|
|
1627
1727
|
/**
|
|
1628
1728
|
* #getter
|
|
1629
1729
|
*/
|
|
@@ -1634,8 +1734,16 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1634
1734
|
readonly isLoading: boolean;
|
|
1635
1735
|
/**
|
|
1636
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
|
|
1637
1740
|
*/
|
|
1638
|
-
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[];
|
|
1639
1747
|
/**
|
|
1640
1748
|
* #getter
|
|
1641
1749
|
* most-negative allowed scrollY, which keeps the last row in view
|
|
@@ -1653,6 +1761,10 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1653
1761
|
* #action
|
|
1654
1762
|
*/
|
|
1655
1763
|
setDrawMsaLetters(arg: boolean): void;
|
|
1764
|
+
/**
|
|
1765
|
+
* #action
|
|
1766
|
+
*/
|
|
1767
|
+
clearWarnings(): void;
|
|
1656
1768
|
/**
|
|
1657
1769
|
* #action
|
|
1658
1770
|
*/
|
|
@@ -1676,8 +1788,16 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1676
1788
|
calculateNeighborJoiningTreeFromMSA(): void;
|
|
1677
1789
|
/**
|
|
1678
1790
|
* #action
|
|
1679
|
-
*
|
|
1680
|
-
* 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
|
|
1681
1801
|
* tree would match unrelated nodes in the new one.
|
|
1682
1802
|
*/
|
|
1683
1803
|
replaceTree(newick: string): void;
|
|
@@ -1686,6 +1806,11 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1686
1806
|
* restore the default column width and row height
|
|
1687
1807
|
*/
|
|
1688
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;
|
|
1689
1814
|
/**
|
|
1690
1815
|
* #action
|
|
1691
1816
|
*/
|
|
@@ -1793,21 +1918,11 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1793
1918
|
onCancel?: () => void;
|
|
1794
1919
|
}): void;
|
|
1795
1920
|
} & {
|
|
1796
|
-
/**
|
|
1797
|
-
* #getter
|
|
1798
|
-
*/
|
|
1799
|
-
readonly verticalScrollbarWidth: 0 | 20;
|
|
1800
|
-
/**
|
|
1801
|
-
* #getter
|
|
1802
|
-
* width of the alignment canvas: the msa area less the vertical
|
|
1803
|
-
* scrollbar. showHorizontalScrollbar must not read it, since that feeds
|
|
1804
|
-
* msaAreaHeight -> showVerticalScrollbar and would form a cycle
|
|
1805
|
-
*/
|
|
1806
|
-
readonly msaCanvasWidth: number;
|
|
1807
1921
|
/**
|
|
1808
1922
|
* #method
|
|
1809
1923
|
* the cell at a visible column and row index, in the coordinates a host
|
|
1810
|
-
* writes highlights in
|
|
1924
|
+
* writes highlights in. On a gap `residue` is undefined and `letter` is
|
|
1925
|
+
* the gap character
|
|
1811
1926
|
*/
|
|
1812
1927
|
cellAt(visibleCol: number, rowIndex?: number): Cell;
|
|
1813
1928
|
/**
|
|
@@ -1946,6 +2061,12 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1946
2061
|
start: number;
|
|
1947
2062
|
end: number;
|
|
1948
2063
|
}[];
|
|
2064
|
+
/**
|
|
2065
|
+
* #method
|
|
2066
|
+
* a highlight label with `{residue}` and `{position}` filled in from the
|
|
2067
|
+
* row's letter at `start`, which is how the `175` shorthand draws "R175"
|
|
2068
|
+
*/
|
|
2069
|
+
fillHighlightLabel(label: string, row?: string, start?: number): string;
|
|
1949
2070
|
/**
|
|
1950
2071
|
* #getter
|
|
1951
2072
|
* `highlights` projected onto what is on screen: residue spans go
|
|
@@ -1983,10 +2104,17 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
1983
2104
|
readonly resolvedEncodings: ResolvedEncoding[];
|
|
1984
2105
|
/**
|
|
1985
2106
|
* #getter
|
|
1986
|
-
* each row panel
|
|
1987
|
-
*
|
|
1988
|
-
*
|
|
1989
|
-
|
|
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.
|
|
1990
2118
|
*/
|
|
1991
2119
|
readonly resolvedRowPanels: ResolvedRowPanel[];
|
|
1992
2120
|
/**
|
|
@@ -2055,6 +2183,11 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
2055
2183
|
* #action
|
|
2056
2184
|
*/
|
|
2057
2185
|
exportSVG(opts: ExportSvgOptions): Promise<void>;
|
|
2186
|
+
/**
|
|
2187
|
+
* #action
|
|
2188
|
+
* save `treeNewick` as a file
|
|
2189
|
+
*/
|
|
2190
|
+
exportNewick(): void;
|
|
2058
2191
|
/**
|
|
2059
2192
|
* #action
|
|
2060
2193
|
* show or hide an annotation type. Only hidden types are recorded; see
|
|
@@ -2091,6 +2224,7 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
2091
2224
|
treeAreaWidth: number;
|
|
2092
2225
|
treeWidth: number;
|
|
2093
2226
|
showBranchLen: boolean;
|
|
2227
|
+
treeOrder: TreeOrder;
|
|
2094
2228
|
drawTree: boolean;
|
|
2095
2229
|
drawNodeBubbles: boolean;
|
|
2096
2230
|
drawNodeLabels: boolean;
|
|
@@ -2195,6 +2329,8 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
2195
2329
|
} | undefined;
|
|
2196
2330
|
currentAlignment: number;
|
|
2197
2331
|
collapsed: string[];
|
|
2332
|
+
rotated: string[];
|
|
2333
|
+
treeRoot: TreeRoot | undefined;
|
|
2198
2334
|
showOnly: string | undefined;
|
|
2199
2335
|
turnedOffTracks: import("mobx").IKeyValueMap<boolean>;
|
|
2200
2336
|
trackHeights: import("mobx").IKeyValueMap<number>;
|
|
@@ -2203,6 +2339,7 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
2203
2339
|
relativeTo: string | undefined;
|
|
2204
2340
|
highlightColumns: number[] | undefined;
|
|
2205
2341
|
highlights: Highlight[];
|
|
2342
|
+
region: Region | undefined;
|
|
2206
2343
|
clades: Clade[];
|
|
2207
2344
|
encodings: Encoding[];
|
|
2208
2345
|
rowPanels: RowPanelSpec[];
|
|
@@ -2222,6 +2359,7 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
2222
2359
|
treeAreaWidth: number;
|
|
2223
2360
|
treeWidth: number;
|
|
2224
2361
|
showBranchLen: boolean;
|
|
2362
|
+
treeOrder: TreeOrder;
|
|
2225
2363
|
drawTree: boolean;
|
|
2226
2364
|
drawNodeBubbles: boolean;
|
|
2227
2365
|
drawNodeLabels: boolean;
|
|
@@ -2326,6 +2464,8 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
2326
2464
|
} | undefined;
|
|
2327
2465
|
currentAlignment: number;
|
|
2328
2466
|
collapsed: string[];
|
|
2467
|
+
rotated: string[];
|
|
2468
|
+
treeRoot: TreeRoot | undefined;
|
|
2329
2469
|
showOnly: string | undefined;
|
|
2330
2470
|
turnedOffTracks: import("mobx").IKeyValueMap<boolean>;
|
|
2331
2471
|
trackHeights: import("mobx").IKeyValueMap<number>;
|
|
@@ -2334,6 +2474,7 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
2334
2474
|
relativeTo: string | undefined;
|
|
2335
2475
|
highlightColumns: number[] | undefined;
|
|
2336
2476
|
highlights: Highlight[];
|
|
2477
|
+
region: Region | undefined;
|
|
2337
2478
|
clades: Clade[];
|
|
2338
2479
|
encodings: Encoding[];
|
|
2339
2480
|
rowPanels: RowPanelSpec[];
|