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.
- 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 +8 -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 +37 -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 +4 -4
- 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
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { lazy } from 'react';
|
|
2
2
|
import { BaseViewModel } from '@jbrowse/core/pluggableElementTypes';
|
|
3
3
|
import { getSession } from '@jbrowse/core/util';
|
|
4
|
-
import { addDisposer,
|
|
4
|
+
import { addDisposer, types } from '@jbrowse/mobx-state-tree';
|
|
5
5
|
import { genomeToTranscriptSeqMapping } from 'g2p_mapper';
|
|
6
6
|
import { autorun } from 'mobx';
|
|
7
7
|
import { MSAModelF } from 'react-msaview';
|
|
8
|
-
import { autoConnectStructures, highlightConnectedStructures, launchBlastIfNeeded, loadStoredData, observeProteinHighlights, processInit, runCleanup, storeDataToIndexedDB,
|
|
8
|
+
import { autoConnectStructures, highlightConnectedStructures, launchBlastIfNeeded, loadStoredData, observeProteinHighlights, processInit, runCleanup, storeDataToIndexedDB, } from './afterCreateAutoruns';
|
|
9
9
|
import { genomeToMSA } from './genomeToMSA';
|
|
10
10
|
import { msaCoordToGenomeCoord } from './msaCoordToGenomeCoord';
|
|
11
11
|
import { buildAlignmentMaps, runPairwiseAlignment } from './pairwiseAlignment';
|
|
@@ -31,11 +31,6 @@ export default function stateModelFactory() {
|
|
|
31
31
|
/**
|
|
32
32
|
* #property
|
|
33
33
|
*/
|
|
34
|
-
connectedHighlights: types.array(types.model({
|
|
35
|
-
refName: types.string,
|
|
36
|
-
start: types.number,
|
|
37
|
-
end: types.number,
|
|
38
|
-
})),
|
|
39
34
|
/**
|
|
40
35
|
* #property
|
|
41
36
|
*/
|
|
@@ -165,11 +160,22 @@ export default function stateModelFactory() {
|
|
|
165
160
|
* #getter
|
|
166
161
|
*/
|
|
167
162
|
get mouseCol2() {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
163
|
+
return (self.structureHoverCol ??
|
|
164
|
+
genomeToMSA({ model: self }));
|
|
165
|
+
},
|
|
166
|
+
/**
|
|
167
|
+
* #getter
|
|
168
|
+
*/
|
|
169
|
+
get connectedHighlights() {
|
|
170
|
+
const { mouseCol, mouseClickCol } = self;
|
|
171
|
+
return [
|
|
172
|
+
mouseCol === undefined
|
|
173
|
+
? undefined
|
|
174
|
+
: msaCoordToGenomeCoord({ model: self, coord: mouseCol }),
|
|
175
|
+
mouseClickCol === undefined
|
|
176
|
+
? undefined
|
|
177
|
+
: msaCoordToGenomeCoord({ model: self, coord: mouseClickCol }),
|
|
178
|
+
].filter((r) => r !== undefined);
|
|
173
179
|
},
|
|
174
180
|
}))
|
|
175
181
|
.actions(self => ({
|
|
@@ -197,24 +203,6 @@ export default function stateModelFactory() {
|
|
|
197
203
|
setRid(arg) {
|
|
198
204
|
self.rid = arg;
|
|
199
205
|
},
|
|
200
|
-
/**
|
|
201
|
-
* #action
|
|
202
|
-
*/
|
|
203
|
-
setConnectedHighlights(r) {
|
|
204
|
-
self.connectedHighlights = cast(r);
|
|
205
|
-
},
|
|
206
|
-
/**
|
|
207
|
-
* #action
|
|
208
|
-
*/
|
|
209
|
-
addToConnectedHighlights(r) {
|
|
210
|
-
self.connectedHighlights.push(r);
|
|
211
|
-
},
|
|
212
|
-
/**
|
|
213
|
-
* #action
|
|
214
|
-
*/
|
|
215
|
-
clearConnectedHighlights() {
|
|
216
|
-
self.connectedHighlights = cast([]);
|
|
217
|
-
},
|
|
218
206
|
/**
|
|
219
207
|
* #action
|
|
220
208
|
*/
|
|
@@ -396,7 +384,6 @@ export default function stateModelFactory() {
|
|
|
396
384
|
storeDataToIndexedDB,
|
|
397
385
|
launchBlastIfNeeded,
|
|
398
386
|
processInit,
|
|
399
|
-
updateGenomeHighlights,
|
|
400
387
|
highlightConnectedStructures,
|
|
401
388
|
autoConnectStructures,
|
|
402
389
|
observeProteinHighlights,
|
|
@@ -408,4 +395,6 @@ export default function stateModelFactory() {
|
|
|
408
395
|
},
|
|
409
396
|
}));
|
|
410
397
|
}
|
|
411
|
-
|
|
398
|
+
export function isMsaView(view) {
|
|
399
|
+
return view.type === 'MsaView';
|
|
400
|
+
}
|
|
@@ -1,44 +1,27 @@
|
|
|
1
1
|
import { gappedToUngappedPosition } from './structureConnection';
|
|
2
2
|
export function msaCoordToGenomeCoord({ model, coord: mouseCol, }) {
|
|
3
3
|
const { querySeqName, transcriptToMsaMap, mafRegion } = model;
|
|
4
|
-
|
|
5
|
-
const queryRow = model.rows.find(f => f[0] === querySeqName);
|
|
6
|
-
const querySeq = queryRow?.[1];
|
|
4
|
+
const querySeq = model.rows.find(f => f[0] === querySeqName)?.[1];
|
|
7
5
|
if (!querySeq) {
|
|
8
6
|
return undefined;
|
|
9
7
|
}
|
|
10
|
-
// Convert gapped MSA column to ungapped sequence coordinate
|
|
11
|
-
// Returns undefined if the position is a gap
|
|
12
8
|
const ungappedPos = gappedToUngappedPosition(querySeq, mouseCol);
|
|
13
9
|
if (ungappedPos === undefined) {
|
|
14
10
|
return undefined;
|
|
15
11
|
}
|
|
16
|
-
// Handle MAF region mapping
|
|
17
12
|
if (mafRegion) {
|
|
18
13
|
const genomePos = mafRegion.start + ungappedPos;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
return {
|
|
24
|
-
refName: mafRegion.refName,
|
|
25
|
-
start: genomePos,
|
|
26
|
-
end: genomePos + 1,
|
|
27
|
-
};
|
|
14
|
+
return genomePos < mafRegion.end
|
|
15
|
+
? { refName: mafRegion.refName, start: genomePos, end: genomePos + 1 }
|
|
16
|
+
: undefined;
|
|
28
17
|
}
|
|
29
|
-
// Handle transcript mapping (original behavior)
|
|
30
18
|
if (transcriptToMsaMap) {
|
|
31
19
|
const { refName, p2g } = transcriptToMsaMap;
|
|
32
20
|
const s = p2g[ungappedPos];
|
|
33
21
|
const e = p2g[ungappedPos + 1];
|
|
34
22
|
return s !== undefined && e !== undefined
|
|
35
|
-
? {
|
|
36
|
-
refName,
|
|
37
|
-
start: Math.min(s, e),
|
|
38
|
-
end: Math.max(s, e),
|
|
39
|
-
}
|
|
23
|
+
? { refName, start: Math.min(s, e), end: Math.max(s, e) }
|
|
40
24
|
: undefined;
|
|
41
25
|
}
|
|
42
26
|
return undefined;
|
|
43
27
|
}
|
|
44
|
-
//# sourceMappingURL=msaCoordToGenomeCoord.js.map
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function checkHovered(hovered: unknown): hovered is {
|
|
3
|
-
hoverFeature: Feature;
|
|
1
|
+
export declare function hasHoverPosition(hovered: unknown): hovered is {
|
|
4
2
|
hoverPosition: {
|
|
5
3
|
coord: number;
|
|
6
4
|
refName: string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
export function
|
|
1
|
+
export function hasHoverPosition(hovered) {
|
|
2
2
|
return (!!hovered &&
|
|
3
3
|
typeof hovered === 'object' &&
|
|
4
|
-
'hoverFeature' in hovered &&
|
|
5
4
|
'hoverPosition' in hovered &&
|
|
6
5
|
!!hovered.hoverPosition);
|
|
7
6
|
}
|
|
@@ -22,4 +21,3 @@ export function getUniprotIdFromAlphaFoldUrl(url) {
|
|
|
22
21
|
const match = /AF-([A-Z0-9]+)-F\d+/.exec(url);
|
|
23
22
|
return match?.[1];
|
|
24
23
|
}
|
|
25
|
-
//# sourceMappingURL=util.js.map
|
package/dist/index.js
CHANGED