jbrowse-plugin-msaview 2.4.3 → 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.
- package/dist/AddHighlightModel/GenomeMouseoverHighlight.js +2 -2
- package/dist/AddHighlightModel/HighlightComponents.js +0 -1
- package/dist/AddHighlightModel/MsaToGenomeHighlight.js +5 -3
- package/dist/AddHighlightModel/index.js +2 -2
- package/dist/AddHighlightModel/util.d.ts +1 -6
- package/dist/AddHighlightModel/util.js +1 -7
- package/dist/BgzipFastaMsaAdapter/BgzipFastaMsaAdapter.js +0 -1
- package/dist/BgzipFastaMsaAdapter/configSchema.js +0 -1
- package/dist/BgzipFastaMsaAdapter/index.js +0 -1
- package/dist/LaunchMsaView/components/LaunchMsaViewDialog.js +0 -1
- package/dist/LaunchMsaView/components/LaunchPanelContent.js +0 -1
- package/dist/LaunchMsaView/components/ManualMSALoader/ManualMSALoader.js +0 -1
- package/dist/LaunchMsaView/components/ManualMSALoader/fetchGeneList.js +0 -1
- package/dist/LaunchMsaView/components/ManualMSALoader/launchView.js +0 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/CachedBlastResults.js +0 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/MsaAlgorithmSelect.js +0 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastAutomaticPanel.js +0 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastManualPanel.js +0 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastMethodSelector.js +0 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastPanel.js +0 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastRIDPanel.js +0 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBISettingsDialog.js +0 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/blastLaunchView.js +0 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/consts.js +0 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/useCachedBlastResults.js +0 -1
- package/dist/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.js +0 -1
- package/dist/LaunchMsaView/components/PreLoadedMSA/fetchMSAData.js +0 -1
- package/dist/LaunchMsaView/components/PreLoadedMSA/preCalculatedLaunchView.js +0 -1
- package/dist/LaunchMsaView/components/PreLoadedMSA/types.js +0 -1
- package/dist/LaunchMsaView/components/SubmitCancelActions.js +0 -1
- package/dist/LaunchMsaView/components/TabPanel.js +1 -2
- package/dist/LaunchMsaView/components/TranscriptSelector.js +0 -1
- package/dist/LaunchMsaView/components/calculateProteinSequence.js +0 -1
- package/dist/LaunchMsaView/components/fetchSeq.js +0 -1
- package/dist/LaunchMsaView/components/types.js +0 -1
- package/dist/LaunchMsaView/components/useFeatureSequence.js +0 -1
- package/dist/LaunchMsaView/components/useSWRFeatureSequence.js +0 -1
- package/dist/LaunchMsaView/components/useTranscriptSelection.js +0 -1
- package/dist/LaunchMsaView/components/util.js +0 -1
- package/dist/LaunchMsaView/index.js +0 -1
- package/dist/LaunchMsaView/util.js +0 -1
- package/dist/LaunchMsaViewExtensionPoint/index.js +0 -1
- package/dist/MsaViewPanel/afterCreateAutoruns.d.ts +0 -1
- package/dist/MsaViewPanel/afterCreateAutoruns.js +4 -22
- package/dist/MsaViewPanel/blosum62.js +0 -1
- package/dist/MsaViewPanel/components/ConnectStructureDialog.js +0 -1
- package/dist/MsaViewPanel/components/ErrorBoundary.d.ts +1 -1
- package/dist/MsaViewPanel/components/ErrorBoundary.js +0 -1
- package/dist/MsaViewPanel/components/LoadingBLAST.js +0 -1
- package/dist/MsaViewPanel/components/MsaViewPanel.js +0 -1
- package/dist/MsaViewPanel/components/RIDLink.js +0 -1
- package/dist/MsaViewPanel/doLaunchBlast.js +0 -1
- package/dist/MsaViewPanel/genomeToMSA.d.ts +0 -6
- package/dist/MsaViewPanel/genomeToMSA.js +8 -30
- package/dist/MsaViewPanel/genomeToMSA.test.js +0 -1
- package/dist/MsaViewPanel/index.js +0 -1
- package/dist/MsaViewPanel/model.d.ts +9 -18
- package/dist/MsaViewPanel/model.js +21 -32
- package/dist/MsaViewPanel/msaCoordToGenomeCoord.js +5 -22
- package/dist/MsaViewPanel/msaCoordToGenomeCoord.test.js +0 -1
- package/dist/MsaViewPanel/msaDataStore.js +0 -1
- package/dist/MsaViewPanel/pairwiseAlignment.js +0 -1
- package/dist/MsaViewPanel/pairwiseAlignment.test.js +0 -1
- package/dist/MsaViewPanel/structureConnection.js +0 -1
- package/dist/MsaViewPanel/structureConnection.test.js +0 -1
- package/dist/MsaViewPanel/types.js +0 -1
- package/dist/MsaViewPanel/util.d.ts +1 -3
- package/dist/MsaViewPanel/util.js +1 -3
- package/dist/components/ExternalLink.js +0 -1
- package/dist/components/ReadOnlyTextField2.js +0 -1
- package/dist/components/TextField2.js +0 -1
- package/dist/index.js +0 -1
- package/dist/jbrowse-plugin-msaview.umd.production.min.js +38 -37
- package/dist/jbrowse-plugin-msaview.umd.production.min.js.map +4 -4
- package/dist/utils/blastCache.js +2 -5
- package/dist/utils/fetch.js +0 -1
- package/dist/utils/msa.js +0 -1
- package/dist/utils/ncbiBlast.js +0 -1
- package/dist/utils/swrConfig.js +0 -1
- package/dist/utils/taxonomyNames.js +0 -1
- package/dist/utils/types.js +0 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -2
- package/package.json +13 -13
- package/src/AddHighlightModel/GenomeMouseoverHighlight.tsx +4 -1
- package/src/AddHighlightModel/MsaToGenomeHighlight.tsx +5 -8
- package/src/AddHighlightModel/index.tsx +4 -1
- package/src/AddHighlightModel/util.ts +1 -10
- package/src/LaunchMsaView/components/TabPanel.tsx +1 -1
- package/src/MsaViewPanel/afterCreateAutoruns.ts +4 -23
- package/src/MsaViewPanel/genomeToMSA.ts +10 -29
- package/src/MsaViewPanel/model.ts +26 -33
- package/src/MsaViewPanel/msaCoordToGenomeCoord.ts +5 -21
- package/src/MsaViewPanel/util.ts +3 -7
- package/src/utils/blastCache.ts +2 -4
- package/src/version.ts +1 -1
- package/dist/AddHighlightModel/GenomeMouseoverHighlight.js.map +0 -1
- package/dist/AddHighlightModel/HighlightComponents.js.map +0 -1
- package/dist/AddHighlightModel/MsaToGenomeHighlight.js.map +0 -1
- package/dist/AddHighlightModel/index.js.map +0 -1
- package/dist/AddHighlightModel/util.js.map +0 -1
- package/dist/BgzipFastaMsaAdapter/BgzipFastaMsaAdapter.js.map +0 -1
- package/dist/BgzipFastaMsaAdapter/configSchema.js.map +0 -1
- package/dist/BgzipFastaMsaAdapter/index.js.map +0 -1
- package/dist/LaunchMsaView/components/LaunchMsaViewDialog.js.map +0 -1
- package/dist/LaunchMsaView/components/LaunchPanelContent.js.map +0 -1
- package/dist/LaunchMsaView/components/ManualMSALoader/ManualMSALoader.js.map +0 -1
- package/dist/LaunchMsaView/components/ManualMSALoader/fetchGeneList.js.map +0 -1
- package/dist/LaunchMsaView/components/ManualMSALoader/launchView.js.map +0 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/CachedBlastResults.js.map +0 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/MsaAlgorithmSelect.js.map +0 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastAutomaticPanel.js.map +0 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastManualPanel.js.map +0 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastMethodSelector.js.map +0 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastPanel.js.map +0 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastRIDPanel.js.map +0 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBISettingsDialog.js.map +0 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/blastLaunchView.js.map +0 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/consts.js.map +0 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/useCachedBlastResults.js.map +0 -1
- package/dist/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.js.map +0 -1
- package/dist/LaunchMsaView/components/PreLoadedMSA/fetchMSAData.js.map +0 -1
- package/dist/LaunchMsaView/components/PreLoadedMSA/preCalculatedLaunchView.js.map +0 -1
- package/dist/LaunchMsaView/components/PreLoadedMSA/types.js.map +0 -1
- package/dist/LaunchMsaView/components/SubmitCancelActions.js.map +0 -1
- package/dist/LaunchMsaView/components/TabPanel.js.map +0 -1
- package/dist/LaunchMsaView/components/TranscriptSelector.js.map +0 -1
- package/dist/LaunchMsaView/components/calculateProteinSequence.js.map +0 -1
- package/dist/LaunchMsaView/components/fetchSeq.js.map +0 -1
- package/dist/LaunchMsaView/components/types.js.map +0 -1
- package/dist/LaunchMsaView/components/useFeatureSequence.js.map +0 -1
- package/dist/LaunchMsaView/components/useSWRFeatureSequence.js.map +0 -1
- package/dist/LaunchMsaView/components/useTranscriptSelection.js.map +0 -1
- package/dist/LaunchMsaView/components/util.js.map +0 -1
- package/dist/LaunchMsaView/index.js.map +0 -1
- package/dist/LaunchMsaView/util.js.map +0 -1
- package/dist/LaunchMsaViewExtensionPoint/index.js.map +0 -1
- package/dist/MsaViewPanel/afterCreateAutoruns.js.map +0 -1
- package/dist/MsaViewPanel/blosum62.js.map +0 -1
- package/dist/MsaViewPanel/components/ConnectStructureDialog.js.map +0 -1
- package/dist/MsaViewPanel/components/ErrorBoundary.js.map +0 -1
- package/dist/MsaViewPanel/components/LoadingBLAST.js.map +0 -1
- package/dist/MsaViewPanel/components/MsaViewPanel.js.map +0 -1
- package/dist/MsaViewPanel/components/RIDLink.js.map +0 -1
- package/dist/MsaViewPanel/doLaunchBlast.js.map +0 -1
- package/dist/MsaViewPanel/genomeToMSA.js.map +0 -1
- package/dist/MsaViewPanel/genomeToMSA.test.js.map +0 -1
- package/dist/MsaViewPanel/index.js.map +0 -1
- package/dist/MsaViewPanel/model.js.map +0 -1
- package/dist/MsaViewPanel/msaCoordToGenomeCoord.js.map +0 -1
- package/dist/MsaViewPanel/msaCoordToGenomeCoord.test.js.map +0 -1
- package/dist/MsaViewPanel/msaDataStore.js.map +0 -1
- package/dist/MsaViewPanel/pairwiseAlignment.js.map +0 -1
- package/dist/MsaViewPanel/pairwiseAlignment.test.js.map +0 -1
- package/dist/MsaViewPanel/structureConnection.js.map +0 -1
- package/dist/MsaViewPanel/structureConnection.test.js.map +0 -1
- package/dist/MsaViewPanel/types.js.map +0 -1
- package/dist/MsaViewPanel/util.js.map +0 -1
- package/dist/components/ExternalLink.js.map +0 -1
- package/dist/components/ReadOnlyTextField2.js.map +0 -1
- package/dist/components/TextField2.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/utils/blastCache.js.map +0 -1
- package/dist/utils/fetch.js.map +0 -1
- package/dist/utils/msa.js.map +0 -1
- package/dist/utils/ncbiBlast.js.map +0 -1
- package/dist/utils/swrConfig.js.map +0 -1
- package/dist/utils/taxonomyNames.js.map +0 -1
- package/dist/utils/types.js.map +0 -1
- 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.
|
|
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
|
|
@@ -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
|
|
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:
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
@@ -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
|
|
@@ -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
|
|
@@ -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
|
|
@@ -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
|
|
@@ -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 ?
|
|
4
|
+
return (React.createElement("div", { role: "tabpanel", hidden: value !== index, ...other }, value === index ? children : null));
|
|
5
5
|
}
|
|
6
|
-
//# sourceMappingURL=TabPanel.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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
@@ -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 |
|
|
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 {};
|
|
@@ -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
|
|
@@ -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 {
|
|
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 || !
|
|
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
|
-
|
|
19
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
@@ -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>>;
|
|
@@ -631,6 +626,7 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
631
626
|
readonly transcriptToMsaMap: {
|
|
632
627
|
g2p: Record<number, number>;
|
|
633
628
|
p2g: Record<number, number>;
|
|
629
|
+
p2gCodon: Record<number, number[]>;
|
|
634
630
|
refName: string;
|
|
635
631
|
strand: number;
|
|
636
632
|
} | undefined;
|
|
@@ -654,6 +650,10 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
654
650
|
* #getter
|
|
655
651
|
*/
|
|
656
652
|
readonly mouseCol2: number | undefined;
|
|
653
|
+
/**
|
|
654
|
+
* #getter
|
|
655
|
+
*/
|
|
656
|
+
readonly connectedHighlights: IRegion[];
|
|
657
657
|
} & {
|
|
658
658
|
/**
|
|
659
659
|
* #action
|
|
@@ -671,18 +671,6 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
671
671
|
* #action
|
|
672
672
|
*/
|
|
673
673
|
setRid(arg: string): void;
|
|
674
|
-
/**
|
|
675
|
-
* #action
|
|
676
|
-
*/
|
|
677
|
-
setConnectedHighlights(r: IRegion[]): void;
|
|
678
|
-
/**
|
|
679
|
-
* #action
|
|
680
|
-
*/
|
|
681
|
-
addToConnectedHighlights(r: IRegion): void;
|
|
682
|
-
/**
|
|
683
|
-
* #action
|
|
684
|
-
*/
|
|
685
|
-
clearConnectedHighlights(): void;
|
|
686
674
|
/**
|
|
687
675
|
* #action
|
|
688
676
|
*/
|
|
@@ -757,7 +745,7 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
757
745
|
id: string;
|
|
758
746
|
displayName: string | undefined;
|
|
759
747
|
minimized: boolean;
|
|
760
|
-
} & import("@jbrowse/mobx-state-tree
|
|
748
|
+
} & import("@jbrowse/mobx-state-tree").NonEmptyObject & Omit<import("@jbrowse/mobx-state-tree").ModelSnapshotType<{
|
|
761
749
|
drawLabels: import("@jbrowse/mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
762
750
|
labelsAlignRight: import("@jbrowse/mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
763
751
|
treeAreaWidth: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
@@ -1059,3 +1047,6 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
1059
1047
|
export type JBrowsePluginMsaViewStateModel = ReturnType<typeof stateModelFactory>;
|
|
1060
1048
|
export type JBrowsePluginMsaViewModel = Instance<JBrowsePluginMsaViewStateModel>;
|
|
1061
1049
|
export { type MafRegion, type MsaViewInitState } from './types';
|
|
1050
|
+
export declare function isMsaView(view: {
|
|
1051
|
+
type: string;
|
|
1052
|
+
}): view is JBrowsePluginMsaViewModel;
|