jbrowse-plugin-msaview 2.0.6 → 2.2.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/dist/AddHighlightModel/GenomeMouseoverHighlight.js +3 -3
- package/dist/AddHighlightModel/GenomeMouseoverHighlight.js.map +1 -1
- package/dist/AddHighlightModel/MsaToGenomeHighlight.js +3 -1
- package/dist/AddHighlightModel/MsaToGenomeHighlight.js.map +1 -1
- package/dist/ExternalLink.d.ts +3 -0
- package/dist/ExternalLink.js +11 -0
- package/dist/ExternalLink.js.map +1 -0
- package/dist/LaunchMsaView/components/{NewNCBIBlastQuery/NcbiBlastPanel.d.ts → EnsemblGeneTree/EnsemblGeneTree.d.ts} +2 -2
- package/dist/LaunchMsaView/components/EnsemblGeneTree/EnsemblGeneTree.js +76 -0
- package/dist/LaunchMsaView/components/EnsemblGeneTree/EnsemblGeneTree.js.map +1 -0
- package/dist/LaunchMsaView/components/EnsemblGeneTree/ensemblGeneTreeLaunchView.d.ts +13 -0
- package/dist/LaunchMsaView/components/EnsemblGeneTree/ensemblGeneTreeLaunchView.js +12 -0
- package/dist/LaunchMsaView/components/EnsemblGeneTree/ensemblGeneTreeLaunchView.js.map +1 -0
- package/dist/LaunchMsaView/components/EnsemblGeneTree/ensemblGeneTreeUtils.d.ts +6 -0
- package/dist/LaunchMsaView/components/EnsemblGeneTree/ensemblGeneTreeUtils.js +25 -0
- package/dist/LaunchMsaView/components/EnsemblGeneTree/ensemblGeneTreeUtils.js.map +1 -0
- package/dist/LaunchMsaView/components/EnsemblGeneTree/gatherSequencesFromTree.d.ts +2 -0
- package/dist/LaunchMsaView/components/EnsemblGeneTree/gatherSequencesFromTree.js +20 -0
- package/dist/LaunchMsaView/components/EnsemblGeneTree/gatherSequencesFromTree.js.map +1 -0
- package/dist/LaunchMsaView/components/EnsemblGeneTree/types.d.ts +24 -0
- package/dist/LaunchMsaView/components/EnsemblGeneTree/types.js +2 -0
- package/dist/LaunchMsaView/components/EnsemblGeneTree/types.js.map +1 -0
- package/dist/LaunchMsaView/components/EnsemblGeneTree/useGeneTree.d.ts +10 -0
- package/dist/LaunchMsaView/components/EnsemblGeneTree/useGeneTree.js +27 -0
- package/dist/LaunchMsaView/components/EnsemblGeneTree/useGeneTree.js.map +1 -0
- package/dist/LaunchMsaView/components/EnsemblGeneTree/util.d.ts +4 -0
- package/dist/LaunchMsaView/components/EnsemblGeneTree/util.js +38 -0
- package/dist/LaunchMsaView/components/EnsemblGeneTree/util.js.map +1 -0
- package/dist/LaunchMsaView/components/LaunchMsaViewDialog.js +22 -16
- package/dist/LaunchMsaView/components/LaunchMsaViewDialog.js.map +1 -1
- package/dist/LaunchMsaView/components/ManualMSALoader/ManualMSALoader.d.ts +8 -0
- package/dist/LaunchMsaView/components/ManualMSALoader/ManualMSALoader.js +103 -0
- package/dist/LaunchMsaView/components/ManualMSALoader/ManualMSALoader.js.map +1 -0
- package/dist/LaunchMsaView/components/ManualMSALoader/fetchGeneList.d.ts +1 -0
- package/dist/LaunchMsaView/components/ManualMSALoader/fetchGeneList.js +12 -0
- package/dist/LaunchMsaView/components/ManualMSALoader/fetchGeneList.js.map +1 -0
- package/dist/LaunchMsaView/components/ManualMSALoader/launchView.d.ts +14 -0
- package/dist/LaunchMsaView/components/ManualMSALoader/launchView.js +12 -0
- package/dist/LaunchMsaView/components/ManualMSALoader/launchView.js.map +1 -0
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastAutomaticPanel.d.ts +10 -0
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastAutomaticPanel.js +89 -0
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastAutomaticPanel.js.map +1 -0
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastManualPanel.d.ts +10 -0
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastManualPanel.js +55 -0
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastManualPanel.js.map +1 -0
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastMethodSelector.d.ts +5 -0
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastMethodSelector.js +11 -0
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastMethodSelector.js.map +1 -0
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastPanel.d.ts +7 -0
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastPanel.js +30 -0
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastPanel.js.map +1 -0
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBISettingsDialog.d.ts +5 -0
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBISettingsDialog.js +26 -0
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBISettingsDialog.js.map +1 -0
- package/dist/LaunchMsaView/components/{NewNCBIBlastQuery/ncbiBlastLaunchView.d.ts → NCBIBlastQuery/blastLaunchView.d.ts} +2 -1
- package/dist/LaunchMsaView/components/{NewNCBIBlastQuery/ncbiBlastLaunchView.js → NCBIBlastQuery/blastLaunchView.js} +3 -6
- package/dist/LaunchMsaView/components/NCBIBlastQuery/blastLaunchView.js.map +1 -0
- package/dist/LaunchMsaView/components/NCBIBlastQuery/consts.d.ts +1 -0
- package/dist/LaunchMsaView/components/NCBIBlastQuery/consts.js +2 -0
- package/dist/LaunchMsaView/components/NCBIBlastQuery/consts.js.map +1 -0
- package/dist/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.js +18 -19
- package/dist/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.js.map +1 -1
- package/dist/LaunchMsaView/components/TabPanel.d.ts +6 -0
- package/dist/LaunchMsaView/components/TabPanel.js +6 -0
- package/dist/LaunchMsaView/components/TabPanel.js.map +1 -0
- package/dist/LaunchMsaView/components/TranscriptSelector.d.ts +10 -0
- package/dist/LaunchMsaView/components/TranscriptSelector.js +45 -0
- package/dist/LaunchMsaView/components/TranscriptSelector.js.map +1 -0
- package/dist/LaunchMsaView/components/calculateProteinSequence.d.ts +17 -0
- package/dist/LaunchMsaView/components/calculateProteinSequence.js +39 -0
- package/dist/LaunchMsaView/components/calculateProteinSequence.js.map +1 -0
- package/dist/LaunchMsaView/components/fetchSeq.d.ts +8 -0
- package/dist/LaunchMsaView/components/fetchSeq.js +23 -0
- package/dist/LaunchMsaView/components/fetchSeq.js.map +1 -0
- package/dist/LaunchMsaView/components/types.d.ts +10 -0
- package/dist/LaunchMsaView/components/types.js +2 -0
- package/dist/LaunchMsaView/components/types.js.map +1 -0
- package/dist/LaunchMsaView/components/{NewNCBIBlastQuery/useFeatureSequence.d.ts → useFeatureSequence.d.ts} +3 -6
- package/dist/LaunchMsaView/components/{NewNCBIBlastQuery/useFeatureSequence.js → useFeatureSequence.js} +13 -23
- package/dist/LaunchMsaView/components/useFeatureSequence.js.map +1 -0
- package/dist/LaunchMsaView/components/util.js.map +1 -0
- package/dist/LaunchMsaView/util.d.ts +5 -1
- package/dist/LaunchMsaView/util.js +15 -1
- package/dist/LaunchMsaView/util.js.map +1 -1
- package/dist/MsaViewPanel/components/LoadingBLAST.d.ts +2 -1
- package/dist/MsaViewPanel/components/LoadingBLAST.js +6 -6
- package/dist/MsaViewPanel/components/LoadingBLAST.js.map +1 -1
- package/dist/MsaViewPanel/components/MsaViewPanel.js +1 -1
- package/dist/MsaViewPanel/components/MsaViewPanel.js.map +1 -1
- package/dist/MsaViewPanel/components/RIDLink.d.ts +2 -1
- package/dist/MsaViewPanel/components/RIDLink.js +6 -9
- package/dist/MsaViewPanel/components/RIDLink.js.map +1 -1
- package/dist/MsaViewPanel/doLaunchBlast.js +18 -20
- package/dist/MsaViewPanel/doLaunchBlast.js.map +1 -1
- package/dist/MsaViewPanel/model.d.ts +15 -12
- package/dist/MsaViewPanel/model.js.map +1 -1
- package/dist/ReadOnlyTextField2.d.ts +4 -0
- package/dist/ReadOnlyTextField2.js +20 -0
- package/dist/ReadOnlyTextField2.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/dist/jbrowse-plugin-msaview.umd.production.min.js +33 -31
- package/dist/jbrowse-plugin-msaview.umd.production.min.js.map +4 -4
- package/dist/utils/fetch.d.ts +1 -1
- package/dist/utils/fetch.js.map +1 -1
- package/dist/utils/ncbiBlast.d.ts +2 -2
- package/dist/utils/ncbiBlast.js +29 -15
- package/dist/utils/ncbiBlast.js.map +1 -1
- package/dist/utils/types.d.ts +20 -0
- package/dist/utils/types.js +2 -0
- package/dist/utils/types.js.map +1 -0
- package/package.json +3 -3
- package/src/AddHighlightModel/GenomeMouseoverHighlight.tsx +3 -3
- package/src/AddHighlightModel/MsaToGenomeHighlight.tsx +2 -1
- package/src/ExternalLink.tsx +15 -0
- package/src/LaunchMsaView/components/EnsemblGeneTree/EnsemblGeneTree.tsx +127 -0
- package/src/LaunchMsaView/components/EnsemblGeneTree/ensemblGeneTreeLaunchView.ts +30 -0
- package/src/LaunchMsaView/components/EnsemblGeneTree/ensemblGeneTreeUtils.ts +46 -0
- package/src/LaunchMsaView/components/EnsemblGeneTree/gatherSequencesFromTree.ts +22 -0
- package/src/LaunchMsaView/components/EnsemblGeneTree/types.ts +28 -0
- package/src/LaunchMsaView/components/EnsemblGeneTree/useGeneTree.ts +29 -0
- package/src/LaunchMsaView/components/EnsemblGeneTree/util.ts +45 -0
- package/src/LaunchMsaView/components/LaunchMsaViewDialog.tsx +36 -21
- package/src/LaunchMsaView/components/ManualMSALoader/ManualMSALoader.tsx +219 -0
- package/src/LaunchMsaView/components/ManualMSALoader/fetchGeneList.ts +13 -0
- package/src/LaunchMsaView/components/ManualMSALoader/launchView.ts +34 -0
- package/src/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastAutomaticPanel.tsx +226 -0
- package/src/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastManualPanel.tsx +111 -0
- package/src/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastMethodSelector.tsx +34 -0
- package/src/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastPanel.tsx +82 -0
- package/src/LaunchMsaView/components/NCBIBlastQuery/NCBISettingsDialog.tsx +75 -0
- package/src/LaunchMsaView/components/{NewNCBIBlastQuery/ncbiBlastLaunchView.ts → NCBIBlastQuery/blastLaunchView.ts} +4 -5
- package/src/LaunchMsaView/components/NCBIBlastQuery/consts.ts +1 -0
- package/src/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.tsx +28 -44
- package/src/LaunchMsaView/components/TabPanel.tsx +19 -0
- package/src/LaunchMsaView/components/TranscriptSelector.tsx +99 -0
- package/src/LaunchMsaView/components/calculateProteinSequence.ts +68 -0
- package/src/LaunchMsaView/components/fetchSeq.ts +37 -0
- package/src/LaunchMsaView/components/types.ts +11 -0
- package/src/LaunchMsaView/components/{NewNCBIBlastQuery/useFeatureSequence.ts → useFeatureSequence.ts} +20 -42
- package/src/LaunchMsaView/util.ts +22 -2
- package/src/MsaViewPanel/components/LoadingBLAST.tsx +26 -8
- package/src/MsaViewPanel/components/MsaViewPanel.tsx +5 -1
- package/src/MsaViewPanel/components/RIDLink.tsx +8 -8
- package/src/MsaViewPanel/doLaunchBlast.ts +29 -30
- package/src/MsaViewPanel/model.ts +1 -0
- package/src/ReadOnlyTextField2.tsx +33 -0
- package/src/index.ts +23 -0
- package/src/utils/fetch.ts +2 -2
- package/src/utils/ncbiBlast.ts +40 -30
- package/src/utils/types.ts +14 -0
- package/dist/LaunchMsaView/components/NewNCBIBlastQuery/NcbiBlastPanel.js +0 -85
- package/dist/LaunchMsaView/components/NewNCBIBlastQuery/NcbiBlastPanel.js.map +0 -1
- package/dist/LaunchMsaView/components/NewNCBIBlastQuery/calculateProteinSequence.d.ts +0 -26
- package/dist/LaunchMsaView/components/NewNCBIBlastQuery/calculateProteinSequence.js +0 -48
- package/dist/LaunchMsaView/components/NewNCBIBlastQuery/calculateProteinSequence.js.map +0 -1
- package/dist/LaunchMsaView/components/NewNCBIBlastQuery/index.d.ts +0 -1
- package/dist/LaunchMsaView/components/NewNCBIBlastQuery/index.js +0 -2
- package/dist/LaunchMsaView/components/NewNCBIBlastQuery/index.js.map +0 -1
- package/dist/LaunchMsaView/components/NewNCBIBlastQuery/ncbiBlastLaunchView.js.map +0 -1
- package/dist/LaunchMsaView/components/NewNCBIBlastQuery/useFeatureSequence.js.map +0 -1
- package/dist/LaunchMsaView/components/NewNCBIBlastQuery/util.js.map +0 -1
- package/dist/LaunchMsaView/components/TabUtils.d.ts +0 -8
- package/dist/LaunchMsaView/components/TabUtils.js +0 -7
- package/dist/LaunchMsaView/components/TabUtils.js.map +0 -1
- package/dist/LaunchMsaView/components/tabUtil.d.ts +0 -4
- package/dist/LaunchMsaView/components/tabUtil.js +0 -7
- package/dist/LaunchMsaView/components/tabUtil.js.map +0 -1
- package/dist/OpenInNewIcon.d.ts +0 -3
- package/dist/OpenInNewIcon.js +0 -8
- package/dist/OpenInNewIcon.js.map +0 -1
- package/src/LaunchMsaView/components/NewNCBIBlastQuery/NcbiBlastPanel.tsx +0 -171
- package/src/LaunchMsaView/components/NewNCBIBlastQuery/calculateProteinSequence.ts +0 -92
- package/src/LaunchMsaView/components/NewNCBIBlastQuery/index.tsx +0 -1
- package/src/LaunchMsaView/components/TabUtils.tsx +0 -25
- package/src/LaunchMsaView/components/tabUtil.ts +0 -6
- package/src/OpenInNewIcon.tsx +0 -14
- /package/dist/LaunchMsaView/components/{NewNCBIBlastQuery/util.d.ts → util.d.ts} +0 -0
- /package/dist/LaunchMsaView/components/{NewNCBIBlastQuery/util.js → util.js} +0 -0
- /package/src/LaunchMsaView/components/{NewNCBIBlastQuery/util.ts → util.ts} +0 -0
|
@@ -17,20 +17,36 @@ const useStyles = makeStyles()(theme => ({
|
|
|
17
17
|
},
|
|
18
18
|
}))
|
|
19
19
|
|
|
20
|
-
function RIDError({
|
|
20
|
+
function RIDError({
|
|
21
|
+
baseUrl,
|
|
22
|
+
rid,
|
|
23
|
+
error,
|
|
24
|
+
}: {
|
|
25
|
+
baseUrl: string
|
|
26
|
+
rid?: string
|
|
27
|
+
error: unknown
|
|
28
|
+
}) {
|
|
21
29
|
return (
|
|
22
30
|
<div>
|
|
23
|
-
{rid ? <RIDLink rid={rid} /> : null}
|
|
31
|
+
{rid ? <RIDLink rid={rid} baseUrl={baseUrl} /> : null}
|
|
24
32
|
<ErrorMessage error={error} />
|
|
25
33
|
</div>
|
|
26
34
|
)
|
|
27
35
|
}
|
|
28
36
|
|
|
29
|
-
function RIDProgress({
|
|
37
|
+
function RIDProgress({
|
|
38
|
+
baseUrl,
|
|
39
|
+
rid,
|
|
40
|
+
progress,
|
|
41
|
+
}: {
|
|
42
|
+
baseUrl: string
|
|
43
|
+
rid: string
|
|
44
|
+
progress: string
|
|
45
|
+
}) {
|
|
30
46
|
const { classes } = useStyles()
|
|
31
47
|
return (
|
|
32
48
|
<div className={classes.loading}>
|
|
33
|
-
{rid ? <RIDLink rid={rid} /> : null}
|
|
49
|
+
{rid ? <RIDLink baseUrl={baseUrl} rid={rid} /> : null}
|
|
34
50
|
<Typography>{progress}</Typography>
|
|
35
51
|
</div>
|
|
36
52
|
)
|
|
@@ -38,8 +54,10 @@ function RIDProgress({ rid, progress }: { rid: string; progress: string }) {
|
|
|
38
54
|
|
|
39
55
|
const LoadingBLAST = observer(function LoadingBLAST2({
|
|
40
56
|
model,
|
|
57
|
+
baseUrl,
|
|
41
58
|
}: {
|
|
42
59
|
model: JBrowsePluginMsaViewModel
|
|
60
|
+
baseUrl: string
|
|
43
61
|
}) {
|
|
44
62
|
const { progress, rid, error, processing } = model
|
|
45
63
|
const { classes } = useStyles()
|
|
@@ -47,10 +65,10 @@ const LoadingBLAST = observer(function LoadingBLAST2({
|
|
|
47
65
|
<div className={classes.margin}>
|
|
48
66
|
<LoadingEllipses message="Running NCBI BLAST" variant="h5" />
|
|
49
67
|
{error ? (
|
|
50
|
-
<RIDError rid={rid} error={error} />
|
|
51
|
-
) :
|
|
52
|
-
<RIDProgress rid={rid} progress={progress} />
|
|
53
|
-
) : null
|
|
68
|
+
<RIDError baseUrl={baseUrl} rid={rid} error={error} />
|
|
69
|
+
) : rid ? (
|
|
70
|
+
<RIDProgress baseUrl={baseUrl} rid={rid} progress={progress} />
|
|
71
|
+
) : null}
|
|
54
72
|
<Typography>{processing || 'Initializing BLAST query'}</Typography>
|
|
55
73
|
</div>
|
|
56
74
|
)
|
|
@@ -14,7 +14,11 @@ const MsaViewPanel = observer(function MsaViewPanel2({
|
|
|
14
14
|
const { blastParams } = model
|
|
15
15
|
return (
|
|
16
16
|
<div>
|
|
17
|
-
{blastParams ?
|
|
17
|
+
{blastParams ? (
|
|
18
|
+
<LoadingBLAST model={model} baseUrl={blastParams.baseUrl} />
|
|
19
|
+
) : (
|
|
20
|
+
<MSAView model={model} />
|
|
21
|
+
)}
|
|
18
22
|
</div>
|
|
19
23
|
)
|
|
20
24
|
})
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { Typography } from '@mui/material'
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import { BLAST_URL } from '../../utils/ncbiBlast'
|
|
5
|
+
import ExternalLink from '../../ExternalLink'
|
|
7
6
|
|
|
8
|
-
function RIDLink({ rid }: { rid: string }) {
|
|
7
|
+
function RIDLink({ baseUrl, rid }: { rid: string; baseUrl: string }) {
|
|
9
8
|
return (
|
|
10
9
|
<Typography>
|
|
11
|
-
RID {rid}
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
</
|
|
10
|
+
RID {rid} (
|
|
11
|
+
<ExternalLink href={`${baseUrl}?CMD=Get&RID=${rid}`}>
|
|
12
|
+
see status
|
|
13
|
+
</ExternalLink>
|
|
14
|
+
)
|
|
15
15
|
</Typography>
|
|
16
16
|
)
|
|
17
17
|
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { JBrowsePluginMsaViewModel } from './model'
|
|
2
|
-
import {
|
|
3
|
-
makeId,
|
|
4
|
-
strip,
|
|
5
|
-
} from '../LaunchMsaView/components/NewNCBIBlastQuery/util'
|
|
2
|
+
import { makeId, strip } from '../LaunchMsaView/components/util'
|
|
6
3
|
import { launchMSA } from '../utils/msa'
|
|
7
4
|
import { queryBlast } from '../utils/ncbiBlast'
|
|
8
5
|
|
|
@@ -11,13 +8,18 @@ export async function doLaunchBlast({
|
|
|
11
8
|
}: {
|
|
12
9
|
self: JBrowsePluginMsaViewModel
|
|
13
10
|
}) {
|
|
14
|
-
const {
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
const {
|
|
12
|
+
baseUrl,
|
|
13
|
+
blastDatabase,
|
|
14
|
+
blastProgram,
|
|
15
|
+
msaAlgorithm,
|
|
16
|
+
proteinSequence,
|
|
17
|
+
} = self.blastParams!
|
|
17
18
|
const { hits } = await queryBlast({
|
|
18
|
-
query,
|
|
19
|
+
query: proteinSequence.replaceAll('*', '').replaceAll('&', ''),
|
|
19
20
|
blastDatabase,
|
|
20
21
|
blastProgram,
|
|
22
|
+
baseUrl,
|
|
21
23
|
onProgress: arg => {
|
|
22
24
|
self.setProgress(arg)
|
|
23
25
|
},
|
|
@@ -26,31 +28,28 @@ export async function doLaunchBlast({
|
|
|
26
28
|
},
|
|
27
29
|
})
|
|
28
30
|
|
|
29
|
-
|
|
30
|
-
`>QUERY\n${query}`,
|
|
31
|
-
...hits
|
|
32
|
-
.map(
|
|
33
|
-
h =>
|
|
34
|
-
[
|
|
35
|
-
makeId(
|
|
36
|
-
h.description[0] ?? {
|
|
37
|
-
accession: 'unknown',
|
|
38
|
-
id: 'unknown',
|
|
39
|
-
sciname: 'unknown',
|
|
40
|
-
},
|
|
41
|
-
),
|
|
42
|
-
strip(h.hsps[0]?.hseq ?? ''),
|
|
43
|
-
] as const,
|
|
44
|
-
)
|
|
45
|
-
.map(([id, seq]) => `>${id}\n${seq}`),
|
|
46
|
-
].join('\n')
|
|
47
|
-
|
|
48
|
-
const data = await launchMSA({
|
|
31
|
+
return launchMSA({
|
|
49
32
|
algorithm: msaAlgorithm,
|
|
50
|
-
sequence
|
|
33
|
+
sequence: [
|
|
34
|
+
`>QUERY\n${proteinSequence.replaceAll('*', '').replaceAll('&', '')}`,
|
|
35
|
+
...hits
|
|
36
|
+
.map(
|
|
37
|
+
h =>
|
|
38
|
+
[
|
|
39
|
+
makeId(
|
|
40
|
+
h.description[0] ?? {
|
|
41
|
+
accession: 'unknown',
|
|
42
|
+
id: 'unknown',
|
|
43
|
+
sciname: 'unknown',
|
|
44
|
+
},
|
|
45
|
+
),
|
|
46
|
+
strip(h.hsps[0]?.hseq ?? ''),
|
|
47
|
+
] as const,
|
|
48
|
+
)
|
|
49
|
+
.map(([id, seq]) => `>${id}\n${seq}`),
|
|
50
|
+
].join('\n'),
|
|
51
51
|
onProgress: arg => {
|
|
52
52
|
self.setProgress(arg)
|
|
53
53
|
},
|
|
54
54
|
})
|
|
55
|
-
return data
|
|
56
55
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
|
|
3
|
+
import { makeStyles } from 'tss-react/mui'
|
|
4
|
+
|
|
5
|
+
import TextField2 from './TextField2'
|
|
6
|
+
|
|
7
|
+
const useStyles = makeStyles()({
|
|
8
|
+
textAreaFont: {
|
|
9
|
+
fontFamily: 'Courier New',
|
|
10
|
+
},
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
export default function ReadOnlyTextField2({ value }: { value: string }) {
|
|
14
|
+
const { classes } = useStyles()
|
|
15
|
+
return (
|
|
16
|
+
<TextField2
|
|
17
|
+
variant="outlined"
|
|
18
|
+
multiline
|
|
19
|
+
minRows={5}
|
|
20
|
+
maxRows={10}
|
|
21
|
+
fullWidth
|
|
22
|
+
value={value}
|
|
23
|
+
slotProps={{
|
|
24
|
+
input: {
|
|
25
|
+
readOnly: true,
|
|
26
|
+
classes: {
|
|
27
|
+
input: classes.textAreaFont,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
}}
|
|
31
|
+
/>
|
|
32
|
+
)
|
|
33
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import Plugin from '@jbrowse/core/Plugin'
|
|
2
2
|
import PluginManager from '@jbrowse/core/PluginManager'
|
|
3
|
+
import { ConfigurationSchema } from '@jbrowse/core/configuration'
|
|
3
4
|
import { AbstractSessionModel, isAbstractMenuManager } from '@jbrowse/core/util'
|
|
4
5
|
import GridOn from '@mui/icons-material/GridOn'
|
|
6
|
+
import { types } from 'mobx-state-tree'
|
|
5
7
|
|
|
6
8
|
import { version } from '../package.json'
|
|
7
9
|
import AddHighlightModelF from './AddHighlightModel'
|
|
@@ -29,4 +31,25 @@ export default class MsaViewPlugin extends Plugin {
|
|
|
29
31
|
})
|
|
30
32
|
}
|
|
31
33
|
}
|
|
34
|
+
|
|
35
|
+
rootConfigurationSchema = {
|
|
36
|
+
msa: ConfigurationSchema('MSA', {
|
|
37
|
+
datasets: types.maybe(
|
|
38
|
+
types.array(
|
|
39
|
+
ConfigurationSchema('MSAEntry', {
|
|
40
|
+
name: {
|
|
41
|
+
type: 'string',
|
|
42
|
+
defaultValue: '',
|
|
43
|
+
},
|
|
44
|
+
adapter: {
|
|
45
|
+
type: 'frozen',
|
|
46
|
+
description:
|
|
47
|
+
'This can be a data adapter config for a IndexedFasta for example, which has a special way of being interpreted',
|
|
48
|
+
defaultValue: {},
|
|
49
|
+
},
|
|
50
|
+
}),
|
|
51
|
+
),
|
|
52
|
+
),
|
|
53
|
+
}),
|
|
54
|
+
}
|
|
32
55
|
}
|
package/src/utils/fetch.ts
CHANGED
|
@@ -15,9 +15,9 @@ export async function textfetch(url: string, args?: RequestInit) {
|
|
|
15
15
|
return response.text()
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
export async function jsonfetch(url: string, args?: RequestInit) {
|
|
18
|
+
export async function jsonfetch<T>(url: string, args?: RequestInit) {
|
|
19
19
|
const response = await myfetch(url, args)
|
|
20
|
-
return response.json()
|
|
20
|
+
return response.json() as Promise<T>
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export function timeout(time: number) {
|
package/src/utils/ncbiBlast.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { jsonfetch, textfetch, timeout } from './fetch'
|
|
2
|
-
|
|
3
|
-
export const BLAST_URL = `https://blast.ncbi.nlm.nih.gov/blast/Blast.cgi`
|
|
2
|
+
import { BlastResults } from './types'
|
|
4
3
|
|
|
5
4
|
export async function queryBlast({
|
|
6
5
|
query,
|
|
7
6
|
blastDatabase,
|
|
8
7
|
blastProgram,
|
|
8
|
+
baseUrl,
|
|
9
9
|
onProgress,
|
|
10
10
|
onRid,
|
|
11
11
|
}: {
|
|
12
12
|
query: string
|
|
13
13
|
blastDatabase: string
|
|
14
14
|
blastProgram: string
|
|
15
|
+
baseUrl: string
|
|
15
16
|
onProgress: (arg: string) => void
|
|
16
17
|
onRid: (arg: string) => void
|
|
17
18
|
}) {
|
|
@@ -20,25 +21,17 @@ export async function queryBlast({
|
|
|
20
21
|
query,
|
|
21
22
|
blastDatabase,
|
|
22
23
|
blastProgram,
|
|
24
|
+
baseUrl,
|
|
23
25
|
})
|
|
24
26
|
onRid(rid)
|
|
25
|
-
await waitForRid({
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
hits: {
|
|
34
|
-
description: { accession: string; id: string; sciname: string }[]
|
|
35
|
-
hsps: { hseq: string }[]
|
|
36
|
-
}[]
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}[]
|
|
41
|
-
}
|
|
27
|
+
await waitForRid({
|
|
28
|
+
rid,
|
|
29
|
+
onProgress,
|
|
30
|
+
baseUrl,
|
|
31
|
+
})
|
|
32
|
+
const ret = await jsonfetch<BlastResults>(
|
|
33
|
+
`${baseUrl}?CMD=Get&RID=${rid}&FORMAT_TYPE=JSON2_S&FORMAT_OBJECT=Alignment`,
|
|
34
|
+
)
|
|
42
35
|
return {
|
|
43
36
|
rid,
|
|
44
37
|
hits: ret.BlastOutput2[0]?.report.results.search.hits ?? [],
|
|
@@ -49,16 +42,18 @@ async function initialQuery({
|
|
|
49
42
|
query,
|
|
50
43
|
blastProgram,
|
|
51
44
|
blastDatabase,
|
|
45
|
+
baseUrl,
|
|
52
46
|
}: {
|
|
53
47
|
query: string
|
|
54
48
|
blastProgram: string
|
|
55
49
|
blastDatabase: string
|
|
50
|
+
baseUrl: string
|
|
56
51
|
}) {
|
|
57
|
-
const res = await textfetch(
|
|
52
|
+
const res = await textfetch(baseUrl, {
|
|
58
53
|
method: 'POST',
|
|
59
54
|
body: new URLSearchParams({
|
|
60
55
|
CMD: 'Put',
|
|
61
|
-
PROGRAM: blastProgram,
|
|
56
|
+
PROGRAM: blastProgram === 'quick-blastp' ? 'blastp' : blastProgram,
|
|
62
57
|
DATABASE: blastDatabase,
|
|
63
58
|
QUERY: query,
|
|
64
59
|
...(blastDatabase === 'nr_clustered_seq'
|
|
@@ -67,6 +62,9 @@ async function initialQuery({
|
|
|
67
62
|
DB_TYPE: 'Experimental Databases',
|
|
68
63
|
}
|
|
69
64
|
: {}),
|
|
65
|
+
...(blastProgram === 'quick-blastp'
|
|
66
|
+
? { BLAST_PROGRAMS: 'kmerBlastp' }
|
|
67
|
+
: {}),
|
|
70
68
|
}),
|
|
71
69
|
})
|
|
72
70
|
|
|
@@ -79,15 +77,20 @@ async function initialQuery({
|
|
|
79
77
|
if (!rid) {
|
|
80
78
|
throw new Error('Failed to get RID from BLAST request')
|
|
81
79
|
}
|
|
82
|
-
return {
|
|
80
|
+
return {
|
|
81
|
+
rid,
|
|
82
|
+
rtoe,
|
|
83
|
+
}
|
|
83
84
|
}
|
|
84
85
|
|
|
85
86
|
async function waitForRid({
|
|
86
87
|
rid,
|
|
87
88
|
onProgress,
|
|
89
|
+
baseUrl,
|
|
88
90
|
}: {
|
|
89
91
|
rid: string
|
|
90
92
|
onProgress: (arg: string) => void
|
|
93
|
+
baseUrl: string
|
|
91
94
|
}) {
|
|
92
95
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
93
96
|
while (true) {
|
|
@@ -98,16 +101,23 @@ async function waitForRid({
|
|
|
98
101
|
}
|
|
99
102
|
|
|
100
103
|
const res = await textfetch(
|
|
101
|
-
`${
|
|
104
|
+
`${baseUrl}?CMD=Get&FORMAT_OBJECT=SearchInfo&RID=${rid}`,
|
|
102
105
|
)
|
|
103
|
-
|
|
106
|
+
const isWaiting = /\s+Status=WAITING/m.test(res)
|
|
107
|
+
const isFailed = /\s+Status=FAILED/m.test(res)
|
|
108
|
+
const isReady = /\s+Status=READY/m.test(res)
|
|
109
|
+
const hasHits = /\s+ThereAreHits=yes/m.test(res)
|
|
110
|
+
|
|
111
|
+
if (isWaiting) {
|
|
104
112
|
continue
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
)
|
|
109
|
-
}
|
|
110
|
-
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if (isFailed) {
|
|
116
|
+
throw new Error(`BLAST ${rid} failed`)
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (isReady) {
|
|
120
|
+
if (hasHits) {
|
|
111
121
|
return true
|
|
112
122
|
} else {
|
|
113
123
|
throw new Error('No hits found')
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { ErrorMessage } from '@jbrowse/core/ui';
|
|
3
|
-
import { getContainingView, } from '@jbrowse/core/util';
|
|
4
|
-
import { Button, DialogActions, DialogContent, MenuItem } from '@mui/material';
|
|
5
|
-
import { observer } from 'mobx-react';
|
|
6
|
-
import { makeStyles } from 'tss-react/mui';
|
|
7
|
-
import { getProteinSequence } from './calculateProteinSequence';
|
|
8
|
-
import { ncbiBlastLaunchView } from './ncbiBlastLaunchView';
|
|
9
|
-
import { useFeatureSequence } from './useFeatureSequence';
|
|
10
|
-
import TextField2 from '../../../TextField2';
|
|
11
|
-
import { getGeneDisplayName, getId, getTranscriptDisplayName, getTranscriptFeatures, } from '../../util';
|
|
12
|
-
const useStyles = makeStyles()({
|
|
13
|
-
dialogContent: {
|
|
14
|
-
width: '80em',
|
|
15
|
-
},
|
|
16
|
-
textAreaFont: {
|
|
17
|
-
fontFamily: 'Courier New',
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
const NcbiBlastPanel = observer(function NcbiBlastPanel2({ handleClose, feature, model, }) {
|
|
21
|
-
const { classes } = useStyles();
|
|
22
|
-
const view = getContainingView(model);
|
|
23
|
-
const [blastDatabase, setBlastDatabase] = useState('nr');
|
|
24
|
-
const [msaAlgorithm, setMsaAlgorithm] = useState('clustalo');
|
|
25
|
-
const options = getTranscriptFeatures(feature);
|
|
26
|
-
const [userSelection, setUserSelection] = useState(getId(options[0]));
|
|
27
|
-
const selectedTranscript = options.find(val => getId(val) === userSelection);
|
|
28
|
-
const { sequence, error } = useFeatureSequence({
|
|
29
|
-
view,
|
|
30
|
-
feature: selectedTranscript,
|
|
31
|
-
});
|
|
32
|
-
const proteinSequence = sequence && !('error' in sequence)
|
|
33
|
-
? getProteinSequence({
|
|
34
|
-
seq: sequence.seq,
|
|
35
|
-
selectedTranscript,
|
|
36
|
-
})
|
|
37
|
-
: '';
|
|
38
|
-
const blastDatabaseOptions = ['nr', 'nr_cluster_seq'];
|
|
39
|
-
const msaAlgorithms = ['clustalo', 'muscle', 'kalign', 'mafft'];
|
|
40
|
-
return (React.createElement(DialogContent, { className: classes.dialogContent },
|
|
41
|
-
error ? React.createElement(ErrorMessage, { error: error }) : null,
|
|
42
|
-
React.createElement(TextField2, { value: blastDatabase, onChange: event => {
|
|
43
|
-
setBlastDatabase(event.target.value);
|
|
44
|
-
}, label: "BLAST blastDatabase", select: true }, blastDatabaseOptions.map(val => (React.createElement(MenuItem, { value: val, key: val }, val)))),
|
|
45
|
-
React.createElement(TextField2, { value: msaAlgorithm, onChange: event => {
|
|
46
|
-
setMsaAlgorithm(event.target.value);
|
|
47
|
-
}, label: "MSA Algorithm", select: true }, msaAlgorithms.map(val => (React.createElement(MenuItem, { value: val, key: val }, val)))),
|
|
48
|
-
React.createElement(TextField2, { value: userSelection, onChange: event => {
|
|
49
|
-
setUserSelection(event.target.value);
|
|
50
|
-
}, label: "Choose isoform to BLAST", select: true }, options.map(val => (React.createElement(MenuItem, { value: getId(val), key: val.id() },
|
|
51
|
-
getGeneDisplayName(feature),
|
|
52
|
-
" - ",
|
|
53
|
-
getTranscriptDisplayName(val))))),
|
|
54
|
-
React.createElement(TextField2, { variant: "outlined", multiline: true, minRows: 5, maxRows: 10, fullWidth: true, value: proteinSequence
|
|
55
|
-
? `>${getTranscriptDisplayName(selectedTranscript)}\n${proteinSequence}`
|
|
56
|
-
: 'Loading...', slotProps: {
|
|
57
|
-
input: {
|
|
58
|
-
readOnly: true,
|
|
59
|
-
classes: {
|
|
60
|
-
input: classes.textAreaFont,
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
} }),
|
|
64
|
-
React.createElement(DialogActions, null,
|
|
65
|
-
React.createElement(Button, { color: "primary", variant: "contained", onClick: () => {
|
|
66
|
-
const newView = ncbiBlastLaunchView({
|
|
67
|
-
feature: selectedTranscript,
|
|
68
|
-
view,
|
|
69
|
-
newViewTitle: `NCBI BLAST - ${getGeneDisplayName(feature)} - ${getTranscriptDisplayName(selectedTranscript)} - ${msaAlgorithm}`,
|
|
70
|
-
});
|
|
71
|
-
newView.setBlastParams({
|
|
72
|
-
blastProgram: 'blastp',
|
|
73
|
-
blastDatabase,
|
|
74
|
-
msaAlgorithm,
|
|
75
|
-
selectedTranscript,
|
|
76
|
-
proteinSequence,
|
|
77
|
-
});
|
|
78
|
-
handleClose();
|
|
79
|
-
}, disabled: !proteinSequence }, "Submit"),
|
|
80
|
-
React.createElement(Button, { color: "secondary", variant: "contained", onClick: () => {
|
|
81
|
-
handleClose();
|
|
82
|
-
} }, "Cancel"))));
|
|
83
|
-
});
|
|
84
|
-
export default NcbiBlastPanel;
|
|
85
|
-
//# sourceMappingURL=NcbiBlastPanel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NcbiBlastPanel.js","sourceRoot":"","sources":["../../../../src/LaunchMsaView/components/NewNCBIBlastQuery/NcbiBlastPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEvC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAGL,iBAAiB,GAClB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,UAAU,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EACL,kBAAkB,EAClB,KAAK,EACL,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,YAAY,CAAA;AAInB,MAAM,SAAS,GAAG,UAAU,EAAE,CAAC;IAC7B,aAAa,EAAE;QACb,KAAK,EAAE,MAAM;KACd;IACD,YAAY,EAAE;QACZ,UAAU,EAAE,aAAa;KAC1B;CACF,CAAC,CAAA;AAEF,MAAM,cAAc,GAAG,QAAQ,CAAC,SAAS,eAAe,CAAC,EACvD,WAAW,EACX,OAAO,EACP,KAAK,GAKN;IACC,MAAM,EAAE,OAAO,EAAE,GAAG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C,CAAC,IAAI,wBAAwB,CAAC,kBAAkB,CAAC,KAAK,eAAe,EAAE;gBACxE,CAAC,CAAC,YAAY,EAElB,SAAS,EAAE;gBACT,KAAK,EAAE;oBACL,QAAQ,EAAE,IAAI;oBACd,OAAO,EAAE;wBACP,KAAK,EAAE,OAAO,CAAC,YAAY;qBAC5B;iBACF;aACF,GACD;QAEF,oBAAC,aAAa;YACZ,oBAAC,MAAM,IACL,KAAK,EAAC,SAAS,EACf,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,GAAG,EAAE;oBACZ,MAAM,OAAO,GAAG,mBAAmB,CAAC;wBAClC,OAAO,EAAE,kBAAkB;wBAC3B,IAAI;wBACJ,YAAY,EAAE,gBAAgB,kBAAkB,CAAC,OAAO,CAAC,MAAM,wBAAwB,CAAC,kBAAkB,CAAC,MAAM,YAAY,EAAE;qBAChI,CAAC,CAAA;oBACF,OAAO,CAAC,cAAc,CAAC;wBACrB,YAAY,EAAE,QAAQ;wBACtB,aAAa;wBACb,YAAY;wBACZ,kBAAkB;wBAClB,eAAe;qBAChB,CAAC,CAAA;oBACF,WAAW,EAAE,CAAA;gBACf,CAAC,EACD,QAAQ,EAAE,CAAC,eAAe,aAGnB;YACT,oBAAC,MAAM,IACL,KAAK,EAAC,WAAW,EACjB,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,GAAG,EAAE;oBACZ,WAAW,EAAE,CAAA;gBACf,CAAC,aAGM,CACK,CACF,CACjB,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,eAAe,cAAc,CAAA"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Feature } from '@jbrowse/core/util';
|
|
2
|
-
export interface Feat {
|
|
3
|
-
start: number;
|
|
4
|
-
end: number;
|
|
5
|
-
type: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function stitch(subfeats: Feat[], sequence: string): string;
|
|
8
|
-
export declare function calculateProteinSequence({ cds, sequence, codonTable, }: {
|
|
9
|
-
cds: Feat[];
|
|
10
|
-
sequence: string;
|
|
11
|
-
codonTable: Record<string, string>;
|
|
12
|
-
}): string;
|
|
13
|
-
export declare function revlist(list: {
|
|
14
|
-
start: number;
|
|
15
|
-
end: number;
|
|
16
|
-
type: string;
|
|
17
|
-
}[], seqlen: number): {
|
|
18
|
-
start: number;
|
|
19
|
-
end: number;
|
|
20
|
-
type: string;
|
|
21
|
-
}[];
|
|
22
|
-
export declare function dedupe(list: Feat[]): Feat[];
|
|
23
|
-
export declare function getProteinSequence({ selectedTranscript, seq, }: {
|
|
24
|
-
seq: string;
|
|
25
|
-
selectedTranscript: Feature;
|
|
26
|
-
}): string;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { defaultCodonTable, generateCodonTable, revcom, } from '@jbrowse/core/util';
|
|
2
|
-
export function stitch(subfeats, sequence) {
|
|
3
|
-
return subfeats.map(sub => sequence.slice(sub.start, sub.end)).join('');
|
|
4
|
-
}
|
|
5
|
-
export function calculateProteinSequence({ cds, sequence, codonTable, }) {
|
|
6
|
-
const str = stitch(cds, sequence);
|
|
7
|
-
let protein = '';
|
|
8
|
-
for (let i = 0; i < str.length; i += 3) {
|
|
9
|
-
// use & symbol for undefined codon, or partial slice
|
|
10
|
-
protein += codonTable[str.slice(i, i + 3)] ?? '&';
|
|
11
|
-
}
|
|
12
|
-
return protein;
|
|
13
|
-
}
|
|
14
|
-
export function revlist(list, seqlen) {
|
|
15
|
-
return list
|
|
16
|
-
.map(sub => ({
|
|
17
|
-
...sub,
|
|
18
|
-
start: seqlen - sub.end,
|
|
19
|
-
end: seqlen - sub.start,
|
|
20
|
-
}))
|
|
21
|
-
.sort((a, b) => a.start - b.start);
|
|
22
|
-
}
|
|
23
|
-
// filter items if they have the same "ID" or location
|
|
24
|
-
function getItemId(feat) {
|
|
25
|
-
return `${feat.start}-${feat.end}`;
|
|
26
|
-
}
|
|
27
|
-
// filters if successive elements share same start/end
|
|
28
|
-
export function dedupe(list) {
|
|
29
|
-
return list.filter((item, pos, ary) => !pos || getItemId(item) !== getItemId(ary[pos - 1]));
|
|
30
|
-
}
|
|
31
|
-
export function getProteinSequence({ selectedTranscript, seq, }) {
|
|
32
|
-
// @ts-expect-error
|
|
33
|
-
const f = selectedTranscript.toJSON();
|
|
34
|
-
const cds = dedupe(f.subfeatures
|
|
35
|
-
.sort((a, b) => a.start - b.start)
|
|
36
|
-
.map(sub => ({
|
|
37
|
-
...sub,
|
|
38
|
-
start: sub.start - f.start,
|
|
39
|
-
end: sub.end - f.start,
|
|
40
|
-
}))
|
|
41
|
-
.filter(f => f.type === 'CDS'));
|
|
42
|
-
return calculateProteinSequence({
|
|
43
|
-
cds: f.strand === -1 ? revlist(cds, seq.length) : cds,
|
|
44
|
-
sequence: f.strand === -1 ? revcom(seq) : seq,
|
|
45
|
-
codonTable: generateCodonTable(defaultCodonTable),
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=calculateProteinSequence.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calculateProteinSequence.js","sourceRoot":"","sources":["../../../../src/LaunchMsaView/components/NewNCBIBlastQuery/calculateProteinSequence.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EACjB,kBAAkB,EAClB,MAAM,GACP,MAAM,oBAAoB,CAAA;AAQ3B,MAAM,UAAU,MAAM,CAAC,QAAgB,EAAE,QAAgB;IACvD,OAAO,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACzE,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,EACvC,GAAG,EACH,QAAQ,EACR,UAAU,GAKX;IACC,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;IACjC,IAAI,OAAO,GAAG,EAAE,CAAA;IACh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ACV,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;SACjC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACX,GAAG,GAAG;QACN,KAAK,EAAE,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK;QAC1B,GAAG,EAAE,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,KAAK;KACvB,CAAC,CAAC;SACF,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,KAAK,CAAC,CACjC,CAAA;IAED,OAAO,wBAAwB,CAAC;QAC9B,GAAG,EAAE,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG;QACrD,QAAQ,EAAE,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG;QAC7C,UAAU,EAAE,kBAAkB,CAAC,iBAAiB,CAAC;KAClD,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './NcbiBlastPanel';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/LaunchMsaView/components/NewNCBIBlastQuery/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ncbiBlastLaunchView.js","sourceRoot":"","sources":["../../../../src/LaunchMsaView/components/NewNCBIBlastQuery/ncbiBlastLaunchView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAKxD,MAAM,UAAU,mBAAmB,CAAC,EAClC,YAAY,EACZ,IAAI,EACJ,OAAO,GAKR;IACC,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE;QACzC,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,YAAY;QACzB,eAAe,EAAE,IAAI,CAAC,EAAE;QACxB,gBAAgB,EAAE,OAAO,CAAC,MAAM,EAAE;QAClC,aAAa,EAAE,GAAG;QAClB,SAAS,EAAE,GAAG;QACd,eAAe,EAAE,IAAI;QACrB,gBAAgB,EAAE,IAAI;QACtB,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,EAAE;QACb,eAAe,EAAE,0BAA0B;KAC5C,CAA8B,CAAA;AACjC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useFeatureSequence.js","sourceRoot":"","sources":["../../../../src/LaunchMsaView/components/NewNCBIBlastQuery/useFeatureSequence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAE3C,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAA;AACrD,OAAO,EAAiC,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAW9E,MAAM,OAAO,GAAG,OAAO,CAAA;AAEvB,KAAK,UAAU,QAAQ,CAAC,EACtB,KAAK,EACL,GAAG,EACH,OAAO,EACP,OAAO,EACP,YAAY,GAOb;IACC,MAAM,EAAE,eAAe,EAAE,UAAU,EAAE,GAAG,OAAO,CAAA;IAC/C,MAAM,QAAQ,GAAG,MAAM,eAAe,CAAC,eAAe,CAAC,YAAY,CAAC,CAAA;IACpE,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAA;IACvC,CAAC;IACD,MAAM,SAAS,GAAG,aAAa,CAAA;IAC/B,MAAM,KAAK,GAAG,CAAC,MAAM,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,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,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAA;AAC3D,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,CAAS;IAC7B,OAAO,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;AAC3B,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Box } from '@mui/material';
|
|
3
|
-
export default function CustomTabPanel(props) {
|
|
4
|
-
const { children, value, index, ...other } = props;
|
|
5
|
-
return (React.createElement("div", { role: "tabpanel", hidden: value !== index, id: `gtabpanel-${index}`, "aria-labelledby": `gtab-${index}`, ...other }, value === index && React.createElement(Box, { sx: { p: 3 } }, children)));
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=TabUtils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TabUtils.js","sourceRoot":"","sources":["../../../src/LaunchMsaView/components/TabUtils.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAA;AAQnC,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAoB;IACzD,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,KAAK,CAAA;IAElD,OAAO,CACL,6BACE,IAAI,EAAC,UAAU,EACf,MAAM,EAAE,KAAK,KAAK,KAAK,EACvB,EAAE,EAAE,aAAa,KAAK,EAAE,qBACP,QAAQ,KAAK,EAAE,KAC5B,KAAK,IAER,KAAK,KAAK,KAAK,IAAI,oBAAC,GAAG,IAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,IAAG,QAAQ,CAAO,CACnD,CACP,CAAA;AACH,CAAC"}
|