jbrowse-plugin-msaview 2.3.5 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -216
- package/dist/AddHighlightModel/GenomeMouseoverHighlight.js +4 -15
- package/dist/AddHighlightModel/GenomeMouseoverHighlight.js.map +1 -1
- package/dist/AddHighlightModel/MsaToGenomeHighlight.js +5 -8
- package/dist/AddHighlightModel/MsaToGenomeHighlight.js.map +1 -1
- package/dist/AddHighlightModel/util.d.ts +3 -0
- package/dist/AddHighlightModel/util.js +3 -0
- package/dist/AddHighlightModel/util.js.map +1 -1
- package/dist/LaunchMsaView/components/LaunchMsaViewDialog.js +3 -8
- package/dist/LaunchMsaView/components/LaunchMsaViewDialog.js.map +1 -1
- package/dist/LaunchMsaView/components/ManualMSALoader/ManualMSALoader.js +26 -14
- package/dist/LaunchMsaView/components/ManualMSALoader/ManualMSALoader.js.map +1 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/CachedBlastResults.js +16 -7
- package/dist/LaunchMsaView/components/NCBIBlastQuery/CachedBlastResults.js.map +1 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastAutomaticPanel.js +6 -7
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastAutomaticPanel.js.map +1 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastManualPanel.js +4 -4
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastManualPanel.js.map +1 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastPanel.js +8 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastPanel.js.map +1 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastRIDPanel.js +15 -7
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastRIDPanel.js.map +1 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBISettingsDialog.js +8 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBISettingsDialog.js.map +1 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/blastLaunchView.d.ts +4 -4
- package/dist/LaunchMsaView/components/NCBIBlastQuery/blastLaunchView.js +2 -2
- package/dist/LaunchMsaView/components/NCBIBlastQuery/blastLaunchView.js.map +1 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/consts.d.ts +4 -0
- package/dist/LaunchMsaView/components/NCBIBlastQuery/consts.js +2 -0
- package/dist/LaunchMsaView/components/NCBIBlastQuery/consts.js.map +1 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/useCachedBlastResults.js +3 -0
- package/dist/LaunchMsaView/components/NCBIBlastQuery/useCachedBlastResults.js.map +1 -1
- package/dist/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.js +17 -23
- package/dist/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.js.map +1 -1
- package/dist/LaunchMsaView/components/PreLoadedMSA/types.d.ts +1 -0
- package/dist/LaunchMsaView/components/PreLoadedMSA/types.js +4 -1
- package/dist/LaunchMsaView/components/PreLoadedMSA/types.js.map +1 -1
- package/dist/LaunchMsaView/components/TabPanel.js +1 -1
- package/dist/LaunchMsaView/components/TabPanel.js.map +1 -1
- package/dist/LaunchMsaView/components/TranscriptSelector.js +7 -3
- package/dist/LaunchMsaView/components/TranscriptSelector.js.map +1 -1
- package/dist/LaunchMsaView/components/types.d.ts +0 -3
- package/dist/LaunchMsaView/components/useFeatureSequence.d.ts +4 -4
- package/dist/LaunchMsaView/components/useFeatureSequence.js +2 -4
- package/dist/LaunchMsaView/components/useFeatureSequence.js.map +1 -1
- package/dist/LaunchMsaView/components/useSWRFeatureSequence.d.ts +4 -5
- package/dist/LaunchMsaView/components/useSWRFeatureSequence.js +11 -30
- package/dist/LaunchMsaView/components/useSWRFeatureSequence.js.map +1 -1
- package/dist/MsaViewPanel/afterCreateAutoruns.js +10 -25
- package/dist/MsaViewPanel/afterCreateAutoruns.js.map +1 -1
- package/dist/MsaViewPanel/components/ConnectStructureDialog.js +15 -10
- package/dist/MsaViewPanel/components/ConnectStructureDialog.js.map +1 -1
- package/dist/MsaViewPanel/components/LoadingBLAST.js +2 -3
- package/dist/MsaViewPanel/components/LoadingBLAST.js.map +1 -1
- package/dist/MsaViewPanel/components/MsaViewPanel.js +8 -1
- package/dist/MsaViewPanel/components/MsaViewPanel.js.map +1 -1
- package/dist/MsaViewPanel/model.d.ts +6 -13
- package/dist/MsaViewPanel/model.js +15 -26
- package/dist/MsaViewPanel/model.js.map +1 -1
- package/dist/MsaViewPanel/msaDataStore.d.ts +0 -1
- package/dist/MsaViewPanel/msaDataStore.js +0 -9
- package/dist/MsaViewPanel/msaDataStore.js.map +1 -1
- package/dist/MsaViewPanel/pairwiseAlignment.js +6 -6
- package/dist/MsaViewPanel/pairwiseAlignment.js.map +1 -1
- package/dist/MsaViewPanel/structureConnection.d.ts +28 -4
- package/dist/MsaViewPanel/structureConnection.js +10 -6
- package/dist/MsaViewPanel/structureConnection.js.map +1 -1
- package/dist/MsaViewPanel/structureConnection.test.js +1 -19
- package/dist/MsaViewPanel/structureConnection.test.js.map +1 -1
- package/dist/jbrowse-plugin-msaview.umd.production.min.js +25 -27
- package/dist/jbrowse-plugin-msaview.umd.production.min.js.map +4 -4
- package/dist/utils/blastCache.d.ts +7 -13
- package/dist/utils/blastCache.js +0 -12
- package/dist/utils/blastCache.js.map +1 -1
- package/dist/utils/msa.d.ts +2 -1
- package/dist/utils/msa.js +0 -3
- package/dist/utils/msa.js.map +1 -1
- package/dist/utils/ncbiBlast.d.ts +3 -2
- package/dist/utils/ncbiBlast.js +1 -1
- package/dist/utils/ncbiBlast.js.map +1 -1
- package/dist/utils/taxonomyNames.js +9 -4
- package/dist/utils/taxonomyNames.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +19 -19
- package/src/AddHighlightModel/GenomeMouseoverHighlight.tsx +7 -22
- package/src/AddHighlightModel/MsaToGenomeHighlight.tsx +10 -10
- package/src/AddHighlightModel/util.ts +6 -0
- package/src/LaunchMsaView/components/LaunchMsaViewDialog.tsx +3 -16
- package/src/LaunchMsaView/components/ManualMSALoader/ManualMSALoader.tsx +30 -19
- package/src/LaunchMsaView/components/NCBIBlastQuery/CachedBlastResults.tsx +17 -9
- package/src/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastAutomaticPanel.tsx +14 -18
- package/src/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastManualPanel.tsx +4 -10
- package/src/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastPanel.tsx +9 -1
- package/src/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastRIDPanel.tsx +15 -8
- package/src/LaunchMsaView/components/NCBIBlastQuery/NCBISettingsDialog.tsx +9 -1
- package/src/LaunchMsaView/components/NCBIBlastQuery/blastLaunchView.ts +6 -6
- package/src/LaunchMsaView/components/NCBIBlastQuery/consts.ts +7 -0
- package/src/LaunchMsaView/components/NCBIBlastQuery/useCachedBlastResults.ts +3 -0
- package/src/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.tsx +23 -29
- package/src/LaunchMsaView/components/PreLoadedMSA/types.ts +6 -0
- package/src/LaunchMsaView/components/TabPanel.tsx +1 -1
- package/src/LaunchMsaView/components/TranscriptSelector.tsx +7 -3
- package/src/LaunchMsaView/components/types.ts +0 -3
- package/src/LaunchMsaView/components/useFeatureSequence.ts +1 -7
- package/src/LaunchMsaView/components/useSWRFeatureSequence.ts +10 -37
- package/src/MsaViewPanel/afterCreateAutoruns.ts +13 -39
- package/src/MsaViewPanel/components/ConnectStructureDialog.tsx +23 -25
- package/src/MsaViewPanel/components/LoadingBLAST.tsx +4 -3
- package/src/MsaViewPanel/components/MsaViewPanel.tsx +9 -1
- package/src/MsaViewPanel/model.ts +31 -39
- package/src/MsaViewPanel/msaDataStore.ts +0 -9
- package/src/MsaViewPanel/pairwiseAlignment.ts +6 -6
- package/src/MsaViewPanel/structureConnection.test.ts +0 -21
- package/src/MsaViewPanel/structureConnection.ts +30 -7
- package/src/utils/blastCache.ts +14 -37
- package/src/utils/msa.ts +5 -6
- package/src/utils/ncbiBlast.ts +9 -5
- package/src/utils/taxonomyNames.ts +13 -4
- package/src/version.ts +1 -1
- package/dist/LaunchMsaView/components/EnsemblGeneTree/EnsemblGeneTree.d.ts +0 -8
- package/dist/LaunchMsaView/components/EnsemblGeneTree/EnsemblGeneTree.js +0 -70
- package/dist/LaunchMsaView/components/EnsemblGeneTree/EnsemblGeneTree.js.map +0 -1
- package/dist/LaunchMsaView/components/EnsemblGeneTree/ensemblGeneTreeLaunchView.d.ts +0 -13
- package/dist/LaunchMsaView/components/EnsemblGeneTree/ensemblGeneTreeLaunchView.js +0 -12
- package/dist/LaunchMsaView/components/EnsemblGeneTree/ensemblGeneTreeLaunchView.js.map +0 -1
- package/dist/LaunchMsaView/components/EnsemblGeneTree/ensemblGeneTreeUtils.d.ts +0 -6
- package/dist/LaunchMsaView/components/EnsemblGeneTree/ensemblGeneTreeUtils.js +0 -25
- package/dist/LaunchMsaView/components/EnsemblGeneTree/ensemblGeneTreeUtils.js.map +0 -1
- package/dist/LaunchMsaView/components/EnsemblGeneTree/gatherSequencesFromTree.d.ts +0 -2
- package/dist/LaunchMsaView/components/EnsemblGeneTree/gatherSequencesFromTree.js +0 -20
- package/dist/LaunchMsaView/components/EnsemblGeneTree/gatherSequencesFromTree.js.map +0 -1
- package/dist/LaunchMsaView/components/EnsemblGeneTree/types.d.ts +0 -24
- package/dist/LaunchMsaView/components/EnsemblGeneTree/types.js +0 -2
- package/dist/LaunchMsaView/components/EnsemblGeneTree/types.js.map +0 -1
- package/dist/LaunchMsaView/components/EnsemblGeneTree/useGeneTree.d.ts +0 -10
- package/dist/LaunchMsaView/components/EnsemblGeneTree/useGeneTree.js +0 -11
- package/dist/LaunchMsaView/components/EnsemblGeneTree/useGeneTree.js.map +0 -1
- package/dist/LaunchMsaView/components/EnsemblGeneTree/util.d.ts +0 -1
- package/dist/LaunchMsaView/components/EnsemblGeneTree/util.js +0 -2
- package/dist/LaunchMsaView/components/EnsemblGeneTree/util.js.map +0 -1
- package/src/LaunchMsaView/components/EnsemblGeneTree/EnsemblGeneTree.tsx +0 -123
- package/src/LaunchMsaView/components/EnsemblGeneTree/ensemblGeneTreeLaunchView.ts +0 -30
- package/src/LaunchMsaView/components/EnsemblGeneTree/ensemblGeneTreeUtils.ts +0 -47
- package/src/LaunchMsaView/components/EnsemblGeneTree/gatherSequencesFromTree.ts +0 -22
- package/src/LaunchMsaView/components/EnsemblGeneTree/types.ts +0 -28
- package/src/LaunchMsaView/components/EnsemblGeneTree/useGeneTree.ts +0 -17
- package/src/LaunchMsaView/components/EnsemblGeneTree/util.ts +0 -6
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import type { BlastDatabase, BlastProgram, MsaAlgorithm } from '../LaunchMsaView/components/NCBIBlastQuery/consts';
|
|
1
2
|
export interface CachedBlastResult {
|
|
2
3
|
id: string;
|
|
3
4
|
proteinSequence: string;
|
|
4
|
-
blastDatabase:
|
|
5
|
-
blastProgram:
|
|
6
|
-
msaAlgorithm:
|
|
5
|
+
blastDatabase: BlastDatabase;
|
|
6
|
+
blastProgram: BlastProgram;
|
|
7
|
+
msaAlgorithm: MsaAlgorithm;
|
|
7
8
|
msa: string;
|
|
8
9
|
tree: string;
|
|
9
10
|
treeMetadata: string;
|
|
@@ -14,17 +15,11 @@ export interface CachedBlastResult {
|
|
|
14
15
|
transcriptName?: string;
|
|
15
16
|
geneName?: string;
|
|
16
17
|
}
|
|
17
|
-
export declare function getCachedBlastResult({ proteinSequence, blastDatabase, blastProgram, transcriptId, }: {
|
|
18
|
-
proteinSequence: string;
|
|
19
|
-
blastDatabase: string;
|
|
20
|
-
blastProgram: string;
|
|
21
|
-
transcriptId?: string;
|
|
22
|
-
}): Promise<any>;
|
|
23
18
|
export declare function saveBlastResult({ proteinSequence, blastDatabase, blastProgram, msaAlgorithm, msa, tree, treeMetadata, rid, geneId, transcriptId, transcriptName, geneName, }: {
|
|
24
19
|
proteinSequence: string;
|
|
25
|
-
blastDatabase:
|
|
26
|
-
blastProgram:
|
|
27
|
-
msaAlgorithm:
|
|
20
|
+
blastDatabase: BlastDatabase;
|
|
21
|
+
blastProgram: BlastProgram;
|
|
22
|
+
msaAlgorithm: MsaAlgorithm;
|
|
28
23
|
msa: string;
|
|
29
24
|
tree: string;
|
|
30
25
|
treeMetadata: string;
|
|
@@ -35,6 +30,5 @@ export declare function saveBlastResult({ proteinSequence, blastDatabase, blastP
|
|
|
35
30
|
geneName?: string;
|
|
36
31
|
}): Promise<CachedBlastResult>;
|
|
37
32
|
export declare function getAllCachedResults(): Promise<any[]>;
|
|
38
|
-
export declare function getCachedResultsByGeneId(geneId: string): Promise<any[]>;
|
|
39
33
|
export declare function deleteCachedResult(id: string): Promise<void>;
|
|
40
34
|
export declare function clearAllCachedResults(): Promise<void>;
|
package/dist/utils/blastCache.js
CHANGED
|
@@ -20,11 +20,6 @@ function createCacheKey(proteinSequence, blastDatabase, blastProgram, transcript
|
|
|
20
20
|
}
|
|
21
21
|
return `${blastDatabase}:${blastProgram}:${proteinSequence}`;
|
|
22
22
|
}
|
|
23
|
-
export async function getCachedBlastResult({ proteinSequence, blastDatabase, blastProgram, transcriptId, }) {
|
|
24
|
-
const db = await getDB();
|
|
25
|
-
const id = createCacheKey(proteinSequence, blastDatabase, blastProgram, transcriptId);
|
|
26
|
-
return db.get(STORE_NAME, id);
|
|
27
|
-
}
|
|
28
23
|
export async function saveBlastResult({ proteinSequence, blastDatabase, blastProgram, msaAlgorithm, msa, tree, treeMetadata, rid, geneId, transcriptId, transcriptName, geneName, }) {
|
|
29
24
|
const db = await getDB();
|
|
30
25
|
const id = createCacheKey(proteinSequence, blastDatabase, blastProgram, transcriptId);
|
|
@@ -52,13 +47,6 @@ export async function getAllCachedResults() {
|
|
|
52
47
|
const results = await db.getAll(STORE_NAME);
|
|
53
48
|
return results.toSorted((a, b) => b.timestamp - a.timestamp);
|
|
54
49
|
}
|
|
55
|
-
export async function getCachedResultsByGeneId(geneId) {
|
|
56
|
-
const db = await getDB();
|
|
57
|
-
const results = await db.getAll(STORE_NAME);
|
|
58
|
-
return results
|
|
59
|
-
.filter(r => r.geneId === geneId)
|
|
60
|
-
.toSorted((a, b) => b.timestamp - a.timestamp);
|
|
61
|
-
}
|
|
62
50
|
export async function deleteCachedResult(id) {
|
|
63
51
|
const db = await getDB();
|
|
64
52
|
await db.delete(STORE_NAME, id);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blastCache.js","sourceRoot":"","sources":["../../src/utils/blastCache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"blastCache.js","sourceRoot":"","sources":["../../src/utils/blastCache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAA;AAQ5B,MAAM,OAAO,GAAG,6BAA6B,CAAA;AAC7C,MAAM,UAAU,GAAG,eAAe,CAAA;AAClC,MAAM,UAAU,GAAG,CAAC,CAAA;AAmBpB,KAAK,UAAU,KAAK;IAClB,OAAO,MAAM,CAAC,OAAO,EAAE,UAAU,EAAE;QACjC,OAAO,CAAC,EAAE,EAAE,UAAU;YACpB,IAAI,UAAU,GAAG,CAAC,IAAI,EAAE,CAAC,gBAAgB,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;gBAC/D,EAAE,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAA;YAClC,CAAC;YACD,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;gBAC9C,EAAE,CAAC,iBAAiB,CAAC,UAAU,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAA;YACrD,CAAC;QACH,CAAC;KACF,CAAC,CAAA;AACJ,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AC,KAAK,UAAU,kBAAkB,CAAC,EAAU;IACjD,MAAM,EAAE,GAAG,MAAM,KAAK,EAAE,CAAA;IACxB,MAAM,EAAE,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC,CAAA;AACjC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,qBAAqB;IACzC,MAAM,EAAE,GAAG,MAAM,KAAK,EAAE,CAAA;IACxB,MAAM,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;AAC5B,CAAC"}
|
package/dist/utils/msa.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { MsaAlgorithm } from '../LaunchMsaView/components/NCBIBlastQuery/consts';
|
|
1
2
|
export declare function launchMSA({ algorithm, sequence, onProgress, }: {
|
|
2
|
-
algorithm:
|
|
3
|
+
algorithm: MsaAlgorithm;
|
|
3
4
|
sequence: string;
|
|
4
5
|
onProgress: (arg: string) => void;
|
|
5
6
|
}): Promise<{
|
package/dist/utils/msa.js
CHANGED
|
@@ -40,9 +40,6 @@ async function wait({ onProgress, jobId, algorithm, }) {
|
|
|
40
40
|
}
|
|
41
41
|
export async function launchMSA({ algorithm, sequence, onProgress, }) {
|
|
42
42
|
const config = algorithms[algorithm];
|
|
43
|
-
if (!config) {
|
|
44
|
-
throw new Error(`unknown algorithm: ${algorithm}`);
|
|
45
|
-
}
|
|
46
43
|
onProgress(`Launching ${algorithm} MSA...`);
|
|
47
44
|
const jobId = await textfetch(`${base}/${algorithm}/run`, {
|
|
48
45
|
method: 'POST',
|
package/dist/utils/msa.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"msa.js","sourceRoot":"","sources":["../../src/utils/msa.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"msa.js","sourceRoot":"","sources":["../../src/utils/msa.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,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EAAE,CAAC;YACtC,MAAM,IAAI,KAAK,CAAC,wBAAwB,KAAK,EAAE,CAAC,CAAA;QAClD,CAAC;IACH,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,EAC9B,SAAS,EACT,QAAQ,EACR,UAAU,GAKX;IACC,MAAM,MAAM,GAAG,UAAU,CAAC,SAAS,CAAC,CAAA;IAEpC,UAAU,CAAC,aAAa,SAAS,SAAS,CAAC,CAAA;IAE3C,MAAM,KAAK,GAAG,MAAM,SAAS,CAAC,GAAG,IAAI,IAAI,SAAS,MAAM,EAAE;QACxD,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,IAAI,eAAe,CAAC,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC;KAC1D,CAAC,CAAA;IACF,MAAM,IAAI,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC,CAAA;IAC5C,OAAO;QACL,GAAG,EAAE,MAAM,SAAS,CAClB,GAAG,IAAI,IAAI,SAAS,WAAW,KAAK,IAAI,MAAM,CAAC,SAAS,EAAE,CAC3D;QACD,IAAI,EAAE,MAAM,SAAS,CACnB,GAAG,IAAI,IAAI,SAAS,WAAW,KAAK,IAAI,MAAM,CAAC,UAAU,EAAE,CAC5D;KACF,CAAA;AACH,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { BlastDatabase, BlastProgram } from '../LaunchMsaView/components/NCBIBlastQuery/consts';
|
|
1
2
|
export declare function queryBlastFromRid({ rid, baseUrl, onProgress, }: {
|
|
2
3
|
rid: string;
|
|
3
4
|
baseUrl: string;
|
|
@@ -13,8 +14,8 @@ export declare function queryBlastFromRid({ rid, baseUrl, onProgress, }: {
|
|
|
13
14
|
}>;
|
|
14
15
|
export declare function queryBlast({ query, blastDatabase, blastProgram, baseUrl, onProgress, onRid, }: {
|
|
15
16
|
query: string;
|
|
16
|
-
blastDatabase:
|
|
17
|
-
blastProgram:
|
|
17
|
+
blastDatabase: BlastDatabase;
|
|
18
|
+
blastProgram: BlastProgram;
|
|
18
19
|
baseUrl: string;
|
|
19
20
|
onProgress: (arg: string) => void;
|
|
20
21
|
onRid: (arg: string) => void;
|
package/dist/utils/ncbiBlast.js
CHANGED
|
@@ -31,7 +31,7 @@ async function initialQuery({ query, blastProgram, blastDatabase, baseUrl, }) {
|
|
|
31
31
|
PROGRAM: blastProgram === 'quick-blastp' ? 'blastp' : blastProgram,
|
|
32
32
|
DATABASE: blastDatabase,
|
|
33
33
|
QUERY: query,
|
|
34
|
-
...(blastDatabase === '
|
|
34
|
+
...(blastDatabase === 'nr_cluster_seq'
|
|
35
35
|
? {
|
|
36
36
|
CLUSTERED_DB: 'on',
|
|
37
37
|
DB_TYPE: 'Experimental Databases',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ncbiBlast.js","sourceRoot":"","sources":["../../src/utils/ncbiBlast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"ncbiBlast.js","sourceRoot":"","sources":["../../src/utils/ncbiBlast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAQvD,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,EACtC,GAAG,EACH,OAAO,EACP,UAAU,GAKX;IACC,UAAU,CAAC,kCAAkC,GAAG,KAAK,CAAC,CAAA;IACtD,MAAM,UAAU,CAAC;QACf,GAAG;QACH,UAAU;QACV,OAAO;KACR,CAAC,CAAA;IACF,MAAM,GAAG,GAAG,MAAM,SAAS,CACzB,GAAG,OAAO,gBAAgB,GAAG,8CAA8C,CAC5E,CAAA;IACD,OAAO;QACL,GAAG;QACH,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,OAA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C;gBACN,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAA;YAClC,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -12,9 +12,12 @@ async function getDB() {
|
|
|
12
12
|
},
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
|
-
async function
|
|
15
|
+
async function getCachedTaxonomies(taxids) {
|
|
16
16
|
const db = await getDB();
|
|
17
|
-
|
|
17
|
+
const tx = db.transaction(STORE_NAME, 'readonly');
|
|
18
|
+
const results = await Promise.all(taxids.map(taxid => tx.store.get(taxid)));
|
|
19
|
+
await tx.done;
|
|
20
|
+
return results;
|
|
18
21
|
}
|
|
19
22
|
async function saveTaxonomyCache(entries) {
|
|
20
23
|
const db = await getDB();
|
|
@@ -27,8 +30,10 @@ async function saveTaxonomyCache(entries) {
|
|
|
27
30
|
export async function fetchTaxonomyInfo(taxids) {
|
|
28
31
|
const result = new Map();
|
|
29
32
|
const uncachedTaxids = [];
|
|
30
|
-
|
|
31
|
-
|
|
33
|
+
const cachedResults = await getCachedTaxonomies(taxids);
|
|
34
|
+
for (let i = 0; i < taxids.length; i++) {
|
|
35
|
+
const taxid = taxids[i];
|
|
36
|
+
const cached = cachedResults[i];
|
|
32
37
|
if (cached) {
|
|
33
38
|
result.set(taxid, {
|
|
34
39
|
sciname: cached.sciname,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taxonomyNames.js","sourceRoot":"","sources":["../../src/utils/taxonomyNames.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAA;AAE5B,MAAM,OAAO,GAAG,gCAAgC,CAAA;AAChD,MAAM,UAAU,GAAG,cAAc,CAAA;AACjC,MAAM,UAAU,GAAG,CAAC,CAAA;AAQpB,KAAK,UAAU,KAAK;IAClB,OAAO,MAAM,CAAC,OAAO,EAAE,UAAU,EAAE;QACjC,OAAO,CAAC,EAAE;YACR,IAAI,EAAE,CAAC,gBAAgB,CAAC,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AAC,CAAC,IAAI,EAAE,CAAA;oBAC9B,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAA;oBACrD,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAA;gBACzD,CAAC;qBAAM,CAAC;oBACN,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,CAAA;gBAC7D,CAAC;YACH,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,gCAAgC,EAAE,KAAK,CAAC,CAAA;QACxD,CAAC;IACH,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,MAAM,iBAAiB,CAAC,OAAO,CAAC,CAAA;IAClC,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "2.
|
|
1
|
+
export declare const version = "2.4.0";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const version = '2.
|
|
1
|
+
export const version = '2.4.0';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.
|
|
2
|
+
"version": "2.4.0",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"name": "jbrowse-plugin-msaview",
|
|
5
5
|
"repository": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@emotion/styled": "^11.14.1",
|
|
20
|
-
"g2p_mapper": "^2.0.
|
|
20
|
+
"g2p_mapper": "^2.0.2",
|
|
21
21
|
"idb": "^8.0.3",
|
|
22
22
|
"pako-esm2": "^2.0.2",
|
|
23
23
|
"react-msaview": "^5.0.16",
|
|
@@ -27,37 +27,37 @@
|
|
|
27
27
|
"@emotion/react": "^11.14.0",
|
|
28
28
|
"@eslint/js": "^10.0.1",
|
|
29
29
|
"@fal-works/esbuild-plugin-global-externals": "^2.1.2",
|
|
30
|
-
"@jbrowse/core": "^4.2.
|
|
30
|
+
"@jbrowse/core": "^4.2.1",
|
|
31
31
|
"@jbrowse/mobx-state-tree": "^5.6.0",
|
|
32
|
-
"@jbrowse/plugin-linear-genome-view": "^4.2.
|
|
33
|
-
"@mui/icons-material": "^7.3.
|
|
34
|
-
"@mui/material": "^7.3.
|
|
35
|
-
"@mui/system": "^7.3.
|
|
36
|
-
"@mui/x-data-grid": "^8.28.
|
|
37
|
-
"@types/node": "^25.
|
|
32
|
+
"@jbrowse/plugin-linear-genome-view": "^4.2.1",
|
|
33
|
+
"@mui/icons-material": "^7.3.11",
|
|
34
|
+
"@mui/material": "^7.3.11",
|
|
35
|
+
"@mui/system": "^7.3.11",
|
|
36
|
+
"@mui/x-data-grid": "^8.28.5",
|
|
37
|
+
"@types/node": "^25.7.0",
|
|
38
38
|
"@types/react": "^19.2.14",
|
|
39
|
-
"@typescript-eslint/eslint-plugin": "^8.59.
|
|
40
|
-
"@typescript-eslint/parser": "^8.59.
|
|
39
|
+
"@typescript-eslint/eslint-plugin": "^8.59.3",
|
|
40
|
+
"@typescript-eslint/parser": "^8.59.3",
|
|
41
41
|
"esbuild": "^0.28.0",
|
|
42
|
-
"eslint": "^10.
|
|
42
|
+
"eslint": "^10.3.0",
|
|
43
43
|
"eslint-plugin-import-x": "^4.16.2",
|
|
44
44
|
"eslint-plugin-react": "^7.37.5",
|
|
45
45
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
46
46
|
"eslint-plugin-unicorn": "^64.0.0",
|
|
47
|
-
"mobx": "^6.15.
|
|
47
|
+
"mobx": "^6.15.3",
|
|
48
48
|
"mobx-react": "^9.2.1",
|
|
49
49
|
"prettier": "^3.8.3",
|
|
50
50
|
"pretty-bytes": "^7.1.0",
|
|
51
|
-
"puppeteer": "^24.
|
|
52
|
-
"react": "^19.2.
|
|
53
|
-
"react-dom": "^19.2.
|
|
51
|
+
"puppeteer": "^24.43.1",
|
|
52
|
+
"react": "^19.2.6",
|
|
53
|
+
"react-dom": "^19.2.6",
|
|
54
54
|
"rimraf": "^6.1.3",
|
|
55
55
|
"rxjs": "^7.8.2",
|
|
56
56
|
"serve": "^14.2.6",
|
|
57
|
-
"tss-react": "^4.9.
|
|
57
|
+
"tss-react": "^4.9.21",
|
|
58
58
|
"typescript": "^6.0.3",
|
|
59
|
-
"typescript-eslint": "^8.59.
|
|
60
|
-
"vitest": "^4.1.
|
|
59
|
+
"typescript-eslint": "^8.59.3",
|
|
60
|
+
"vitest": "^4.1.6"
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
63
63
|
"clean": "rimraf dist",
|
|
@@ -3,7 +3,7 @@ import React from 'react'
|
|
|
3
3
|
import { getSession } from '@jbrowse/core/util'
|
|
4
4
|
import { observer } from 'mobx-react'
|
|
5
5
|
|
|
6
|
-
import { useStyles } from './util'
|
|
6
|
+
import { hasHoverPosition, useStyles } from './util'
|
|
7
7
|
|
|
8
8
|
import type { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view'
|
|
9
9
|
|
|
@@ -12,25 +12,11 @@ const GenomeMouseoverHighlight = observer(function ({
|
|
|
12
12
|
}: {
|
|
13
13
|
model: LinearGenomeViewModel
|
|
14
14
|
}) {
|
|
15
|
-
const
|
|
16
|
-
const { hovered, views } = session
|
|
17
|
-
|
|
18
|
-
// Early return if no MSA view exists
|
|
15
|
+
const { hovered, views } = getSession(model)
|
|
19
16
|
const hasMsaView = views.some(s => s.type === 'MsaView')
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
// Early return if no hover position
|
|
25
|
-
if (
|
|
26
|
-
!hovered ||
|
|
27
|
-
typeof hovered !== 'object' ||
|
|
28
|
-
!('hoverPosition' in hovered)
|
|
29
|
-
) {
|
|
30
|
-
return null
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return <GenomeMouseoverHighlightRenderer model={model} hovered={hovered} />
|
|
17
|
+
return hasMsaView && hasHoverPosition(hovered) ? (
|
|
18
|
+
<GenomeMouseoverHighlightRenderer model={model} hovered={hovered} />
|
|
19
|
+
) : null
|
|
34
20
|
})
|
|
35
21
|
|
|
36
22
|
const GenomeMouseoverHighlightRenderer = observer(function ({
|
|
@@ -38,8 +24,7 @@ const GenomeMouseoverHighlightRenderer = observer(function ({
|
|
|
38
24
|
hovered,
|
|
39
25
|
}: {
|
|
40
26
|
model: LinearGenomeViewModel
|
|
41
|
-
|
|
42
|
-
hovered: any
|
|
27
|
+
hovered: { hoverPosition: unknown }
|
|
43
28
|
}) {
|
|
44
29
|
const { classes } = useStyles()
|
|
45
30
|
const { offsetPx } = model
|
|
@@ -49,7 +34,7 @@ const GenomeMouseoverHighlightRenderer = observer(function ({
|
|
|
49
34
|
}
|
|
50
35
|
|
|
51
36
|
const s = model.bpToPx({ refName, coord: coord - 1 })
|
|
52
|
-
const e = model.bpToPx({ refName, coord
|
|
37
|
+
const e = model.bpToPx({ refName, coord })
|
|
53
38
|
|
|
54
39
|
if (s && e) {
|
|
55
40
|
const width = Math.max(Math.abs(e.offsetPx - s.offsetPx), 4)
|
|
@@ -3,32 +3,32 @@ import React from 'react'
|
|
|
3
3
|
import { getSession } from '@jbrowse/core/util'
|
|
4
4
|
import { observer } from 'mobx-react'
|
|
5
5
|
|
|
6
|
-
import { useStyles } from './util'
|
|
6
|
+
import { hasHoverPosition, useStyles } from './util'
|
|
7
7
|
|
|
8
8
|
import type { JBrowsePluginMsaViewModel } from '../MsaViewPanel/model'
|
|
9
9
|
import type { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view'
|
|
10
10
|
|
|
11
11
|
type LGV = LinearGenomeViewModel
|
|
12
12
|
|
|
13
|
-
// Outer component: only re-renders when MSA view or highlights change
|
|
14
13
|
const MsaToGenomeHighlight = observer(function MsaToGenomeHighlight2({
|
|
15
14
|
model,
|
|
16
15
|
}: {
|
|
17
16
|
model: LGV
|
|
18
17
|
}) {
|
|
19
|
-
const { views } = getSession(model)
|
|
18
|
+
const { views, hovered } = getSession(model)
|
|
20
19
|
const msaView = views.find(f => f.type === 'MsaView') as
|
|
21
20
|
| JBrowsePluginMsaViewModel
|
|
22
21
|
| undefined
|
|
23
|
-
|
|
24
22
|
const highlights = msaView?.connectedHighlights
|
|
25
23
|
|
|
26
|
-
//
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
// Suppress codon highlight while hovering the LGV — GenomeMouseoverHighlight
|
|
25
|
+
// handles the single-bp display in that case
|
|
26
|
+
return !hasHoverPosition(hovered) && highlights?.length ? (
|
|
27
|
+
<MsaToGenomeHighlightRenderer
|
|
28
|
+
model={model}
|
|
29
|
+
highlights={Array.from(highlights)}
|
|
30
|
+
/>
|
|
31
|
+
) : null
|
|
32
32
|
})
|
|
33
33
|
|
|
34
34
|
// Inner component: handles the scroll-dependent rendering
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { makeStyles } from 'tss-react/mui'
|
|
2
2
|
|
|
3
|
+
export function hasHoverPosition(
|
|
4
|
+
hovered: unknown,
|
|
5
|
+
): hovered is { hoverPosition: unknown } {
|
|
6
|
+
return !!hovered && typeof hovered === 'object' && 'hoverPosition' in hovered
|
|
7
|
+
}
|
|
8
|
+
|
|
3
9
|
export const useStyles = makeStyles()({
|
|
4
10
|
highlight: {
|
|
5
11
|
height: '100%',
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
2
|
|
|
3
|
-
import { readConfObject } from '@jbrowse/core/configuration'
|
|
4
3
|
import { Dialog } from '@jbrowse/core/ui'
|
|
5
4
|
import { getSession } from '@jbrowse/core/util'
|
|
6
5
|
import { Tab, Tabs } from '@mui/material'
|
|
7
6
|
|
|
8
|
-
import EnsemblGeneTree from './EnsemblGeneTree/EnsemblGeneTree'
|
|
9
7
|
import ManualMSALoader from './ManualMSALoader/ManualMSALoader'
|
|
10
8
|
import NCBIBlastPanel from './NCBIBlastQuery/NCBIBlastPanel'
|
|
11
9
|
import PreLoadedMSA from './PreLoadedMSA/PreLoadedMSADataPanel'
|
|
10
|
+
import { readMsaDatasets } from './PreLoadedMSA/types'
|
|
12
11
|
import TabPanel from './TabPanel'
|
|
13
12
|
|
|
14
|
-
import type { Dataset } from './PreLoadedMSA/types'
|
|
15
13
|
import type { AbstractTrackModel, Feature } from '@jbrowse/core/util'
|
|
16
14
|
|
|
17
15
|
export default function LaunchMsaViewDialog({
|
|
@@ -24,11 +22,8 @@ export default function LaunchMsaViewDialog({
|
|
|
24
22
|
model: AbstractTrackModel
|
|
25
23
|
}) {
|
|
26
24
|
const session = getSession(model)
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
| Dataset[]
|
|
30
|
-
| undefined
|
|
31
|
-
const hasPreloadedDatasets = datasets && datasets.length > 0
|
|
25
|
+
const datasets = readMsaDatasets(session.jbrowse)
|
|
26
|
+
const hasPreloadedDatasets = !!datasets?.length
|
|
32
27
|
|
|
33
28
|
const [value, setValue] = useState('ncbi_blast')
|
|
34
29
|
|
|
@@ -43,7 +38,6 @@ export default function LaunchMsaViewDialog({
|
|
|
43
38
|
{hasPreloadedDatasets ? (
|
|
44
39
|
<Tab label="Pre-loaded MSA datasets" value="preloaded_msa" />
|
|
45
40
|
) : null}
|
|
46
|
-
<Tab label="Ensembl GeneTree" value="ensembl_genetree" />
|
|
47
41
|
<Tab label="Manual upload" value="manual_msa" />
|
|
48
42
|
</Tabs>
|
|
49
43
|
<TabPanel value={value} index="ncbi_blast">
|
|
@@ -62,13 +56,6 @@ export default function LaunchMsaViewDialog({
|
|
|
62
56
|
/>
|
|
63
57
|
</TabPanel>
|
|
64
58
|
) : null}
|
|
65
|
-
<TabPanel value={value} index="ensembl_genetree">
|
|
66
|
-
<EnsemblGeneTree
|
|
67
|
-
model={model}
|
|
68
|
-
feature={feature}
|
|
69
|
-
handleClose={handleClose}
|
|
70
|
-
/>
|
|
71
|
-
</TabPanel>
|
|
72
59
|
<TabPanel value={value} index="manual_msa">
|
|
73
60
|
<ManualMSALoader
|
|
74
61
|
model={model}
|
|
@@ -35,6 +35,21 @@ const useStyles = makeStyles()({
|
|
|
35
35
|
textAreaFont: {
|
|
36
36
|
fontFamily: 'Courier New',
|
|
37
37
|
},
|
|
38
|
+
inputContainer: {
|
|
39
|
+
marginBottom: 30,
|
|
40
|
+
},
|
|
41
|
+
fileContainer: {
|
|
42
|
+
maxWidth: 500,
|
|
43
|
+
},
|
|
44
|
+
msaInput: {
|
|
45
|
+
marginBottom: 20,
|
|
46
|
+
},
|
|
47
|
+
queryNameInput: {
|
|
48
|
+
marginTop: 20,
|
|
49
|
+
},
|
|
50
|
+
warningAlert: {
|
|
51
|
+
marginTop: 10,
|
|
52
|
+
},
|
|
38
53
|
})
|
|
39
54
|
|
|
40
55
|
const ManualMSALoader = observer(function PreLoadedMSA2({
|
|
@@ -62,10 +77,10 @@ const ManualMSALoader = observer(function PreLoadedMSA2({
|
|
|
62
77
|
setSelectedId,
|
|
63
78
|
selectedTranscript,
|
|
64
79
|
proteinSequence,
|
|
65
|
-
error
|
|
80
|
+
error,
|
|
66
81
|
} = useTranscriptSelection({ feature, view })
|
|
67
82
|
|
|
68
|
-
const e = launchViewError ??
|
|
83
|
+
const e = launchViewError ?? error
|
|
69
84
|
return (
|
|
70
85
|
<>
|
|
71
86
|
<DialogContent className={classes.dialogContent}>
|
|
@@ -91,9 +106,9 @@ const ManualMSALoader = observer(function PreLoadedMSA2({
|
|
|
91
106
|
</RadioGroup>
|
|
92
107
|
</FormControl>
|
|
93
108
|
|
|
94
|
-
<div
|
|
109
|
+
<div className={classes.inputContainer}>
|
|
95
110
|
{inputMethod === 'file' ? (
|
|
96
|
-
<div
|
|
111
|
+
<div className={classes.fileContainer}>
|
|
97
112
|
<FileSelector
|
|
98
113
|
name="MSA File .aln (Clustal), .fa/.mfa (aligned FASTA), .stock (Stockholm), etc)"
|
|
99
114
|
inline
|
|
@@ -114,7 +129,7 @@ const ManualMSALoader = observer(function PreLoadedMSA2({
|
|
|
114
129
|
name="MSA"
|
|
115
130
|
multiline
|
|
116
131
|
minRows={5}
|
|
117
|
-
|
|
132
|
+
className={classes.msaInput}
|
|
118
133
|
maxRows={10}
|
|
119
134
|
fullWidth
|
|
120
135
|
placeholder="Paste MSA here"
|
|
@@ -154,7 +169,7 @@ const ManualMSALoader = observer(function PreLoadedMSA2({
|
|
|
154
169
|
name="MSA row name"
|
|
155
170
|
fullWidth
|
|
156
171
|
required
|
|
157
|
-
|
|
172
|
+
className={classes.queryNameInput}
|
|
158
173
|
placeholder="Row name in MSA that corresponds to the selected transcript"
|
|
159
174
|
helperText="Required: Specify the name of the row in your MSA that should be aligned with the selected transcript"
|
|
160
175
|
value={querySeqName}
|
|
@@ -163,13 +178,13 @@ const ManualMSALoader = observer(function PreLoadedMSA2({
|
|
|
163
178
|
}}
|
|
164
179
|
/>
|
|
165
180
|
|
|
166
|
-
{!querySeqName.trim()
|
|
167
|
-
<Alert severity="warning"
|
|
181
|
+
{!querySeqName.trim() ? (
|
|
182
|
+
<Alert severity="warning" className={classes.warningAlert}>
|
|
168
183
|
Without specifying the MSA row name, clicking on the MSA will not
|
|
169
184
|
navigate to the corresponding genome position, and hovering
|
|
170
185
|
highlights will not work.
|
|
171
186
|
</Alert>
|
|
172
|
-
)}
|
|
187
|
+
) : null}
|
|
173
188
|
</DialogContent>
|
|
174
189
|
|
|
175
190
|
<DialogActions>
|
|
@@ -183,17 +198,13 @@ const ManualMSALoader = observer(function PreLoadedMSA2({
|
|
|
183
198
|
}
|
|
184
199
|
onClick={() => {
|
|
185
200
|
try {
|
|
186
|
-
if (!selectedTranscript) {
|
|
187
|
-
return
|
|
188
|
-
}
|
|
189
|
-
|
|
190
201
|
setLaunchViewError(undefined)
|
|
191
202
|
launchView({
|
|
192
203
|
session,
|
|
193
204
|
newViewTitle: getGeneDisplayName(selectedTranscript),
|
|
194
205
|
view,
|
|
195
|
-
feature: selectedTranscript
|
|
196
|
-
querySeqName: querySeqName.trim()
|
|
206
|
+
feature: selectedTranscript!,
|
|
207
|
+
querySeqName: querySeqName.trim(),
|
|
197
208
|
...(inputMethod === 'file'
|
|
198
209
|
? {
|
|
199
210
|
msaFilehandle: msaFileLocation,
|
|
@@ -202,15 +213,15 @@ const ManualMSALoader = observer(function PreLoadedMSA2({
|
|
|
202
213
|
: {
|
|
203
214
|
data: {
|
|
204
215
|
msa: msaText,
|
|
205
|
-
tree: treeText
|
|
216
|
+
tree: treeText,
|
|
206
217
|
},
|
|
207
218
|
}),
|
|
208
219
|
})
|
|
209
220
|
|
|
210
221
|
handleClose()
|
|
211
|
-
} catch (
|
|
212
|
-
console.error(
|
|
213
|
-
setLaunchViewError(
|
|
222
|
+
} catch (err) {
|
|
223
|
+
console.error(err)
|
|
224
|
+
setLaunchViewError(err)
|
|
214
225
|
}
|
|
215
226
|
}}
|
|
216
227
|
>
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
Typography,
|
|
14
14
|
} from '@mui/material'
|
|
15
15
|
import { observer } from 'mobx-react'
|
|
16
|
+
import { makeStyles } from 'tss-react/mui'
|
|
16
17
|
|
|
17
18
|
import { blastLaunchViewFromCache } from './blastLaunchView'
|
|
18
19
|
import { useCachedBlastResults } from './useCachedBlastResults'
|
|
@@ -22,6 +23,19 @@ import type { CachedBlastResult } from '../../../utils/blastCache'
|
|
|
22
23
|
import type { AbstractTrackModel, Feature } from '@jbrowse/core/util'
|
|
23
24
|
import type { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view'
|
|
24
25
|
|
|
26
|
+
const useStyles = makeStyles()({
|
|
27
|
+
header: {
|
|
28
|
+
display: 'flex',
|
|
29
|
+
justifyContent: 'space-between',
|
|
30
|
+
alignItems: 'center',
|
|
31
|
+
marginBottom: 8,
|
|
32
|
+
},
|
|
33
|
+
resultList: {
|
|
34
|
+
maxHeight: 300,
|
|
35
|
+
overflow: 'auto',
|
|
36
|
+
},
|
|
37
|
+
})
|
|
38
|
+
|
|
25
39
|
function getResultDisplayName(result: CachedBlastResult): string {
|
|
26
40
|
const parts = []
|
|
27
41
|
if (result.geneName) {
|
|
@@ -45,6 +59,7 @@ const CachedBlastResults = observer(function ({
|
|
|
45
59
|
handleClose: () => void
|
|
46
60
|
feature: Feature
|
|
47
61
|
}) {
|
|
62
|
+
const { classes } = useStyles()
|
|
48
63
|
const view = getContainingView(model) as LinearGenomeViewModel
|
|
49
64
|
const [operationError, setOperationError] = useState<unknown>()
|
|
50
65
|
|
|
@@ -82,14 +97,7 @@ const CachedBlastResults = observer(function ({
|
|
|
82
97
|
|
|
83
98
|
return (
|
|
84
99
|
<div>
|
|
85
|
-
<div
|
|
86
|
-
style={{
|
|
87
|
-
display: 'flex',
|
|
88
|
-
justifyContent: 'space-between',
|
|
89
|
-
alignItems: 'center',
|
|
90
|
-
marginBottom: 8,
|
|
91
|
-
}}
|
|
92
|
-
>
|
|
100
|
+
<div className={classes.header}>
|
|
93
101
|
<Typography variant="subtitle1">
|
|
94
102
|
Cached BLAST Results ({results.length})
|
|
95
103
|
</Typography>
|
|
@@ -108,7 +116,7 @@ const CachedBlastResults = observer(function ({
|
|
|
108
116
|
Clear All
|
|
109
117
|
</Button>
|
|
110
118
|
</div>
|
|
111
|
-
<List dense
|
|
119
|
+
<List dense className={classes.resultList}>
|
|
112
120
|
{results.map(result => (
|
|
113
121
|
<ListItem
|
|
114
122
|
key={result.id}
|