react-msaview 6.5.0 → 7.0.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.
Files changed (212) hide show
  1. package/README.md +6 -5
  2. package/bundle/index.js +100 -101
  3. package/bundle/index.js.map +4 -4
  4. package/dist/components/Loading.js +2 -2
  5. package/dist/components/Loading.js.map +1 -1
  6. package/dist/components/MSAViewer.d.ts +10 -2
  7. package/dist/components/MSAViewer.js +90 -2
  8. package/dist/components/MSAViewer.js.map +1 -1
  9. package/dist/components/ResizeHandles.d.ts +3 -3
  10. package/dist/components/ResizeHandles.js +28 -21
  11. package/dist/components/ResizeHandles.js.map +1 -1
  12. package/dist/components/dialogs/{InterProScanDialog.d.ts → AnnotationFileDialog.d.ts} +2 -2
  13. package/dist/components/dialogs/AnnotationFileDialog.js +92 -0
  14. package/dist/components/dialogs/AnnotationFileDialog.js.map +1 -0
  15. package/dist/components/dialogs/FeatureDialog.js +13 -9
  16. package/dist/components/dialogs/FeatureDialog.js.map +1 -1
  17. package/dist/components/header/Header.js +4 -0
  18. package/dist/components/header/Header.js.map +1 -1
  19. package/dist/components/header/HeaderStatusArea.js +0 -2
  20. package/dist/components/header/HeaderStatusArea.js.map +1 -1
  21. package/dist/components/header/LoadWarnings.d.ts +6 -0
  22. package/dist/components/header/LoadWarnings.js +36 -0
  23. package/dist/components/header/LoadWarnings.js.map +1 -0
  24. package/dist/components/header/MultiAlignmentSelector.js +0 -0
  25. package/dist/components/header/MultiAlignmentSelector.js.map +1 -1
  26. package/dist/components/header/TreeSettingsMenu.js +9 -1
  27. package/dist/components/header/TreeSettingsMenu.js.map +1 -1
  28. package/dist/components/header/UnshareableDataWarning.d.ts +6 -0
  29. package/dist/components/header/UnshareableDataWarning.js +42 -0
  30. package/dist/components/header/UnshareableDataWarning.js.map +1 -0
  31. package/dist/components/header/getAnnotationsMenu.js +14 -14
  32. package/dist/components/header/getAnnotationsMenu.js.map +1 -1
  33. package/dist/components/import/ImportForm.js +1 -1
  34. package/dist/components/import/ImportForm.js.map +1 -1
  35. package/dist/components/import/ImportFormExamples.js +2 -6
  36. package/dist/components/import/ImportFormExamples.js.map +1 -1
  37. package/dist/components/import/util.js +3 -0
  38. package/dist/components/import/util.js.map +1 -1
  39. package/dist/components/msa/MSACanvasBlock.js +4 -5
  40. package/dist/components/msa/MSACanvasBlock.js.map +1 -1
  41. package/dist/components/msa/msaRaster.d.ts +13 -3
  42. package/dist/components/msa/msaRaster.js +173 -61
  43. package/dist/components/msa/msaRaster.js.map +1 -1
  44. package/dist/components/msa/renderHighlights.d.ts +39 -1
  45. package/dist/components/msa/renderHighlights.js +71 -6
  46. package/dist/components/msa/renderHighlights.js.map +1 -1
  47. package/dist/components/msa/renderMSABlock.d.ts +1 -2
  48. package/dist/components/msa/renderMSABlock.js +24 -28
  49. package/dist/components/msa/renderMSABlock.js.map +1 -1
  50. package/dist/components/msa/renderMSAMouseover.js +9 -30
  51. package/dist/components/msa/renderMSAMouseover.js.map +1 -1
  52. package/dist/components/renderCtx.d.ts +1 -1
  53. package/dist/components/tracks/TrackBlocks.js +10 -11
  54. package/dist/components/tracks/TrackBlocks.js.map +1 -1
  55. package/dist/components/tracks/drawTracks.d.ts +26 -8
  56. package/dist/components/tracks/drawTracks.js +123 -13
  57. package/dist/components/tracks/drawTracks.js.map +1 -1
  58. package/dist/components/tree/TreeCanvas.js +2 -3
  59. package/dist/components/tree/TreeCanvas.js.map +1 -1
  60. package/dist/components/tree/TreeCanvasBlock.js +4 -2
  61. package/dist/components/tree/TreeCanvasBlock.js.map +1 -1
  62. package/dist/components/tree/TreeRuler.js +13 -3
  63. package/dist/components/tree/TreeRuler.js.map +1 -1
  64. package/dist/components/tree/renderTreeCanvas.d.ts +0 -1
  65. package/dist/components/tree/renderTreeCanvas.js +70 -30
  66. package/dist/components/tree/renderTreeCanvas.js.map +1 -1
  67. package/dist/components/tree/scaleBar.d.ts +10 -0
  68. package/dist/components/tree/scaleBar.js +24 -0
  69. package/dist/components/tree/scaleBar.js.map +1 -0
  70. package/dist/constants.d.ts +3 -1
  71. package/dist/constants.js +18 -1
  72. package/dist/constants.js.map +1 -1
  73. package/dist/fetchUtils.d.ts +7 -7
  74. package/dist/fetchUtils.js +4 -32
  75. package/dist/fetchUtils.js.map +1 -1
  76. package/dist/hierarchy.d.ts +2 -1
  77. package/dist/hierarchy.js +16 -10
  78. package/dist/hierarchy.js.map +1 -1
  79. package/dist/index.d.ts +2 -1
  80. package/dist/index.js +8 -2
  81. package/dist/index.js.map +1 -1
  82. package/dist/model/DataModel.js +5 -2
  83. package/dist/model/DataModel.js.map +1 -1
  84. package/dist/model.d.ts +454 -177
  85. package/dist/model.js +1180 -511
  86. package/dist/model.js.map +1 -1
  87. package/dist/renderToStaticMarkup.d.ts +11 -0
  88. package/dist/renderToStaticMarkup.js +30 -7
  89. package/dist/renderToStaticMarkup.js.map +1 -1
  90. package/dist/renderToSvg.js +25 -19
  91. package/dist/renderToSvg.js.map +1 -1
  92. package/dist/rowCoordinateCalculations.d.ts +25 -25
  93. package/dist/rowCoordinateCalculations.js +12 -36
  94. package/dist/rowCoordinateCalculations.js.map +1 -1
  95. package/dist/seqPosToGlobalCol.js +3 -1
  96. package/dist/seqPosToGlobalCol.js.map +1 -1
  97. package/dist/svgTestUtil.d.ts +144 -82
  98. package/dist/types.d.ts +97 -3
  99. package/dist/util.d.ts +11 -4
  100. package/dist/util.js +30 -10
  101. package/dist/util.js.map +1 -1
  102. package/dist/version.d.ts +1 -1
  103. package/dist/version.js +1 -1
  104. package/dist/wuss.d.ts +14 -0
  105. package/dist/wuss.js +55 -0
  106. package/dist/wuss.js.map +1 -0
  107. package/package.json +10 -8
  108. package/src/components/Loading.tsx +12 -2
  109. package/src/components/MSAViewer.tsx +106 -2
  110. package/src/components/ResizeHandles.tsx +31 -31
  111. package/src/components/dialogs/AnnotationFileDialog.tsx +162 -0
  112. package/src/components/dialogs/FeatureDialog.tsx +13 -9
  113. package/src/components/header/Header.tsx +4 -0
  114. package/src/components/header/HeaderStatusArea.tsx +0 -5
  115. package/src/components/header/LoadWarnings.tsx +49 -0
  116. package/src/components/header/MultiAlignmentSelector.tsx +0 -0
  117. package/src/components/header/TreeSettingsMenu.tsx +9 -1
  118. package/src/components/header/UnshareableDataWarning.tsx +58 -0
  119. package/src/components/header/getAnnotationsMenu.ts +16 -17
  120. package/src/components/import/ImportForm.tsx +2 -2
  121. package/src/components/import/ImportFormExamples.tsx +2 -6
  122. package/src/components/import/util.ts +3 -0
  123. package/src/components/msa/MSACanvasBlock.tsx +4 -5
  124. package/src/components/msa/msaRaster.ts +216 -59
  125. package/src/components/msa/renderHighlights.ts +103 -5
  126. package/src/components/msa/renderMSABlock.ts +25 -36
  127. package/src/components/msa/renderMSAMouseover.ts +9 -39
  128. package/src/components/renderCtx.ts +1 -0
  129. package/src/components/tracks/TrackBlocks.tsx +10 -13
  130. package/src/components/tracks/drawTracks.ts +165 -17
  131. package/src/components/tree/TreeCanvas.tsx +2 -3
  132. package/src/components/tree/TreeCanvasBlock.tsx +4 -2
  133. package/src/components/tree/TreeRuler.tsx +38 -3
  134. package/src/components/tree/renderTreeCanvas.ts +79 -35
  135. package/src/components/tree/scaleBar.ts +23 -0
  136. package/src/constants.ts +20 -1
  137. package/src/fetchUtils.ts +7 -40
  138. package/src/hierarchy.ts +20 -11
  139. package/src/index.ts +18 -2
  140. package/src/model/DataModel.ts +6 -2
  141. package/src/model.ts +1352 -616
  142. package/src/rawImports.d.ts +9 -0
  143. package/src/renderToStaticMarkup.ts +34 -7
  144. package/src/renderToSvg.tsx +33 -27
  145. package/src/rowCoordinateCalculations.ts +15 -59
  146. package/src/seqPosToGlobalCol.ts +3 -1
  147. package/src/types.ts +131 -4
  148. package/src/util.ts +31 -14
  149. package/src/version.ts +1 -1
  150. package/src/wuss.ts +62 -0
  151. package/dist/components/dialogs/InterProScanDialog.js +0 -137
  152. package/dist/components/dialogs/InterProScanDialog.js.map +0 -1
  153. package/dist/components/dialogs/InterProScanFileDialog.d.ts +0 -7
  154. package/dist/components/dialogs/InterProScanFileDialog.js +0 -64
  155. package/dist/components/dialogs/InterProScanFileDialog.js.map +0 -1
  156. package/dist/launchInterProScan.d.ts +0 -13
  157. package/dist/launchInterProScan.js +0 -110
  158. package/dist/launchInterProScan.js.map +0 -1
  159. package/dist/useColorContrast.d.ts +0 -10
  160. package/dist/useColorContrast.js +0 -13
  161. package/dist/useColorContrast.js.map +0 -1
  162. package/src/clustalX.test.ts +0 -74
  163. package/src/colSpace.test.ts +0 -67
  164. package/src/collapseLogic.test.ts +0 -115
  165. package/src/colorSchemes.docs.test.ts +0 -57
  166. package/src/columnCounts.test.ts +0 -73
  167. package/src/columnStats.test.ts +0 -94
  168. package/src/columnTracks.test.ts +0 -97
  169. package/src/components/dialogs/InterProScanDialog.tsx +0 -214
  170. package/src/components/dialogs/InterProScanFileDialog.tsx +0 -138
  171. package/src/components/minimap/minimapLayout.test.ts +0 -71
  172. package/src/components/msa/msaRaster.test.ts +0 -145
  173. package/src/components/msa/renderBoxFeatureCanvasBlock.test.ts +0 -51
  174. package/src/components/tree/renderTreeCanvas.test.ts +0 -296
  175. package/src/dataInitialized.test.ts +0 -42
  176. package/src/domainBands.test.ts +0 -122
  177. package/src/domainLetterColor.test.ts +0 -80
  178. package/src/exportFileName.test.ts +0 -40
  179. package/src/fetchUtils.test.ts +0 -83
  180. package/src/flatToTree.test.ts +0 -51
  181. package/src/hierarchy.test.ts +0 -228
  182. package/src/highlights.test.ts +0 -70
  183. package/src/impgRender.test.tsx +0 -68
  184. package/src/largeTree.test.ts +0 -67
  185. package/src/launchInterProScan.ts +0 -167
  186. package/src/loadErrorDisplay.test.tsx +0 -102
  187. package/src/modelFilehandleLoaders.test.ts +0 -137
  188. package/src/modelReset.test.ts +0 -120
  189. package/src/neighborJoining.test.ts +0 -164
  190. package/src/parseAsn1.test.ts +0 -36
  191. package/src/propertyConservation.test.ts +0 -36
  192. package/src/renderColumnTracksSvg.test.tsx +0 -108
  193. package/src/renderDomainsSvg.test.tsx +0 -118
  194. package/src/renderHighlightsSvg.test.tsx +0 -85
  195. package/src/renderMinimapSvg.test.tsx +0 -62
  196. package/src/renderRasterSvg.test.tsx +0 -144
  197. package/src/renderSequenceLogoSvg.test.tsx +0 -165
  198. package/src/renderToSvg.test.tsx +0 -65
  199. package/src/reset.test.ts +0 -61
  200. package/src/rowCoordinateCalculations.test.ts +0 -211
  201. package/src/rowSpace.test.ts +0 -46
  202. package/src/segmentOverlay.test.ts +0 -70
  203. package/src/seqPosToGlobalCol.test.ts +0 -59
  204. package/src/sequenceLogo.test.ts +0 -88
  205. package/src/setFontSize.test.ts +0 -33
  206. package/src/stripDefault.test.ts +0 -48
  207. package/src/stripDefaultSnapshot.test.ts +0 -87
  208. package/src/treeMetadata.test.ts +0 -39
  209. package/src/useCanvasAutorun.test.tsx +0 -98
  210. package/src/useColorContrast.ts +0 -18
  211. package/src/viewChrome.test.tsx +0 -134
  212. package/src/wheelZoom.test.ts +0 -46
package/dist/model.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { HierarchyNode } from './hierarchy.ts';
2
2
  import type { ExportSvgOptions } from './renderToSvg.tsx';
3
- import type { Annotation, BasicTrack, ColumnTrackSpec, DomainBand, Highlight, NodeWithIds, NodeWithIdsAndLength, ResolvedHighlight } from './types.ts';
3
+ import type { Annotation, Arc, BasicTrack, ResidueMappingProblem, ColumnTrackSpec, DomainBand, Highlight, NodeWithIds, NodeWithIdsAndLength, ResidueMapping, ResolvedHighlight, RowResidue, StructureResidue, UnshareableData } from './types.ts';
4
4
  import type { FileLocation as FileLocationType } from '@jbrowse/core/util/types';
5
5
  import type { Instance } from '@jbrowse/mobx-state-tree';
6
6
  import type { InterProScanResults } from 'msa-parsers';
@@ -55,7 +55,7 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
55
55
  colorSchemeName: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
56
56
  showColumnStats: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
57
57
  msaFormat: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<import("msa-parsers").MSAFormat>>;
58
- }, "allowedGappyness" | "colWidth" | "collapsed" | "columnTracks" | "currentAlignment" | "data" | "drawMsaLetters" | "featureFilters" | "gffFilehandle" | "height" | "hideGaps" | "highlightColumns" | "highlights" | "id" | "msaFilehandle" | "relativeTo" | "rowHeight" | "scrollX" | "scrollY" | "scrollZoom" | "showDomainLegend" | "showDomains" | "showOnly" | "subFeatureRows" | "treeFilehandle" | "treeMetadataFilehandle" | "turnedOffTracks" | "type"> & {
58
+ }, "allowedGappyness" | "colWidth" | "collapsed" | "columnTracks" | "currentAlignment" | "data" | "drawMsaLetters" | "gffFilehandle" | "height" | "hideGaps" | "highlightColumns" | "highlights" | "id" | "msaFilehandle" | "relativeTo" | "residueMappings" | "rowHeight" | "scrollX" | "scrollY" | "scrollZoom" | "showDomainLegend" | "showDomains" | "showOnly" | "subFeatureRows" | "treeFilehandle" | "treeMetadataFilehandle" | "turnedOffFeatures" | "turnedOffTracks" | "type"> & {
59
59
  /**
60
60
  * #property
61
61
  * id of view, randomly generated if not provided
@@ -548,6 +548,15 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
548
548
  * text track. See docs/layers.md
549
549
  */
550
550
  columnTracks: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<ColumnTrackSpec, ColumnTrackSpec, ColumnTrackSpec>>, [undefined]>;
551
+ /**
552
+ * #property
553
+ * which residue of which structure each row's residues are, as data.
554
+ * The viewer cannot infer this -- matching a row to a structure by
555
+ * sequence equality fails for a tagged construct, a truncation or a
556
+ * subsequence row, and fails in the direction that looks like it
557
+ * worked -- so it arrives computed. See docs/layers.md
558
+ */
559
+ residueMappings: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<ResidueMapping, ResidueMapping, ResidueMapping>>, [undefined]>;
551
560
  /**
552
561
  * #property
553
562
  * data from the loaded tree/msa/treeMetadata, generally loaded by
@@ -568,8 +577,13 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
568
577
  }>, [undefined]>;
569
578
  /**
570
579
  * #property
580
+ * the user's explicit hide choices per annotation accession, keyed by
581
+ * accession with the value meaning "off", the same shape as
582
+ * `turnedOffTracks`. An accession the user has never touched is absent
583
+ * and drawn, so a file of two hundred domain types adds nothing to the
584
+ * shared URL until someone filters one out
571
585
  */
572
- featureFilters: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IMapType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>>, [undefined]>;
586
+ turnedOffFeatures: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IMapType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>>, [undefined]>;
573
587
  /**
574
588
  * #property
575
589
  */
@@ -623,7 +637,6 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
623
637
  */
624
638
  status: {
625
639
  msg: string;
626
- url?: string;
627
640
  onCancel?: () => void;
628
641
  } | undefined;
629
642
  /**
@@ -688,6 +701,15 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
688
701
  * array of column indices to highlight
689
702
  */
690
703
  highlightedColumns: number[] | undefined;
704
+ /**
705
+ * #volatile
706
+ * transient highlights keyed by who asked for them. One slot cannot hold
707
+ * two sources -- a structure viewer's hover and a genome view's hover
708
+ * both want to point at a column, and with one slot whoever clears last
709
+ * erases the other's. Keyed by owner, each source adds and removes only
710
+ * its own. Not persisted: a hover is not part of the document.
711
+ */
712
+ transientHighlights: Record<string, Highlight[]>;
691
713
  /**
692
714
  * #volatile
693
715
  */
@@ -696,6 +718,14 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
696
718
  * #volatile
697
719
  */
698
720
  conservationTrackHeight: number;
721
+ /**
722
+ * #volatile
723
+ * heights of individual `columnTracks`, by track id. A data track is
724
+ * resized on its own: the shared per-kind heights below belong to the
725
+ * tracks the viewer computes, and dragging a data track's handle used to
726
+ * resize those instead.
727
+ */
728
+ columnTrackHeights: Record<string, number>;
699
729
  /**
700
730
  * #volatile
701
731
  * taller than the conservation track by default: the logo spends its
@@ -703,6 +733,10 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
703
733
  * one too short to identify
704
734
  */
705
735
  sequenceLogoTrackHeight: number;
736
+ /**
737
+ * #volatile
738
+ */
739
+ arcTrackHeight: number;
706
740
  /**
707
741
  * #volatile
708
742
  */
@@ -711,6 +745,29 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
711
745
  * #volatile
712
746
  */
713
747
  error: unknown;
748
+ /**
749
+ * #volatile
750
+ * load problems the view carried on through: an optional layer that did
751
+ * not arrive, an overlay that did not parse. `error` is the other kind --
752
+ * it replaces the view, which is right for the alignment and wrong for a
753
+ * decorative file
754
+ */
755
+ warnings: string[];
756
+ /**
757
+ * #volatile
758
+ * bumped by reset(). The React error boundary above the view keeps its
759
+ * caught error until it is remounted, so "Return to import form" did
760
+ * nothing after a render error until this became its key
761
+ */
762
+ resetCount: number;
763
+ /**
764
+ * #volatile
765
+ * set by a host that restores the loaded documents by its own means --
766
+ * a jbrowse session that holds them, a page that refetches them on load.
767
+ * `unshareableData` then reports nothing, since what it warns about is a
768
+ * link that opens empty, and under such a host the link does not
769
+ */
770
+ hostCarriesData: boolean;
714
771
  /**
715
772
  * #volatile
716
773
  * overlay annotations drawn on the alignment, whatever their source.
@@ -763,28 +820,57 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
763
820
  * set error state
764
821
  */
765
822
  setError(error?: unknown): void;
823
+ /**
824
+ * #action
825
+ * report something the view survived: a layer that failed to load, a
826
+ * file that failed to parse
827
+ */
828
+ addWarning(warning: string): void;
829
+ /**
830
+ * #action
831
+ */
832
+ clearWarnings(): void;
833
+ /**
834
+ * #action
835
+ * declare that this host restores the loaded documents itself, which
836
+ * takes down the "Not in the link" warning. See `hostCarriesData`
837
+ */
838
+ setHostCarriesData(arg: boolean): void;
766
839
  /**
767
840
  * #action
768
841
  * set mouse position (row, column) in the MSA
769
842
  *
770
- * CROSS-REPO CONTRACT: jbrowse-plugin-protein3d calls this (and reads the
771
- * `mouseCol` volatile) to sync MSA<->3D-structure hover. Keep the name and
772
- * signature stable; see that repo's ProteinToMsaHoverSync.tsx.
843
+ * PUBLIC API: a host drives this (and reads the `mouseCol` volatile) to
844
+ * sync the alignment's hover with a view of its own -- a genome view, a
845
+ * 3D structure. Keep the name and signature stable.
773
846
  */
774
847
  setMousePos(col?: number, row?: number): void;
775
848
  /**
776
849
  * #action
777
850
  * set highlighted columns
778
851
  *
779
- * CROSS-REPO CONTRACT: called by jbrowse-plugin-msaview
780
- * (afterCreateAutoruns.ts) to highlight alignment columns. It has no
781
- * in-repo caller, so do not flag it as dead code — it is public API.
852
+ * PUBLIC API: jbrowse-plugin-msaview calls this from its
853
+ * afterCreateAutoruns to highlight alignment columns, and MSAViewer
854
+ * passes its `highlightColumns` prop through it. Not dead code.
782
855
  */
783
856
  setHighlightedColumns(columns?: number[]): void;
784
857
  /**
785
858
  * #action
786
859
  */
787
860
  setHighlights(highlights: Highlight[]): void;
861
+ /**
862
+ * #action
863
+ * show `highlights` on behalf of `owner`, replacing whatever that owner
864
+ * showed before and leaving every other owner's alone. The object is
865
+ * replaced rather than mutated so one assignment is the observable
866
+ * change.
867
+ */
868
+ applyHighlight(owner: string, highlights: Highlight[]): void;
869
+ /**
870
+ * #action
871
+ * drop what `owner` was showing, leaving every other owner's in place
872
+ */
873
+ clearHighlight(owner: string): void;
788
874
  /**
789
875
  * #action
790
876
  * toggle the annotation overlay on the alignment
@@ -816,7 +902,10 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
816
902
  setColWidth(n: number): void;
817
903
  /**
818
904
  * #action
819
- *
905
+ * switch to another alignment of a multi-alignment file (Stockholm). The
906
+ * new alignment has its own rows and its own tree, so everything naming
907
+ * the old one's -- the collapsed node ids, the subtree in focus, the
908
+ * reference row, the scroll position -- goes with it
820
909
  */
821
910
  setCurrentAlignment(n: number): void;
822
911
  /**
@@ -869,6 +958,15 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
869
958
  * #action
870
959
  */
871
960
  setTreeMetadata(result: string): void;
961
+ /**
962
+ * #action
963
+ * keep the GFF text the way the alignment and the tree are kept, rather
964
+ * than only its parsed annotations. The annotations are volatile, so a
965
+ * file opened from disk used to leave no trace in the snapshot at all --
966
+ * not the text, and not the filehandle, which is cleared once a blob is
967
+ * read. An autorun parses this back into annotations.
968
+ */
969
+ setGFF(result: string): void;
872
970
  } & {
873
971
  /**
874
972
  * #getter
@@ -883,17 +981,26 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
883
981
  * #getter
884
982
  */
885
983
  readonly actuallyShowDomains: boolean;
984
+ /**
985
+ * #getter
986
+ * whether this host brings the loaded documents back by means the
987
+ * snapshot cannot see, which is what decides whether `unshareableData`
988
+ * has anything to warn about.
989
+ *
990
+ * A simple host flips the `hostCarriesData` volatile. A host whose
991
+ * answer depends on how the view was opened overrides this getter in a
992
+ * `.views` block of its own composed model -- jbrowse-plugin-msaview's
993
+ * indexed-location views refetch from a URL the session holds, while its
994
+ * data-store views really are absent from a link someone pastes
995
+ * elsewhere. `unshareableData` reads it off `self`, so an override wins.
996
+ */
997
+ readonly hostRestoresData: boolean;
886
998
  readonly viewInitialized: boolean;
887
999
  /**
888
1000
  * #getter
889
1001
  */
890
1002
  readonly width: number;
891
1003
  } & {
892
- /**
893
- * #method
894
- * unused here, but can be used by derived classes to add extra items
895
- */
896
- extraViewMenuItems(): never[];
897
1004
  /**
898
1005
  * #getter
899
1006
  */
@@ -922,6 +1029,25 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
922
1029
  */
923
1030
  readonly noTree: boolean;
924
1031
  readonly noDomains: boolean;
1032
+ /**
1033
+ * #getter
1034
+ * the loaded documents this view's own snapshot cannot carry, largest
1035
+ * first. A file opened from disk or pasted in becomes inline text, and
1036
+ * DataModel drops an inline document past `maxInlineSnapshotBytes`
1037
+ * rather than put megabytes of sequence into a session or a URL.
1038
+ *
1039
+ * Dropping it is right. Dropping it silently is what makes a copied link
1040
+ * open an empty viewer, so the header says so and the standalone app
1041
+ * stops rewriting the address bar while this is non-empty. A document
1042
+ * fetched from a URL never appears here whatever its size: the snapshot
1043
+ * keeps the filehandle and refetches through it.
1044
+ *
1045
+ * Nothing is unshareable when the host restores the data by its own
1046
+ * means (see `hostRestoresData`) -- inside a session that reloads these
1047
+ * documents from somewhere the snapshot does not show, the warning is
1048
+ * simply wrong.
1049
+ */
1050
+ readonly unshareableData: UnshareableData[];
925
1051
  menuItems(): never[];
926
1052
  /**
927
1053
  * #getter
@@ -1005,14 +1131,22 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1005
1131
  */
1006
1132
  readonly numRows: number;
1007
1133
  /**
1008
- * #getter
1009
- * per-row index of the global column holding each ungapped sequence
1010
- * position, so seqPos -> column is a lookup rather than a scan of the row.
1011
- * The domain overlay resolves thousands of these per redraw.
1134
+ * #method
1135
+ * index of the global column holding each ungapped sequence position of a
1136
+ * row, so seqPos -> column is a lookup rather than a scan. The domain
1137
+ * overlay resolves thousands of these per redraw.
1138
+ *
1139
+ * Built per row, on the row asked for: the first lookup used to index
1140
+ * every row in the alignment. The cache is keyed on the parse the rows
1141
+ * came from, so a new alignment brings a new one.
1012
1142
  */
1013
- readonly seqPosGlobalColIndex: Map<string, Int32Array<ArrayBuffer>>;
1143
+ seqPosIndex(rowName: string): Int32Array | undefined;
1014
1144
  /**
1015
1145
  * #getter
1146
+ * every sequence the alignment holds, keyed by row name, whatever the
1147
+ * tree currently shows. `rows` is the rows on screen; this is the rows
1148
+ * that exist, and every lookup about a named row goes through it --
1149
+ * collapsing a clade hides rows, it does not delete their sequence
1016
1150
  */
1017
1151
  readonly rowMap: Map<string, string>;
1018
1152
  /**
@@ -1089,9 +1223,25 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1089
1223
  readonly leaves: HierarchyNode<NodeWithIdsAndLength>[];
1090
1224
  /**
1091
1225
  * #getter
1092
- * max branch length across the tree, used to scale phylogram x-positions
1226
+ * branch-length extent of the displayed tree, root to farthest tip, in
1227
+ * the tree's own units
1228
+ */
1229
+ readonly rootToTipLength: number;
1230
+ /**
1231
+ * #getter
1232
+ * x-position of the farthest tip in a phylogram, px. The layout scales
1233
+ * the longest root-to-tip path onto treeWidth, so that is where it lands
1234
+ * -- and 0 for a tree carrying no lengths at all, which draws as a
1235
+ * cladogram instead
1093
1236
  */
1094
1237
  readonly maxBranchLength: number;
1238
+ /**
1239
+ * #getter
1240
+ * pixels per unit of branch length in the current phylogram layout, and 0
1241
+ * in cladogram mode, where the x-positions carry no length at all. The
1242
+ * scale bar over the tree is drawn from it.
1243
+ */
1244
+ readonly pxPerBranchLength: number;
1095
1245
  /**
1096
1246
  * #getter
1097
1247
  * max topological depth to a tip, used to scale cladogram x-positions
@@ -1112,43 +1262,6 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1112
1262
  */
1113
1263
  readonly totalWidth: number;
1114
1264
  } & {
1115
- /**
1116
- * #getter
1117
- */
1118
- readonly dataInitialized: boolean;
1119
- /**
1120
- * #getter
1121
- */
1122
- readonly blocksX: number[];
1123
- /**
1124
- * #getter
1125
- */
1126
- readonly blocksY: number[];
1127
- /**
1128
- * #getter
1129
- * height of the alignment viewport, px. The same subtraction as
1130
- * msaAreaHeight, which is defined later in the views chain
1131
- */
1132
- readonly visibleMsaHeight: number;
1133
- } & {
1134
- /**
1135
- * #getter
1136
- */
1137
- readonly blocks2d: (readonly [number, number])[];
1138
- /**
1139
- * #getter
1140
- */
1141
- readonly isLoading: boolean;
1142
- /**
1143
- * #getter
1144
- */
1145
- readonly maxScrollX: number;
1146
- /**
1147
- * #getter
1148
- * most-negative allowed scrollY, keeping the last row in view rather than
1149
- * letting the whole alignment scroll off the top.
1150
- */
1151
- readonly maxScrollY: number;
1152
1265
  /**
1153
1266
  * #getter
1154
1267
  */
@@ -1157,113 +1270,6 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1157
1270
  * #getter
1158
1271
  */
1159
1272
  readonly showTreeText: boolean;
1160
- } & {
1161
- /**
1162
- * #action
1163
- */
1164
- setDrawMsaLetters(arg: boolean): void;
1165
- /**
1166
- * #action
1167
- */
1168
- setScrollZoom(arg: boolean): void;
1169
- /**
1170
- * #action
1171
- * set hovered tree node and its descendants
1172
- */
1173
- setHoveredTreeNode(nodeId?: string): void;
1174
- /**
1175
- * #action
1176
- * Calculate a neighbor joining tree from the current MSA using BLOSUM62 distances
1177
- */
1178
- calculateNeighborJoiningTreeFromMSA(): void;
1179
- /**
1180
- * #action
1181
- * restore the default column width and row height
1182
- */
1183
- resetZoom(): void;
1184
- /**
1185
- * #action
1186
- */
1187
- zoomOutHorizontal(): void;
1188
- /**
1189
- * #action
1190
- */
1191
- zoomInHorizontal(): void;
1192
- /**
1193
- * #action
1194
- */
1195
- zoomInVertical(): void;
1196
- /**
1197
- * #action
1198
- */
1199
- zoomOutVertical(): void;
1200
- /**
1201
- * #action
1202
- */
1203
- zoomIn(): void;
1204
- /**
1205
- * #action
1206
- */
1207
- zoomOut(): void;
1208
- /**
1209
- * #action
1210
- * Smoothly zoom by a continuous scaleFactor. The column under the cursor
1211
- * (offsetX/offsetY, px relative to the MSA area) stays anchored
1212
- * horizontally. Vertically the anchor is biased toward the top: when the
1213
- * alignment nearly fits the viewport, snap to y=0 rather than pinning a
1214
- * random row under the cursor, with the bias fading out as the alignment
1215
- * grows taller than the viewport (where cursor-anchoring is useful).
1216
- * Drives wheel/trackpad-pinch zoom.
1217
- */
1218
- zoomToPos(scaleFactor: number, offsetX: number, offsetY: number): void;
1219
- /**
1220
- * #action
1221
- */
1222
- doScrollY(deltaY: number): void;
1223
- /**
1224
- * #action
1225
- * set scroll Y-offset (px), clamped to keep the alignment in view
1226
- */
1227
- setScrollY(n: number): void;
1228
- /**
1229
- * #action
1230
- * Set the overlay annotations and reveal the overlay in a single step (an
1231
- * empty list clears both). Every source funnels through here after its
1232
- * own adapter has flattened it: InterProScan, GFF, user uploads, NCBI CDD.
1233
- */
1234
- setAnnotations(annotations: Annotation[]): void;
1235
- /**
1236
- * #action
1237
- * set the overlay from raw InterProScan results keyed by row name. Kept
1238
- * for downstream plugins that hold the EBI wire format; new code should
1239
- * adapt to Annotation[] and call setAnnotations.
1240
- */
1241
- setDomains(data?: Record<string, InterProScanResults>): void;
1242
- applyGFFText(gffText: string): void;
1243
- /**
1244
- * #action
1245
- */
1246
- doScrollX(deltaX: number): void;
1247
- /**
1248
- * #action
1249
- */
1250
- setScrollX(n: number): void;
1251
- /**
1252
- * #action
1253
- */
1254
- setColumnTracks(tracks: ColumnTrackSpec[]): void;
1255
- /**
1256
- * #action
1257
- */
1258
- toggleTrack(id: string): void;
1259
- /**
1260
- * #action
1261
- */
1262
- setStatus(status?: {
1263
- msg: string;
1264
- url?: string;
1265
- onCancel?: () => void;
1266
- }): void;
1267
1273
  } & {
1268
1274
  /**
1269
1275
  * #getter
@@ -1284,6 +1290,13 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1284
1290
  * #getter
1285
1291
  */
1286
1292
  readonly seqConsensus: string | undefined;
1293
+ /**
1294
+ * #getter
1295
+ * the base pairs of the consensus secondary structure, as arcs. The WUSS
1296
+ * string is collapsed through the hidden columns before it is parsed, so
1297
+ * the pairs land in the same visible column space the text track does
1298
+ */
1299
+ readonly secondaryStructureArcs: Arc[] | undefined;
1287
1300
  /**
1288
1301
  * #getter
1289
1302
  */
@@ -1296,6 +1309,7 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1296
1309
  readonly columnTrackContent: Map<string, {
1297
1310
  values?: number[];
1298
1311
  data?: string;
1312
+ arcs?: Arc[];
1299
1313
  }>;
1300
1314
  /**
1301
1315
  * #getter
@@ -1304,6 +1318,20 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1304
1318
  /**
1305
1319
  * #getter
1306
1320
  */
1321
+ /**
1322
+ * #getter
1323
+ * the consensus secondary structure as a track, when there is one. Its
1324
+ * own getter so the object keeps its identity across a zoom: the canvas
1325
+ * redraws on the track it is handed changing, and rebuilding these
1326
+ * alongside everything else made every zoom frame redraw every track
1327
+ */
1328
+ readonly basePairTrackModels: BasicTrack[];
1329
+ /**
1330
+ * #getter
1331
+ * the tracks computed from the alignment itself, which depend on their
1332
+ * own heights and on the alphabet -- and on nothing zoom changes
1333
+ */
1334
+ readonly computedTrackModels: BasicTrack[];
1307
1335
  readonly tracks: BasicTrack[];
1308
1336
  /**
1309
1337
  * #getter
@@ -1327,10 +1355,10 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1327
1355
  * Convert a visible column to a row-specific sequence position (0-based).
1328
1356
  * Returns undefined if the position is a gap in the sequence.
1329
1357
  *
1330
- * CROSS-REPO CONTRACT: this and the sibling coordinate converters
1331
- * (seqPosToVisibleCol, globalColToVisibleCol, seqPosToGlobalCol) are used
1332
- * by jbrowse-plugin-protein3d to translate between alignment columns and
1333
- * structure/sequence residue positions across gaps. Keep them stable.
1358
+ * PUBLIC API: this and the sibling coordinate converters
1359
+ * (visibleColToGlobalCol, seqPosToVisibleCol, globalColToVisibleCol,
1360
+ * seqPosToGlobalCol) are how a host translates between alignment columns
1361
+ * and a row's residue positions across gaps. Keep them stable.
1334
1362
  *
1335
1363
  * @param rowName - The name of the row
1336
1364
  * @param visibleCol - The visible column index
@@ -1357,15 +1385,28 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1357
1385
  * @returns The visible column index, or undefined if the column is hidden
1358
1386
  */
1359
1387
  globalColToVisibleCol(globalCol: number): number | undefined;
1388
+ /**
1389
+ * #method
1390
+ * Convert a visible column index (what a mouse handler reports) back to a
1391
+ * column of the full alignment. Hidden columns shift everything to their
1392
+ * right, so a host that holds per-column data of its own has to make this
1393
+ * hop before indexing it.
1394
+ *
1395
+ * @param visibleCol - The visible column index
1396
+ * @returns The global column index in the full MSA
1397
+ */
1398
+ visibleColToGlobalCol(visibleCol: number): number;
1360
1399
  /**
1361
1400
  * #method
1362
1401
  * Convert a sequence position (ungapped) to a global column index.
1402
+ * Returns undefined for a row the alignment does not have -- answering
1403
+ * anyway is how a mistyped or stale row name came to highlight column 0.
1363
1404
  *
1364
1405
  * @param rowName - The name of the row
1365
1406
  * @param seqPos - The sequence position (0-based, ungapped)
1366
- * @returns The global column index in the full MSA
1407
+ * @returns The global column index in the full MSA, or undefined
1367
1408
  */
1368
- seqPosToGlobalCol(rowName: string, seqPos: number): number;
1409
+ seqPosToGlobalCol(rowName: string, seqPos: number): number | undefined;
1369
1410
  /**
1370
1411
  * #method
1371
1412
  * Convert a sequence position (ungapped) directly to a visible column index.
@@ -1376,10 +1417,73 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1376
1417
  * @returns The visible column index, or undefined if the column is hidden
1377
1418
  */
1378
1419
  seqPosToVisibleCol(rowName: string, seqPos: number): number | undefined;
1420
+ /**
1421
+ * #getter
1422
+ * every reason a mapping is being ignored, so a host can say which. A
1423
+ * mapping outlives the alignment it was computed for; when the two no
1424
+ * longer agree the lookups have to refuse, and refusing invisibly is how
1425
+ * "there is no structure here" gets confused with "this data is stale".
1426
+ */
1427
+ readonly residueMappingProblems: ResidueMappingProblem[];
1428
+ /**
1429
+ * #getter
1430
+ * the mappings that still fit the loaded alignment. A row-level problem
1431
+ * takes the whole mapping out; a single malformed segment takes only
1432
+ * itself, since the rest of the mapping is still a claim about residues
1433
+ * that exist.
1434
+ */
1435
+ readonly usableResidueMappings: ResidueMapping[];
1436
+ /**
1437
+ * #getter
1438
+ * the structures the loaded alignment has usable mappings onto. A row can
1439
+ * have several -- an experimental entry and a predicted model, say -- so
1440
+ * a host that means a particular one has to name it.
1441
+ */
1442
+ readonly mappedStructures: {
1443
+ row: string;
1444
+ structure: import("./types.ts").MappedStructure;
1445
+ }[];
1446
+ /**
1447
+ * #method
1448
+ * The structure residue a row residue is, or undefined. Refusing is the
1449
+ * point: the guess this replaces answered every query, with a wrong
1450
+ * residue when it did not know.
1451
+ *
1452
+ * It also refuses when the answer is not unique. A row commonly maps onto
1453
+ * several structures -- an experimental entry and two predicted models --
1454
+ * and returning whichever came first would be the same class of wrong,
1455
+ * quieter. Name one with `structureId`, or use `mappedStructures` to see
1456
+ * what there is.
1457
+ *
1458
+ * Positions are 1-based, as `residueMappings` and `highlights` are --
1459
+ * note that the column helpers above take 0-based ones.
1460
+ *
1461
+ * @param rowName - The alignment row
1462
+ * @param seqPos - Residue of that row, 1-based
1463
+ * @param structureId - Which structure, when the row maps onto several
1464
+ */
1465
+ structureResidue(rowName: string, seqPos: number, structureId?: string): StructureResidue | undefined;
1466
+ /**
1467
+ * #method
1468
+ * The row residue a structure residue is, the same lookup backwards, and
1469
+ * refusing on the same terms. `asymId` picks between mappings onto the
1470
+ * same entry, which a homodimer -- two rows, two chains, one id -- always
1471
+ * needs; without it such a lookup is ambiguous and gets nothing.
1472
+ *
1473
+ * @param structureId - The structure's id, as the mapping names it
1474
+ * @param position - Residue of that structure, 1-based label_seq_id
1475
+ * @param asymId - Which chain, when the id alone is ambiguous
1476
+ */
1477
+ rowResidue(structureId: string, position: number, asymId?: string): RowResidue | undefined;
1379
1478
  } & {
1380
1479
  /**
1381
1480
  * #getter
1382
- * widget width minus the tree area gives the space for the MSA
1481
+ * the vertical space the alignment rows actually get: the widget height
1482
+ * less everything stacked above and below them -- the header, the tracks,
1483
+ * and the minimap when the columns overflow. Every consumer wants this
1484
+ * same subtraction, so there is one of it: blocksY, maxScrollY, the
1485
+ * vertical scrollbar and fitVertically all read it, and a second getter
1486
+ * that forgot the tracks is what put the last rows out of reach.
1383
1487
  */
1384
1488
  readonly msaAreaHeight: number;
1385
1489
  /**
@@ -1399,6 +1503,165 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1399
1503
  * #getter
1400
1504
  */
1401
1505
  readonly showVerticalScrollbar: boolean;
1506
+ } & {
1507
+ /**
1508
+ * #getter
1509
+ */
1510
+ readonly dataInitialized: boolean;
1511
+ /**
1512
+ * #getter
1513
+ */
1514
+ readonly blocksX: number[];
1515
+ /**
1516
+ * #getter
1517
+ */
1518
+ readonly blocksY: number[];
1519
+ } & {
1520
+ /**
1521
+ * #getter
1522
+ */
1523
+ readonly blocks2d: (readonly [number, number])[];
1524
+ /**
1525
+ * #getter
1526
+ */
1527
+ readonly isLoading: boolean;
1528
+ /**
1529
+ * #getter
1530
+ */
1531
+ readonly maxScrollX: number;
1532
+ /**
1533
+ * #getter
1534
+ * most-negative allowed scrollY, keeping the last row in view rather than
1535
+ * letting the whole alignment scroll off the top.
1536
+ */
1537
+ readonly maxScrollY: number;
1538
+ } & {
1539
+ /**
1540
+ * #action
1541
+ */
1542
+ setDrawMsaLetters(arg: boolean): void;
1543
+ /**
1544
+ * #action
1545
+ */
1546
+ setScrollZoom(arg: boolean): void;
1547
+ /**
1548
+ * #action
1549
+ * set hovered tree node and its descendants
1550
+ */
1551
+ setHoveredTreeNode(nodeId?: string): void;
1552
+ /**
1553
+ * #action
1554
+ * Calculate a neighbor joining tree from the current MSA using BLOSUM62
1555
+ * distances. Refuses above `maxNeighborJoiningRows`: the join loop is
1556
+ * cubic and runs on the main thread, so 800 rows is a ten-second freeze
1557
+ * with no progress and no cancel, and a tree that size wants a tool built
1558
+ * for it anyway.
1559
+ */
1560
+ calculateNeighborJoiningTreeFromMSA(): void;
1561
+ /**
1562
+ * #action
1563
+ * swap in a different tree over the same alignment. Node ids are derived
1564
+ * from the path (node-0-0-1), so a `collapsed` or `showOnly` id held over
1565
+ * from the old tree matches a real node in the new one and folds whatever
1566
+ * happens to sit there -- the ids go with the tree they name.
1567
+ */
1568
+ replaceTree(newick: string): void;
1569
+ /**
1570
+ * #action
1571
+ * restore the default column width and row height
1572
+ */
1573
+ resetZoom(): void;
1574
+ /**
1575
+ * #action
1576
+ */
1577
+ zoomOutHorizontal(): void;
1578
+ /**
1579
+ * #action
1580
+ */
1581
+ zoomInHorizontal(): void;
1582
+ /**
1583
+ * #action
1584
+ */
1585
+ zoomInVertical(): void;
1586
+ /**
1587
+ * #action
1588
+ */
1589
+ zoomOutVertical(): void;
1590
+ /**
1591
+ * #action
1592
+ */
1593
+ zoomIn(): void;
1594
+ /**
1595
+ * #action
1596
+ */
1597
+ zoomOut(): void;
1598
+ /**
1599
+ * #action
1600
+ * Smoothly zoom by a continuous scaleFactor. The column under the cursor
1601
+ * (offsetX/offsetY, px relative to the MSA area) stays anchored
1602
+ * horizontally. Vertically the anchor is biased toward the top: when the
1603
+ * alignment nearly fits the viewport, snap to y=0 rather than pinning a
1604
+ * random row under the cursor, with the bias fading out as the alignment
1605
+ * grows taller than the viewport (where cursor-anchoring is useful).
1606
+ * Drives wheel/trackpad-pinch zoom.
1607
+ */
1608
+ zoomToPos(scaleFactor: number, offsetX: number, offsetY: number): void;
1609
+ /**
1610
+ * #action
1611
+ */
1612
+ doScrollY(deltaY: number): void;
1613
+ /**
1614
+ * #action
1615
+ * set scroll Y-offset (px), clamped to keep the alignment in view
1616
+ */
1617
+ setScrollY(n: number): void;
1618
+ /**
1619
+ * #action
1620
+ * Set the overlay annotations (an empty list clears them). Every source
1621
+ * funnels through here after its own adapter has flattened it:
1622
+ * InterProScan, GFF, user uploads, NCBI CDD.
1623
+ *
1624
+ * It does not touch `showDomains`. Loading used to force the overlay on,
1625
+ * and since a restored snapshot loads its GFF again on the way in, a link
1626
+ * shared with the overlay hidden reopened with it drawn.
1627
+ */
1628
+ setAnnotations(annotations: Annotation[]): void;
1629
+ /**
1630
+ * #action
1631
+ * set the overlay from raw InterProScan results keyed by row name. Kept
1632
+ * for downstream plugins that hold the EBI wire format; new code should
1633
+ * adapt to Annotation[] and call setAnnotations.
1634
+ */
1635
+ setDomains(data?: Record<string, InterProScanResults>): void;
1636
+ applyGFFText(gffText: string): void;
1637
+ /**
1638
+ * #action
1639
+ */
1640
+ doScrollX(deltaX: number): void;
1641
+ /**
1642
+ * #action
1643
+ */
1644
+ setScrollX(n: number): void;
1645
+ /**
1646
+ * #action
1647
+ */
1648
+ setColumnTracks(tracks: ColumnTrackSpec[]): void;
1649
+ /**
1650
+ * #action
1651
+ * replace the alignment<->structure correspondence (see docs/layers.md)
1652
+ */
1653
+ setResidueMappings(mappings: ResidueMapping[]): void;
1654
+ /**
1655
+ * #action
1656
+ */
1657
+ toggleTrack(id: string): void;
1658
+ /**
1659
+ * #action
1660
+ */
1661
+ setStatus(status?: {
1662
+ msg: string;
1663
+ onCancel?: () => void;
1664
+ }): void;
1402
1665
  } & {
1403
1666
  /**
1404
1667
  * #getter
@@ -1536,10 +1799,18 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1536
1799
  * #action
1537
1800
  */
1538
1801
  setConservationTrackHeight(arg: number): void;
1802
+ /**
1803
+ * #action
1804
+ */
1805
+ setColumnTrackHeight(id: string, height: number): void;
1539
1806
  /**
1540
1807
  * #action
1541
1808
  */
1542
1809
  setSequenceLogoTrackHeight(arg: number): void;
1810
+ /**
1811
+ * #action
1812
+ */
1813
+ setArcTrackHeight(arg: number): void;
1543
1814
  /**
1544
1815
  * #action
1545
1816
  * Return to the import form: every property off `preservedOnReset`
@@ -1552,8 +1823,12 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1552
1823
  * #action
1553
1824
  */
1554
1825
  exportSVG(opts: ExportSvgOptions): Promise<void>;
1555
- initFilter(arg: string): void;
1556
- setFilter(arg: string, flag: boolean): void;
1826
+ /**
1827
+ * #action
1828
+ * draw this annotation type, or stop drawing it. Only the "stop" is
1829
+ * recorded -- see `turnedOffFeatures`
1830
+ */
1831
+ setFilter(accession: string, shown: boolean): void;
1557
1832
  /**
1558
1833
  * #action
1559
1834
  */
@@ -1679,7 +1954,8 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1679
1954
  collapsed: string[];
1680
1955
  showOnly: string | undefined;
1681
1956
  turnedOffTracks: import("mobx").IKeyValueMap<boolean>;
1682
- featureFilters: import("mobx").IKeyValueMap<boolean>;
1957
+ residueMappings: ResidueMapping[];
1958
+ turnedOffFeatures: import("mobx").IKeyValueMap<boolean>;
1683
1959
  relativeTo: string | undefined;
1684
1960
  highlightColumns: number[] | undefined;
1685
1961
  highlights: Highlight[];
@@ -1801,7 +2077,8 @@ declare function stateModelFactory(): import("@jbrowse/mobx-state-tree").IModelT
1801
2077
  collapsed: string[];
1802
2078
  showOnly: string | undefined;
1803
2079
  turnedOffTracks: import("mobx").IKeyValueMap<boolean>;
1804
- featureFilters: import("mobx").IKeyValueMap<boolean>;
2080
+ residueMappings: ResidueMapping[];
2081
+ turnedOffFeatures: import("mobx").IKeyValueMap<boolean>;
1805
2082
  relativeTo: string | undefined;
1806
2083
  highlightColumns: number[] | undefined;
1807
2084
  highlights: Highlight[];