jbrowse-plugin-msaview 2.4.4 → 2.4.5

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 (170) hide show
  1. package/dist/AddHighlightModel/GenomeMouseoverHighlight.js +2 -2
  2. package/dist/AddHighlightModel/HighlightComponents.js +0 -1
  3. package/dist/AddHighlightModel/MsaToGenomeHighlight.js +5 -3
  4. package/dist/AddHighlightModel/index.js +2 -2
  5. package/dist/AddHighlightModel/util.d.ts +1 -6
  6. package/dist/AddHighlightModel/util.js +1 -7
  7. package/dist/BgzipFastaMsaAdapter/BgzipFastaMsaAdapter.js +0 -1
  8. package/dist/BgzipFastaMsaAdapter/configSchema.js +0 -1
  9. package/dist/BgzipFastaMsaAdapter/index.js +0 -1
  10. package/dist/LaunchMsaView/components/LaunchMsaViewDialog.js +0 -1
  11. package/dist/LaunchMsaView/components/LaunchPanelContent.js +0 -1
  12. package/dist/LaunchMsaView/components/ManualMSALoader/ManualMSALoader.js +0 -1
  13. package/dist/LaunchMsaView/components/ManualMSALoader/fetchGeneList.js +0 -1
  14. package/dist/LaunchMsaView/components/ManualMSALoader/launchView.js +0 -1
  15. package/dist/LaunchMsaView/components/NCBIBlastQuery/CachedBlastResults.js +0 -1
  16. package/dist/LaunchMsaView/components/NCBIBlastQuery/MsaAlgorithmSelect.js +0 -1
  17. package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastAutomaticPanel.js +0 -1
  18. package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastManualPanel.js +0 -1
  19. package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastMethodSelector.js +0 -1
  20. package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastPanel.js +0 -1
  21. package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastRIDPanel.js +0 -1
  22. package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBISettingsDialog.js +0 -1
  23. package/dist/LaunchMsaView/components/NCBIBlastQuery/blastLaunchView.js +0 -1
  24. package/dist/LaunchMsaView/components/NCBIBlastQuery/consts.js +0 -1
  25. package/dist/LaunchMsaView/components/NCBIBlastQuery/useCachedBlastResults.js +0 -1
  26. package/dist/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.js +0 -1
  27. package/dist/LaunchMsaView/components/PreLoadedMSA/fetchMSAData.js +0 -1
  28. package/dist/LaunchMsaView/components/PreLoadedMSA/preCalculatedLaunchView.js +0 -1
  29. package/dist/LaunchMsaView/components/PreLoadedMSA/types.js +0 -1
  30. package/dist/LaunchMsaView/components/SubmitCancelActions.js +0 -1
  31. package/dist/LaunchMsaView/components/TabPanel.js +1 -2
  32. package/dist/LaunchMsaView/components/TranscriptSelector.js +0 -1
  33. package/dist/LaunchMsaView/components/calculateProteinSequence.js +0 -1
  34. package/dist/LaunchMsaView/components/fetchSeq.js +0 -1
  35. package/dist/LaunchMsaView/components/types.js +0 -1
  36. package/dist/LaunchMsaView/components/useFeatureSequence.js +0 -1
  37. package/dist/LaunchMsaView/components/useSWRFeatureSequence.js +0 -1
  38. package/dist/LaunchMsaView/components/useTranscriptSelection.js +0 -1
  39. package/dist/LaunchMsaView/components/util.js +0 -1
  40. package/dist/LaunchMsaView/index.js +0 -1
  41. package/dist/LaunchMsaView/util.js +0 -1
  42. package/dist/LaunchMsaViewExtensionPoint/index.js +0 -1
  43. package/dist/MsaViewPanel/afterCreateAutoruns.d.ts +0 -1
  44. package/dist/MsaViewPanel/afterCreateAutoruns.js +4 -22
  45. package/dist/MsaViewPanel/blosum62.js +0 -1
  46. package/dist/MsaViewPanel/components/ConnectStructureDialog.js +0 -1
  47. package/dist/MsaViewPanel/components/ErrorBoundary.d.ts +1 -1
  48. package/dist/MsaViewPanel/components/ErrorBoundary.js +0 -1
  49. package/dist/MsaViewPanel/components/LoadingBLAST.js +0 -1
  50. package/dist/MsaViewPanel/components/MsaViewPanel.js +0 -1
  51. package/dist/MsaViewPanel/components/RIDLink.js +0 -1
  52. package/dist/MsaViewPanel/doLaunchBlast.js +0 -1
  53. package/dist/MsaViewPanel/genomeToMSA.d.ts +0 -6
  54. package/dist/MsaViewPanel/genomeToMSA.js +8 -30
  55. package/dist/MsaViewPanel/genomeToMSA.test.js +0 -1
  56. package/dist/MsaViewPanel/index.js +0 -1
  57. package/dist/MsaViewPanel/model.d.ts +8 -18
  58. package/dist/MsaViewPanel/model.js +21 -32
  59. package/dist/MsaViewPanel/msaCoordToGenomeCoord.js +5 -22
  60. package/dist/MsaViewPanel/msaCoordToGenomeCoord.test.js +0 -1
  61. package/dist/MsaViewPanel/msaDataStore.js +0 -1
  62. package/dist/MsaViewPanel/pairwiseAlignment.js +0 -1
  63. package/dist/MsaViewPanel/pairwiseAlignment.test.js +0 -1
  64. package/dist/MsaViewPanel/structureConnection.js +0 -1
  65. package/dist/MsaViewPanel/structureConnection.test.js +0 -1
  66. package/dist/MsaViewPanel/types.js +0 -1
  67. package/dist/MsaViewPanel/util.d.ts +1 -3
  68. package/dist/MsaViewPanel/util.js +1 -3
  69. package/dist/components/ExternalLink.js +0 -1
  70. package/dist/components/ReadOnlyTextField2.js +0 -1
  71. package/dist/components/TextField2.js +0 -1
  72. package/dist/index.js +0 -1
  73. package/dist/jbrowse-plugin-msaview.umd.production.min.js +37 -37
  74. package/dist/jbrowse-plugin-msaview.umd.production.min.js.map +4 -4
  75. package/dist/utils/blastCache.js +2 -5
  76. package/dist/utils/fetch.js +0 -1
  77. package/dist/utils/msa.js +0 -1
  78. package/dist/utils/ncbiBlast.js +0 -1
  79. package/dist/utils/swrConfig.js +0 -1
  80. package/dist/utils/taxonomyNames.js +0 -1
  81. package/dist/utils/types.js +0 -1
  82. package/dist/version.d.ts +1 -1
  83. package/dist/version.js +1 -2
  84. package/package.json +4 -4
  85. package/src/AddHighlightModel/GenomeMouseoverHighlight.tsx +4 -1
  86. package/src/AddHighlightModel/MsaToGenomeHighlight.tsx +5 -8
  87. package/src/AddHighlightModel/index.tsx +4 -1
  88. package/src/AddHighlightModel/util.ts +1 -10
  89. package/src/LaunchMsaView/components/TabPanel.tsx +1 -1
  90. package/src/MsaViewPanel/afterCreateAutoruns.ts +4 -23
  91. package/src/MsaViewPanel/genomeToMSA.ts +10 -29
  92. package/src/MsaViewPanel/model.ts +26 -33
  93. package/src/MsaViewPanel/msaCoordToGenomeCoord.ts +5 -21
  94. package/src/MsaViewPanel/util.ts +3 -7
  95. package/src/utils/blastCache.ts +2 -4
  96. package/src/version.ts +1 -1
  97. package/dist/AddHighlightModel/GenomeMouseoverHighlight.js.map +0 -1
  98. package/dist/AddHighlightModel/HighlightComponents.js.map +0 -1
  99. package/dist/AddHighlightModel/MsaToGenomeHighlight.js.map +0 -1
  100. package/dist/AddHighlightModel/index.js.map +0 -1
  101. package/dist/AddHighlightModel/util.js.map +0 -1
  102. package/dist/BgzipFastaMsaAdapter/BgzipFastaMsaAdapter.js.map +0 -1
  103. package/dist/BgzipFastaMsaAdapter/configSchema.js.map +0 -1
  104. package/dist/BgzipFastaMsaAdapter/index.js.map +0 -1
  105. package/dist/LaunchMsaView/components/LaunchMsaViewDialog.js.map +0 -1
  106. package/dist/LaunchMsaView/components/LaunchPanelContent.js.map +0 -1
  107. package/dist/LaunchMsaView/components/ManualMSALoader/ManualMSALoader.js.map +0 -1
  108. package/dist/LaunchMsaView/components/ManualMSALoader/fetchGeneList.js.map +0 -1
  109. package/dist/LaunchMsaView/components/ManualMSALoader/launchView.js.map +0 -1
  110. package/dist/LaunchMsaView/components/NCBIBlastQuery/CachedBlastResults.js.map +0 -1
  111. package/dist/LaunchMsaView/components/NCBIBlastQuery/MsaAlgorithmSelect.js.map +0 -1
  112. package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastAutomaticPanel.js.map +0 -1
  113. package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastManualPanel.js.map +0 -1
  114. package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastMethodSelector.js.map +0 -1
  115. package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastPanel.js.map +0 -1
  116. package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastRIDPanel.js.map +0 -1
  117. package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBISettingsDialog.js.map +0 -1
  118. package/dist/LaunchMsaView/components/NCBIBlastQuery/blastLaunchView.js.map +0 -1
  119. package/dist/LaunchMsaView/components/NCBIBlastQuery/consts.js.map +0 -1
  120. package/dist/LaunchMsaView/components/NCBIBlastQuery/useCachedBlastResults.js.map +0 -1
  121. package/dist/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.js.map +0 -1
  122. package/dist/LaunchMsaView/components/PreLoadedMSA/fetchMSAData.js.map +0 -1
  123. package/dist/LaunchMsaView/components/PreLoadedMSA/preCalculatedLaunchView.js.map +0 -1
  124. package/dist/LaunchMsaView/components/PreLoadedMSA/types.js.map +0 -1
  125. package/dist/LaunchMsaView/components/SubmitCancelActions.js.map +0 -1
  126. package/dist/LaunchMsaView/components/TabPanel.js.map +0 -1
  127. package/dist/LaunchMsaView/components/TranscriptSelector.js.map +0 -1
  128. package/dist/LaunchMsaView/components/calculateProteinSequence.js.map +0 -1
  129. package/dist/LaunchMsaView/components/fetchSeq.js.map +0 -1
  130. package/dist/LaunchMsaView/components/types.js.map +0 -1
  131. package/dist/LaunchMsaView/components/useFeatureSequence.js.map +0 -1
  132. package/dist/LaunchMsaView/components/useSWRFeatureSequence.js.map +0 -1
  133. package/dist/LaunchMsaView/components/useTranscriptSelection.js.map +0 -1
  134. package/dist/LaunchMsaView/components/util.js.map +0 -1
  135. package/dist/LaunchMsaView/index.js.map +0 -1
  136. package/dist/LaunchMsaView/util.js.map +0 -1
  137. package/dist/LaunchMsaViewExtensionPoint/index.js.map +0 -1
  138. package/dist/MsaViewPanel/afterCreateAutoruns.js.map +0 -1
  139. package/dist/MsaViewPanel/blosum62.js.map +0 -1
  140. package/dist/MsaViewPanel/components/ConnectStructureDialog.js.map +0 -1
  141. package/dist/MsaViewPanel/components/ErrorBoundary.js.map +0 -1
  142. package/dist/MsaViewPanel/components/LoadingBLAST.js.map +0 -1
  143. package/dist/MsaViewPanel/components/MsaViewPanel.js.map +0 -1
  144. package/dist/MsaViewPanel/components/RIDLink.js.map +0 -1
  145. package/dist/MsaViewPanel/doLaunchBlast.js.map +0 -1
  146. package/dist/MsaViewPanel/genomeToMSA.js.map +0 -1
  147. package/dist/MsaViewPanel/genomeToMSA.test.js.map +0 -1
  148. package/dist/MsaViewPanel/index.js.map +0 -1
  149. package/dist/MsaViewPanel/model.js.map +0 -1
  150. package/dist/MsaViewPanel/msaCoordToGenomeCoord.js.map +0 -1
  151. package/dist/MsaViewPanel/msaCoordToGenomeCoord.test.js.map +0 -1
  152. package/dist/MsaViewPanel/msaDataStore.js.map +0 -1
  153. package/dist/MsaViewPanel/pairwiseAlignment.js.map +0 -1
  154. package/dist/MsaViewPanel/pairwiseAlignment.test.js.map +0 -1
  155. package/dist/MsaViewPanel/structureConnection.js.map +0 -1
  156. package/dist/MsaViewPanel/structureConnection.test.js.map +0 -1
  157. package/dist/MsaViewPanel/types.js.map +0 -1
  158. package/dist/MsaViewPanel/util.js.map +0 -1
  159. package/dist/components/ExternalLink.js.map +0 -1
  160. package/dist/components/ReadOnlyTextField2.js.map +0 -1
  161. package/dist/components/TextField2.js.map +0 -1
  162. package/dist/index.js.map +0 -1
  163. package/dist/utils/blastCache.js.map +0 -1
  164. package/dist/utils/fetch.js.map +0 -1
  165. package/dist/utils/msa.js.map +0 -1
  166. package/dist/utils/ncbiBlast.js.map +0 -1
  167. package/dist/utils/swrConfig.js.map +0 -1
  168. package/dist/utils/taxonomyNames.js.map +0 -1
  169. package/dist/utils/types.js.map +0 -1
  170. package/dist/version.js.map +0 -1
@@ -2,9 +2,10 @@ import React from 'react';
2
2
  import { getSession } from '@jbrowse/core/util';
3
3
  import { observer } from 'mobx-react';
4
4
  import { hasHoverPosition, useStyles } from './util';
5
+ import { isMsaView } from '../MsaViewPanel/model';
5
6
  const GenomeMouseoverHighlight = observer(function ({ model, }) {
6
7
  const { hovered, views } = getSession(model);
7
- const hasMsaView = views.some(s => s.type === 'MsaView');
8
+ const hasMsaView = views.some(s => isMsaView(s) && s.connectedViewId === model.id);
8
9
  return hasMsaView && hasHoverPosition(hovered) ? (React.createElement(GenomeMouseoverHighlightRenderer, { model: model, hovered: hovered })) : null;
9
10
  });
10
11
  const GenomeMouseoverHighlightRenderer = observer(function ({ model, hovered, }) {
@@ -21,4 +22,3 @@ const GenomeMouseoverHighlightRenderer = observer(function ({ model, hovered, })
21
22
  return null;
22
23
  });
23
24
  export default GenomeMouseoverHighlight;
24
- //# sourceMappingURL=GenomeMouseoverHighlight.js.map
@@ -8,4 +8,3 @@ const HighlightComponents = observer(function HighlightComponents2({ model, }) {
8
8
  React.createElement(GenomeMouseoverHighlight, { model: model })));
9
9
  });
10
10
  export default HighlightComponents;
11
- //# sourceMappingURL=HighlightComponents.js.map
@@ -2,14 +2,17 @@ import React from 'react';
2
2
  import { getSession } from '@jbrowse/core/util';
3
3
  import { observer } from 'mobx-react';
4
4
  import { hasHoverPosition, useStyles } from './util';
5
+ import { isMsaView } from '../MsaViewPanel/model';
5
6
  import { getCanonicalRefName } from '../MsaViewPanel/util';
6
7
  const MsaToGenomeHighlight = observer(function MsaToGenomeHighlight2({ model, }) {
7
8
  const { views, hovered } = getSession(model);
8
- const msaView = views.find(f => f.type === 'MsaView');
9
+ const msaView = views
10
+ .filter(isMsaView)
11
+ .find(v => v.connectedViewId === model.id);
9
12
  const highlights = msaView?.connectedHighlights;
10
13
  // Suppress codon highlight while hovering the LGV — GenomeMouseoverHighlight
11
14
  // handles the single-bp display in that case
12
- return !hasHoverPosition(hovered) && highlights?.length ? (React.createElement(MsaToGenomeHighlightRenderer, { model: model, highlights: Array.from(highlights) })) : null;
15
+ return !hasHoverPosition(hovered) && highlights?.length ? (React.createElement(MsaToGenomeHighlightRenderer, { model: model, highlights: highlights })) : null;
13
16
  });
14
17
  // Inner component: handles the scroll-dependent rendering
15
18
  const MsaToGenomeHighlightRenderer = observer(function ({ model, highlights, }) {
@@ -33,4 +36,3 @@ const MsaToGenomeHighlightRenderer = observer(function ({ model, highlights, })
33
36
  })));
34
37
  });
35
38
  export default MsaToGenomeHighlight;
36
- //# sourceMappingURL=MsaToGenomeHighlight.js.map
@@ -1,13 +1,14 @@
1
1
  import React from 'react';
2
2
  import { getSession } from '@jbrowse/core/util';
3
3
  import HighlightComponents from './HighlightComponents';
4
+ import { isMsaView } from '../MsaViewPanel/model';
4
5
  export default function AddHighlightComponentsModelF(pluginManager) {
5
6
  pluginManager.addToExtensionPoint('LinearGenomeView-TracksContainerComponent',
6
7
  // @ts-expect-error
7
8
  (rest, { model }) => {
8
9
  // Quick check: don't add any components if no MSA view exists
9
10
  const { views } = getSession(model);
10
- const hasMsaView = views.some(v => v.type === 'MsaView');
11
+ const hasMsaView = views.some(v => isMsaView(v) && v.connectedViewId === model.id);
11
12
  if (!hasMsaView) {
12
13
  return rest;
13
14
  }
@@ -17,4 +18,3 @@ export default function AddHighlightComponentsModelF(pluginManager) {
17
18
  ];
18
19
  });
19
20
  }
20
- //# sourceMappingURL=index.js.map
@@ -1,9 +1,4 @@
1
- export declare function hasHoverPosition(hovered: unknown): hovered is {
2
- hoverPosition: {
3
- coord: number;
4
- refName: string;
5
- };
6
- };
1
+ export { hasHoverPosition } from '../MsaViewPanel/util';
7
2
  export declare const useStyles: (params: void, muiStyleOverridesParams?: {
8
3
  props: Record<string, unknown>;
9
4
  ownerState?: Record<string, unknown> | undefined;
@@ -1,10 +1,5 @@
1
1
  import { makeStyles } from 'tss-react/mui';
2
- export function hasHoverPosition(hovered) {
3
- return (!!hovered &&
4
- typeof hovered === 'object' &&
5
- 'hoverPosition' in hovered &&
6
- !!hovered.hoverPosition);
7
- }
2
+ export { hasHoverPosition } from '../MsaViewPanel/util';
8
3
  export const useStyles = makeStyles()({
9
4
  highlight: {
10
5
  height: '100%',
@@ -17,4 +12,3 @@ export const useStyles = makeStyles()({
17
12
  overflow: 'hidden',
18
13
  },
19
14
  });
20
- //# sourceMappingURL=util.js.map
@@ -56,4 +56,3 @@ export default class BgzipFastaMsaAdapter extends BaseAdapter {
56
56
  .pipe(toArray()));
57
57
  }
58
58
  }
59
- //# sourceMappingURL=BgzipFastaMsaAdapter.js.map
@@ -10,4 +10,3 @@ export default function configSchemaF(pluginManager) {
10
10
  baseConfiguration: base?.configSchema,
11
11
  });
12
12
  }
13
- //# sourceMappingURL=configSchema.js.map
@@ -12,4 +12,3 @@ export default function BgzipFastaMsaAdapterF(pluginManager) {
12
12
  });
13
13
  });
14
14
  }
15
- //# sourceMappingURL=index.js.map
@@ -26,4 +26,3 @@ export default function LaunchMsaViewDialog({ handleClose, feature, model, }) {
26
26
  React.createElement(TabPanel, { value: value, index: "manual_msa" },
27
27
  React.createElement(ManualMSALoader, { model: model, feature: feature, handleClose: handleClose }))));
28
28
  }
29
- //# sourceMappingURL=LaunchMsaViewDialog.js.map
@@ -13,4 +13,3 @@ export default function LaunchPanelContent({ error, children, }) {
13
13
  error ? React.createElement(ErrorMessage, { error: error }) : null,
14
14
  children));
15
15
  }
16
- //# sourceMappingURL=LaunchPanelContent.js.map
@@ -101,4 +101,3 @@ const ManualMSALoader = observer(function PreLoadedMSA2({ model, feature, handle
101
101
  }, onCancel: handleClose })));
102
102
  });
103
103
  export default ManualMSALoader;
104
- //# sourceMappingURL=ManualMSALoader.js.map
@@ -9,4 +9,3 @@ export async function fetchGeneList() {
9
9
  .map(f => f.trim())
10
10
  .filter(f => !!f);
11
11
  }
12
- //# sourceMappingURL=fetchGeneList.js.map
@@ -10,4 +10,3 @@ export function launchView({ session, newViewTitle, view, feature, msaFilehandle
10
10
  data,
11
11
  });
12
12
  }
13
- //# sourceMappingURL=launchView.js.map
@@ -77,4 +77,3 @@ const CachedBlastResults = observer(function ({ model, handleClose, feature, })
77
77
  React.createElement(ListItemText, { primary: `${getResultDisplayName(result)} - ${result.blastDatabase}/${result.blastProgram} (${result.msaAlgorithm})`, secondary: `${new Date(result.timestamp).toLocaleString()} - Seq: ${result.proteinSequence.slice(0, 30)}...` }))))))));
78
78
  });
79
79
  export default CachedBlastResults;
80
- //# sourceMappingURL=CachedBlastResults.js.map
@@ -7,4 +7,3 @@ export default function MsaAlgorithmSelect({ value, onChange, className, }) {
7
7
  onChange(event.target.value);
8
8
  } }, msaAlgorithms.map(val => (React.createElement(MenuItem, { value: val, key: val }, val)))));
9
9
  }
10
- //# sourceMappingURL=MsaAlgorithmSelect.js.map
@@ -94,4 +94,3 @@ const NCBIBlastAutomaticPanel = observer(function ({ handleClose, feature, model
94
94
  }, onCancel: handleClose })));
95
95
  });
96
96
  export default NCBIBlastAutomaticPanel;
97
- //# sourceMappingURL=NCBIBlastAutomaticPanel.js.map
@@ -40,4 +40,3 @@ const NCBIBlastManualPanel = observer(function ({ handleClose, feature, model, c
40
40
  } }, "Close"))));
41
41
  });
42
42
  export default NCBIBlastManualPanel;
43
- //# sourceMappingURL=NCBIBlastManualPanel.js.map
@@ -9,4 +9,3 @@ export default function NCBIBlastMethodSelector({ lookupMethod, setLookupMethod,
9
9
  React.createElement(FormControlLabel, { value: "rid", control: React.createElement(Radio, null), label: "Load from RID" }),
10
10
  React.createElement(FormControlLabel, { value: "manual", control: React.createElement(Radio, null), label: "Manual" }))));
11
11
  }
12
- //# sourceMappingURL=NCBIBlastMethodSelector.js.map
@@ -39,4 +39,3 @@ export default function NCBIBlastPanel({ handleClose, model, feature, }) {
39
39
  setSettingsOpen(false);
40
40
  } })) : null));
41
41
  }
42
- //# sourceMappingURL=NCBIBlastPanel.js.map
@@ -72,4 +72,3 @@ const NCBIBlastRIDPanel = observer(function ({ handleClose, feature, model, chil
72
72
  }, onCancel: handleClose })));
73
73
  });
74
74
  export default NCBIBlastRIDPanel;
75
- //# sourceMappingURL=NCBIBlastRIDPanel.js.map
@@ -30,4 +30,3 @@ export default function NCBISettingsDialog({ handleClose, baseUrl, }) {
30
30
  handleClose(tempBaseUrl);
31
31
  } }, "Save"))));
32
32
  }
33
- //# sourceMappingURL=NCBISettingsDialog.js.map
@@ -26,4 +26,3 @@ export function blastLaunchViewFromCache({ newViewTitle, view, cached, }) {
26
26
  },
27
27
  });
28
28
  }
29
- //# sourceMappingURL=blastLaunchView.js.map
@@ -2,4 +2,3 @@ export const BASE_BLAST_URL = 'https://blast.ncbi.nlm.nih.gov/Blast.cgi';
2
2
  export const msaAlgorithms = ['clustalo', 'muscle', 'kalign', 'mafft'];
3
3
  export const blastDatabaseOptions = ['nr', 'nr_cluster_seq'];
4
4
  export const blastPrograms = ['blastp', 'quick-blastp'];
5
- //# sourceMappingURL=consts.js.map
@@ -22,4 +22,3 @@ export function useCachedBlastResults(geneIds) {
22
22
  handleClearAll,
23
23
  };
24
24
  }
25
- //# sourceMappingURL=useCachedBlastResults.js.map
@@ -84,4 +84,3 @@ const PreLoadedMSA = observer(function ({ model, feature, handleClose, }) {
84
84
  }, onCancel: handleClose })));
85
85
  });
86
86
  export default PreLoadedMSA;
87
- //# sourceMappingURL=PreLoadedMSADataPanel.js.map
@@ -11,4 +11,3 @@ export async function fetchMSA({ config, pluginManager, msaId, }) {
11
11
  const adapter = await getMsaAdapter(pluginManager, config);
12
12
  return adapter.getMSA(msaId);
13
13
  }
14
- //# sourceMappingURL=fetchMSAData.js.map
@@ -16,4 +16,3 @@ export function preCalculatedLaunchView({ session, newViewTitle, view, feature,
16
16
  connectedFeature: feature.toJSON(),
17
17
  });
18
18
  }
19
- //# sourceMappingURL=preCalculatedLaunchView.js.map
@@ -2,4 +2,3 @@ import { readConfObject } from '@jbrowse/core/configuration';
2
2
  export function readMsaDatasets(jbrowse) {
3
3
  return readConfObject(jbrowse, ['msa', 'datasets']);
4
4
  }
5
- //# sourceMappingURL=types.js.map
@@ -9,4 +9,3 @@ export default function SubmitCancelActions({ onSubmit, onCancel, submitDisabled
9
9
  onCancel();
10
10
  } }, cancelLabel)));
11
11
  }
12
- //# sourceMappingURL=SubmitCancelActions.js.map
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  // this is from MUI example
3
3
  export default function TabPanel({ children, value, index, ...other }) {
4
- return (React.createElement("div", { role: "tabpanel", hidden: value !== index, ...other }, value === index ? React.createElement("div", null, children) : null));
4
+ return (React.createElement("div", { role: "tabpanel", hidden: value !== index, ...other }, value === index ? children : null));
5
5
  }
6
- //# sourceMappingURL=TabPanel.js.map
@@ -44,4 +44,3 @@ export default function TranscriptSelector({ feature, options, selectedId, selec
44
44
  ? `>${getTranscriptDisplayName(selectedTranscript)}\n${proteinSequence}`
45
45
  : 'Loading...' })) : null));
46
46
  }
47
- //# sourceMappingURL=TranscriptSelector.js.map
@@ -36,4 +36,3 @@ export function getProteinSequenceFromFeature({ feature, seq, }) {
36
36
  codonTable: generateCodonTable(defaultCodonTable),
37
37
  });
38
38
  }
39
- //# sourceMappingURL=calculateProteinSequence.js.map
@@ -20,4 +20,3 @@ export async function fetchSeq({ start, end, refName, session, assemblyName, })
20
20
  }));
21
21
  return feats[0]?.get('seq') ?? '';
22
22
  }
23
- //# sourceMappingURL=fetchSeq.js.map
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=types.js.map
@@ -17,4 +17,3 @@ export function useFeatureSequence({ view, feature, }) {
17
17
  error,
18
18
  };
19
19
  }
20
- //# sourceMappingURL=useFeatureSequence.js.map
@@ -23,4 +23,3 @@ export function useSWRFeatureSequence({ view, feature, }) {
23
23
  error,
24
24
  };
25
25
  }
26
- //# sourceMappingURL=useSWRFeatureSequence.js.map
@@ -32,4 +32,3 @@ export function useTranscriptSelection({ feature, view, validIds, }) {
32
32
  validIds,
33
33
  };
34
34
  }
35
- //# sourceMappingURL=useTranscriptSelection.js.map
@@ -14,4 +14,3 @@ export function makeId(h, taxonomyInfo) {
14
14
  export function strip(s) {
15
15
  return s.replaceAll('-', '');
16
16
  }
17
- //# sourceMappingURL=util.js.map
@@ -46,4 +46,3 @@ export default function LaunchMsaViewF(pluginManager) {
46
46
  return elt;
47
47
  });
48
48
  }
49
- //# sourceMappingURL=index.js.map
@@ -79,4 +79,3 @@ export function getGeneIdentifiers(feature) {
79
79
  feature.get('gene_name'),
80
80
  ]);
81
81
  }
82
- //# sourceMappingURL=util.js.map
@@ -28,4 +28,3 @@ export default function LaunchMsaViewExtensionPointF(pluginManager) {
28
28
  });
29
29
  });
30
30
  }
31
- //# sourceMappingURL=index.js.map
@@ -3,7 +3,6 @@ export declare function loadStoredData(self: JBrowsePluginMsaViewModel): void;
3
3
  export declare function storeDataToIndexedDB(self: JBrowsePluginMsaViewModel): void;
4
4
  export declare function launchBlastIfNeeded(self: JBrowsePluginMsaViewModel): void;
5
5
  export declare function processInit(self: JBrowsePluginMsaViewModel): void;
6
- export declare function updateGenomeHighlights(self: JBrowsePluginMsaViewModel): void;
7
6
  export declare function highlightConnectedStructures(self: JBrowsePluginMsaViewModel): void;
8
7
  export declare function autoConnectStructures(self: JBrowsePluginMsaViewModel): void;
9
8
  export declare function observeProteinHighlights(self: JBrowsePluginMsaViewModel): void;
@@ -1,15 +1,12 @@
1
1
  import { getSession } from '@jbrowse/core/util';
2
2
  import { doLaunchBlast } from './doLaunchBlast';
3
- import { msaCoordToGenomeCoord } from './msaCoordToGenomeCoord';
4
3
  import { cleanupOldData, generateDataStoreId, retrieveMsaData, storeMsaData, } from './msaDataStore';
5
4
  import { gappedToUngappedPosition, getProteinViews, } from './structureConnection';
6
5
  import { getUniprotIdFromAlphaFoldUrl } from './util';
7
6
  export function loadStoredData(self) {
8
7
  const { dataStoreId, rows } = self;
9
8
  if (dataStoreId && rows.length === 0) {
10
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
11
- ;
12
- (async () => {
9
+ void (async () => {
13
10
  try {
14
11
  self.setLoadingStoredData(true);
15
12
  const storedData = await retrieveMsaData(dataStoreId);
@@ -44,7 +41,7 @@ export function storeDataToIndexedDB(self) {
44
41
  // data observables change while the write is pending) don't kick off a
45
42
  // duplicate write and leave an orphan IndexedDB entry
46
43
  self.setIsStoringData(true);
47
- (async () => {
44
+ void (async () => {
48
45
  try {
49
46
  const newId = generateDataStoreId();
50
47
  const success = await storeMsaData(newId, {
@@ -68,9 +65,7 @@ export function storeDataToIndexedDB(self) {
68
65
  }
69
66
  export function launchBlastIfNeeded(self) {
70
67
  if (self.blastParams) {
71
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
72
- ;
73
- (async () => {
68
+ void (async () => {
74
69
  try {
75
70
  self.setProgress('Submitting query');
76
71
  self.setError(undefined);
@@ -91,9 +86,7 @@ export function launchBlastIfNeeded(self) {
91
86
  export function processInit(self) {
92
87
  const { init } = self;
93
88
  if (init) {
94
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
95
- ;
96
- (async () => {
89
+ void (async () => {
97
90
  try {
98
91
  self.setError(undefined);
99
92
  const { msaData, msaUrl, treeData, treeUrl, querySeqName } = init;
@@ -138,16 +131,6 @@ export function processInit(self) {
138
131
  })();
139
132
  }
140
133
  }
141
- export function updateGenomeHighlights(self) {
142
- const { mouseCol, mouseClickCol } = self;
143
- const r1 = mouseCol === undefined
144
- ? undefined
145
- : msaCoordToGenomeCoord({ model: self, coord: mouseCol });
146
- const r2 = mouseClickCol === undefined
147
- ? undefined
148
- : msaCoordToGenomeCoord({ model: self, coord: mouseClickCol });
149
- self.setConnectedHighlights([r1, r2].filter(f => !!f));
150
- }
151
134
  export function highlightConnectedStructures(self) {
152
135
  const { mouseCol, connectedProteinViews } = self;
153
136
  if (connectedProteinViews.length === 0) {
@@ -250,4 +233,3 @@ export function runCleanup() {
250
233
  console.error('Failed to cleanup old MSA data:', e);
251
234
  });
252
235
  }
253
- //# sourceMappingURL=afterCreateAutoruns.js.map
@@ -625,4 +625,3 @@ const BLOSUM62 = {
625
625
  },
626
626
  };
627
627
  export default BLOSUM62;
628
- //# sourceMappingURL=blosum62.js.map
@@ -58,4 +58,3 @@ const ConnectStructureDialog = observer(function ConnectStructureDialog({ model,
58
58
  React.createElement(Button, { onClick: handleConnect, variant: "contained", disabled: proteinViews.length === 0 || !selectedViewId }, "Connect"))));
59
59
  });
60
60
  export default ConnectStructureDialog;
61
- //# sourceMappingURL=ConnectStructureDialog.js.map
@@ -14,6 +14,6 @@ export declare class ErrorBoundary extends Component<Props, State> {
14
14
  error: unknown;
15
15
  };
16
16
  componentDidCatch(error: unknown, info: React.ErrorInfo): void;
17
- render(): string | number | bigint | boolean | React.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
17
+ render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
18
18
  }
19
19
  export {};
@@ -19,4 +19,3 @@ export class ErrorBoundary extends Component {
19
19
  return this.props.children;
20
20
  }
21
21
  }
22
- //# sourceMappingURL=ErrorBoundary.js.map
@@ -31,4 +31,3 @@ const LoadingBLAST = observer(function LoadingBLAST2({ model, baseUrl, }) {
31
31
  error ? (React.createElement(RIDError, { baseUrl: baseUrl, rid: rid, error: error })) : rid ? (React.createElement(RIDProgress, { baseUrl: baseUrl, rid: rid, progress: progress })) : (React.createElement(Typography, null, progress || 'Initializing BLAST query'))));
32
32
  });
33
33
  export default LoadingBLAST;
34
- //# sourceMappingURL=LoadingBLAST.js.map
@@ -18,4 +18,3 @@ const MsaViewPanel = observer(function MsaViewPanel2({ model, }) {
18
18
  React.createElement(LoadingEllipses, { message: "Loading MSA data", variant: "h6" }))) : (React.createElement(MSAView, { model: model })))));
19
19
  });
20
20
  export default MsaViewPanel;
21
- //# sourceMappingURL=MsaViewPanel.js.map
@@ -10,4 +10,3 @@ function RIDLink({ baseUrl, rid }) {
10
10
  ")"));
11
11
  }
12
12
  export default RIDLink;
13
- //# sourceMappingURL=RIDLink.js.map
@@ -102,4 +102,3 @@ function buildRowMetadata(desc, taxonomyInfo) {
102
102
  }
103
103
  return metadata;
104
104
  }
105
- //# sourceMappingURL=doLaunchBlast.js.map
@@ -1,10 +1,4 @@
1
1
  import type { JBrowsePluginMsaViewModel } from './model';
2
- /**
3
- * Convert a genome coordinate from session.hovered to a visible MSA column.
4
- *
5
- * @param model - The MSA view model
6
- * @returns The visible column index, or undefined if no mapping exists
7
- */
8
2
  export declare function genomeToMSA({ model }: {
9
3
  model: JBrowsePluginMsaViewModel;
10
4
  }): number | undefined;
@@ -1,48 +1,26 @@
1
1
  import { getSession } from '@jbrowse/core/util';
2
- import { checkHovered } from './util';
3
- /**
4
- * Convert a genome coordinate from session.hovered to a visible MSA column.
5
- *
6
- * @param model - The MSA view model
7
- * @returns The visible column index, or undefined if no mapping exists
8
- */
2
+ import { hasHoverPosition } from './util';
9
3
  export function genomeToMSA({ model }) {
10
4
  const { hovered } = getSession(model);
11
5
  const { querySeqName, transcriptToMsaMap, connectedView, mafRegion } = model;
12
- if (!connectedView?.initialized || !checkHovered(hovered)) {
6
+ if (!connectedView?.initialized || !hasHoverPosition(hovered)) {
13
7
  return undefined;
14
8
  }
15
9
  const { coord: hoverCoord, refName } = hovered.hoverPosition;
16
- // Handle MAF region mapping
17
10
  if (mafRegion) {
18
- // Check if the hover is on the same refName as the MAF region
19
- if (refName !== mafRegion.refName) {
11
+ if (refName !== mafRegion.refName ||
12
+ !connectedView.assemblyNames.includes(mafRegion.assemblyName) ||
13
+ hoverCoord < mafRegion.start ||
14
+ hoverCoord >= mafRegion.end) {
20
15
  return undefined;
21
16
  }
22
- // Check if we're on the same assembly (if assembly info is available)
23
- const viewAssemblies = connectedView.assemblyNames;
24
- if (!viewAssemblies.includes(mafRegion.assemblyName)) {
25
- return undefined;
26
- }
27
- // Check if the hover coordinate is within the MAF region
28
- if (hoverCoord < mafRegion.start || hoverCoord >= mafRegion.end) {
29
- return undefined;
30
- }
31
- // Calculate the ungapped position relative to the region start
32
- const ungappedPos = hoverCoord - mafRegion.start;
33
- // Convert to visible column using the query sequence
34
- return model.seqPosToVisibleCol(querySeqName, ungappedPos);
17
+ return model.seqPosToVisibleCol(querySeqName, hoverCoord - mafRegion.start);
35
18
  }
36
- // Handle transcript mapping (original behavior)
37
19
  if (transcriptToMsaMap) {
38
- const { g2p } = transcriptToMsaMap;
39
- // g2p maps genome coordinate to sequence position (0-based)
40
- const seqPos = g2p[hoverCoord];
20
+ const seqPos = transcriptToMsaMap.g2p[hoverCoord];
41
21
  if (seqPos !== undefined) {
42
- // Convert sequence position to visible column
43
22
  return model.seqPosToVisibleCol(querySeqName, seqPos);
44
23
  }
45
24
  }
46
25
  return undefined;
47
26
  }
48
- //# sourceMappingURL=genomeToMSA.js.map
@@ -241,4 +241,3 @@ describe('genomeToMSA', () => {
241
241
  expect(result).toBeUndefined();
242
242
  });
243
243
  });
244
- //# sourceMappingURL=genomeToMSA.test.js.map
@@ -12,4 +12,3 @@ export default function MsaViewF(pluginManager) {
12
12
  });
13
13
  });
14
14
  }
15
- //# sourceMappingURL=index.js.map
@@ -330,11 +330,6 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
330
330
  } & {
331
331
  connectedViewId: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
332
332
  connectedFeature: import("@jbrowse/mobx-state-tree").IType<any, any, any>;
333
- connectedHighlights: import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IModelType<{
334
- refName: import("@jbrowse/mobx-state-tree").ISimpleType<string>;
335
- start: import("@jbrowse/mobx-state-tree").ISimpleType<number>;
336
- end: import("@jbrowse/mobx-state-tree").ISimpleType<number>;
337
- }, {}, import("@jbrowse/mobx-state-tree")._NotCustomized, import("@jbrowse/mobx-state-tree")._NotCustomized>>;
338
333
  blastParams: import("@jbrowse/mobx-state-tree").IType<BlastParams | undefined, BlastParams | undefined, BlastParams | undefined>;
339
334
  querySeqName: import("@jbrowse/mobx-state-tree").IType<string | undefined, string, string>;
340
335
  uniprotId: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
@@ -655,6 +650,10 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
655
650
  * #getter
656
651
  */
657
652
  readonly mouseCol2: number | undefined;
653
+ /**
654
+ * #getter
655
+ */
656
+ readonly connectedHighlights: IRegion[];
658
657
  } & {
659
658
  /**
660
659
  * #action
@@ -672,18 +671,6 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
672
671
  * #action
673
672
  */
674
673
  setRid(arg: string): void;
675
- /**
676
- * #action
677
- */
678
- setConnectedHighlights(r: IRegion[]): void;
679
- /**
680
- * #action
681
- */
682
- addToConnectedHighlights(r: IRegion): void;
683
- /**
684
- * #action
685
- */
686
- clearConnectedHighlights(): void;
687
674
  /**
688
675
  * #action
689
676
  */
@@ -758,7 +745,7 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
758
745
  id: string;
759
746
  displayName: string | undefined;
760
747
  minimized: boolean;
761
- } & import("@jbrowse/mobx-state-tree/dist/internal").NonEmptyObject & Omit<import("@jbrowse/mobx-state-tree").ModelSnapshotType<{
748
+ } & import("@jbrowse/mobx-state-tree").NonEmptyObject & Omit<import("@jbrowse/mobx-state-tree").ModelSnapshotType<{
762
749
  drawLabels: import("@jbrowse/mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
763
750
  labelsAlignRight: import("@jbrowse/mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
764
751
  treeAreaWidth: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
@@ -1060,3 +1047,6 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
1060
1047
  export type JBrowsePluginMsaViewStateModel = ReturnType<typeof stateModelFactory>;
1061
1048
  export type JBrowsePluginMsaViewModel = Instance<JBrowsePluginMsaViewStateModel>;
1062
1049
  export { type MafRegion, type MsaViewInitState } from './types';
1050
+ export declare function isMsaView(view: {
1051
+ type: string;
1052
+ }): view is JBrowsePluginMsaViewModel;