jbrowse-plugin-msaview 2.0.6 → 2.1.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/LaunchMsaView/components/EnsemblGeneTree/EnsemblGeneTree.d.ts +8 -0
- package/dist/LaunchMsaView/components/EnsemblGeneTree/EnsemblGeneTree.js +81 -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 +18 -0
- package/dist/LaunchMsaView/components/EnsemblGeneTree/ensemblGeneTreeLaunchView.js.map +1 -0
- package/dist/LaunchMsaView/components/EnsemblGeneTree/ensemblGeneTreeUtils.d.ts +5 -0
- package/dist/LaunchMsaView/components/EnsemblGeneTree/ensemblGeneTreeUtils.js +35 -0
- package/dist/LaunchMsaView/components/EnsemblGeneTree/ensemblGeneTreeUtils.js.map +1 -0
- package/dist/LaunchMsaView/components/EnsemblGeneTree/fetchGeneList.d.ts +1 -0
- package/dist/LaunchMsaView/components/EnsemblGeneTree/fetchGeneList.js +12 -0
- package/dist/LaunchMsaView/components/EnsemblGeneTree/fetchGeneList.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 +20 -14
- package/dist/LaunchMsaView/components/LaunchMsaViewDialog.js.map +1 -1
- package/dist/LaunchMsaView/components/MSALoader/MSALoader.d.ts +8 -0
- package/dist/LaunchMsaView/components/MSALoader/MSALoader.js +94 -0
- package/dist/LaunchMsaView/components/MSALoader/MSALoader.js.map +1 -0
- package/dist/LaunchMsaView/components/MSALoader/fetchGeneList.d.ts +1 -0
- package/dist/LaunchMsaView/components/MSALoader/fetchGeneList.js +12 -0
- package/dist/LaunchMsaView/components/MSALoader/fetchGeneList.js.map +1 -0
- package/dist/LaunchMsaView/components/MSALoader/preCalculatedLaunchView.d.ts +9 -0
- package/dist/LaunchMsaView/components/MSALoader/preCalculatedLaunchView.js +36 -0
- package/dist/LaunchMsaView/components/MSALoader/preCalculatedLaunchView.js.map +1 -0
- package/dist/LaunchMsaView/components/NewNCBIBlastQuery/calculateProteinSequence.d.ts +4 -12
- package/dist/LaunchMsaView/components/NewNCBIBlastQuery/calculateProteinSequence.js +2 -3
- package/dist/LaunchMsaView/components/NewNCBIBlastQuery/calculateProteinSequence.js.map +1 -1
- package/dist/LaunchMsaView/components/NewNCBIBlastQuery/fetchSeq.d.ts +8 -0
- package/dist/LaunchMsaView/components/NewNCBIBlastQuery/fetchSeq.js +23 -0
- package/dist/LaunchMsaView/components/NewNCBIBlastQuery/fetchSeq.js.map +1 -0
- package/dist/LaunchMsaView/components/NewNCBIBlastQuery/types.d.ts +10 -0
- package/dist/LaunchMsaView/components/NewNCBIBlastQuery/types.js +2 -0
- package/dist/LaunchMsaView/components/NewNCBIBlastQuery/types.js.map +1 -0
- package/dist/LaunchMsaView/components/NewNCBIBlastQuery/useFeatureSequence.d.ts +2 -6
- package/dist/LaunchMsaView/components/NewNCBIBlastQuery/useFeatureSequence.js +1 -22
- package/dist/LaunchMsaView/components/NewNCBIBlastQuery/useFeatureSequence.js.map +1 -1
- package/dist/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.js +8 -10
- 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/MsaViewPanel/model.d.ts +12 -8
- package/dist/jbrowse-plugin-msaview.umd.production.min.js +52 -40
- package/dist/jbrowse-plugin-msaview.umd.production.min.js.map +4 -4
- package/package.json +1 -1
- package/src/LaunchMsaView/components/EnsemblGeneTree/EnsemblGeneTree.tsx +143 -0
- package/src/LaunchMsaView/components/EnsemblGeneTree/ensemblGeneTreeLaunchView.ts +36 -0
- package/src/LaunchMsaView/components/EnsemblGeneTree/ensemblGeneTreeUtils.ts +81 -0
- package/src/LaunchMsaView/components/EnsemblGeneTree/fetchGeneList.ts +13 -0
- package/src/LaunchMsaView/components/EnsemblGeneTree/util.ts +45 -0
- package/src/LaunchMsaView/components/LaunchMsaViewDialog.tsx +30 -19
- package/src/LaunchMsaView/components/MSALoader/MSALoader.tsx +130 -0
- package/src/LaunchMsaView/components/MSALoader/fetchGeneList.ts +13 -0
- package/src/LaunchMsaView/components/MSALoader/preCalculatedLaunchView.ts +55 -0
- package/src/LaunchMsaView/components/NewNCBIBlastQuery/calculateProteinSequence.ts +6 -20
- package/src/LaunchMsaView/components/NewNCBIBlastQuery/fetchSeq.ts +37 -0
- package/src/LaunchMsaView/components/NewNCBIBlastQuery/types.ts +11 -0
- package/src/LaunchMsaView/components/NewNCBIBlastQuery/useFeatureSequence.ts +5 -41
- package/src/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.tsx +10 -16
- package/src/LaunchMsaView/components/TabPanel.tsx +19 -0
- 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/src/LaunchMsaView/components/TabUtils.tsx +0 -25
- package/src/LaunchMsaView/components/tabUtil.ts +0 -6
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { getConf } from '@jbrowse/core/configuration'
|
|
2
|
+
|
|
3
|
+
import type { AbstractSessionModel, Feature } from '@jbrowse/core/util'
|
|
4
|
+
|
|
5
|
+
export async function fetchSeq({
|
|
6
|
+
start,
|
|
7
|
+
end,
|
|
8
|
+
refName,
|
|
9
|
+
session,
|
|
10
|
+
assemblyName,
|
|
11
|
+
}: {
|
|
12
|
+
start: number
|
|
13
|
+
end: number
|
|
14
|
+
refName: string
|
|
15
|
+
assemblyName: string
|
|
16
|
+
session: AbstractSessionModel
|
|
17
|
+
}) {
|
|
18
|
+
const { assemblyManager, rpcManager } = session
|
|
19
|
+
const assembly = await assemblyManager.waitForAssembly(assemblyName)
|
|
20
|
+
if (!assembly) {
|
|
21
|
+
throw new Error('assembly not found')
|
|
22
|
+
}
|
|
23
|
+
const sessionId = 'getSequence'
|
|
24
|
+
const feats = (await rpcManager.call(sessionId, 'CoreGetFeatures', {
|
|
25
|
+
adapterConfig: getConf(assembly, ['sequence', 'adapter']),
|
|
26
|
+
sessionId,
|
|
27
|
+
regions: [
|
|
28
|
+
{
|
|
29
|
+
start,
|
|
30
|
+
end,
|
|
31
|
+
refName: assembly.getCanonicalRefName(refName),
|
|
32
|
+
assemblyName,
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
})) as Feature[]
|
|
36
|
+
return (feats[0]?.get('seq') as string | undefined) ?? ''
|
|
37
|
+
}
|
|
@@ -1,53 +1,17 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react'
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { AbstractSessionModel, Feature, getSession } from '@jbrowse/core/util'
|
|
3
|
+
import { getSession } from '@jbrowse/core/util'
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
5
|
+
import { fetchSeq } from './fetchSeq'
|
|
6
|
+
|
|
7
|
+
import type { Feature } from '@jbrowse/core/util'
|
|
8
|
+
import type { SeqState } from './types'
|
|
11
9
|
|
|
12
10
|
export interface ErrorState {
|
|
13
11
|
error: string
|
|
14
12
|
}
|
|
15
13
|
const BPLIMIT = 500_000
|
|
16
14
|
|
|
17
|
-
async function fetchSeq({
|
|
18
|
-
start,
|
|
19
|
-
end,
|
|
20
|
-
refName,
|
|
21
|
-
session,
|
|
22
|
-
assemblyName,
|
|
23
|
-
}: {
|
|
24
|
-
start: number
|
|
25
|
-
end: number
|
|
26
|
-
refName: string
|
|
27
|
-
assemblyName: string
|
|
28
|
-
session: AbstractSessionModel
|
|
29
|
-
}) {
|
|
30
|
-
const { assemblyManager, rpcManager } = session
|
|
31
|
-
const assembly = await assemblyManager.waitForAssembly(assemblyName)
|
|
32
|
-
if (!assembly) {
|
|
33
|
-
throw new Error('assembly not found')
|
|
34
|
-
}
|
|
35
|
-
const sessionId = 'getSequence'
|
|
36
|
-
const feats = (await rpcManager.call(sessionId, 'CoreGetFeatures', {
|
|
37
|
-
adapterConfig: getConf(assembly, ['sequence', 'adapter']),
|
|
38
|
-
sessionId,
|
|
39
|
-
regions: [
|
|
40
|
-
{
|
|
41
|
-
start,
|
|
42
|
-
end,
|
|
43
|
-
refName: assembly.getCanonicalRefName(refName),
|
|
44
|
-
assemblyName,
|
|
45
|
-
},
|
|
46
|
-
],
|
|
47
|
-
})) as Feature[]
|
|
48
|
-
return (feats[0]?.get('seq') as string | undefined) ?? ''
|
|
49
|
-
}
|
|
50
|
-
|
|
51
15
|
export function useFeatureSequence({
|
|
52
16
|
view,
|
|
53
17
|
feature,
|
|
@@ -83,30 +83,24 @@ const PreLoadedMSA = observer(function PreLoadedMSA2({
|
|
|
83
83
|
</Typography>
|
|
84
84
|
{error ? <ErrorMessage error={error} /> : null}
|
|
85
85
|
{geneNameList && !ret ? (
|
|
86
|
-
<
|
|
86
|
+
<Typography color="error">No MSA data for this gene found</Typography>
|
|
87
87
|
) : null}
|
|
88
88
|
<TextField
|
|
89
|
+
select
|
|
90
|
+
label="Choose isoform to view MSA for"
|
|
89
91
|
value={userSelection}
|
|
90
92
|
onChange={event => {
|
|
91
93
|
setUserSelection(event.target.value)
|
|
92
94
|
}}
|
|
93
|
-
label="Choose isoform to view MSA for"
|
|
94
|
-
select
|
|
95
95
|
>
|
|
96
|
-
{options
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
<MenuItem value={getId(val)} key={val.id()}>
|
|
100
|
-
{getTranscriptDisplayName(val)} (has data)
|
|
101
|
-
</MenuItem>
|
|
102
|
-
))}
|
|
103
|
-
{options
|
|
104
|
-
.filter(val => !set.has(getId(val)))
|
|
105
|
-
.map(val => (
|
|
106
|
-
<MenuItem value={getId(val)} key={val.id()} disabled>
|
|
107
|
-
{getTranscriptDisplayName(val)}
|
|
96
|
+
{options.map(val => {
|
|
97
|
+
const inSet = set.has(getId(val))
|
|
98
|
+
return (
|
|
99
|
+
<MenuItem value={getId(val)} key={val.id()} disabled={!inSet}>
|
|
100
|
+
{getTranscriptDisplayName(val)} {inSet ? ' (has data)' : ''}
|
|
108
101
|
</MenuItem>
|
|
109
|
-
)
|
|
102
|
+
)
|
|
103
|
+
})}
|
|
110
104
|
</TextField>
|
|
111
105
|
</DialogContent>
|
|
112
106
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
|
|
3
|
+
// this is from MUI example
|
|
4
|
+
export default function TabPanel({
|
|
5
|
+
children,
|
|
6
|
+
value,
|
|
7
|
+
index,
|
|
8
|
+
...other
|
|
9
|
+
}: {
|
|
10
|
+
children?: React.ReactNode
|
|
11
|
+
index: number
|
|
12
|
+
value: number
|
|
13
|
+
}) {
|
|
14
|
+
return (
|
|
15
|
+
<div role="tabpanel" hidden={value !== index} {...other}>
|
|
16
|
+
{value === index && <div>{children}</div>}
|
|
17
|
+
</div>
|
|
18
|
+
)
|
|
19
|
+
}
|
|
@@ -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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tabUtil.js","sourceRoot":"","sources":["../../../src/LaunchMsaView/components/tabUtil.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,SAAS,CAAC,KAAa;IACrC,OAAO;QACL,EAAE,EAAE,QAAQ,KAAK,EAAE;QACnB,eAAe,EAAE,aAAa,KAAK,EAAE;KACtC,CAAA;AACH,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
import { Box } from '@mui/material'
|
|
4
|
-
|
|
5
|
-
interface TabPanelProps {
|
|
6
|
-
children?: React.ReactNode
|
|
7
|
-
index: number
|
|
8
|
-
value: number
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export default function CustomTabPanel(props: TabPanelProps) {
|
|
12
|
-
const { children, value, index, ...other } = props
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<div
|
|
16
|
-
role="tabpanel"
|
|
17
|
-
hidden={value !== index}
|
|
18
|
-
id={`gtabpanel-${index}`}
|
|
19
|
-
aria-labelledby={`gtab-${index}`}
|
|
20
|
-
{...other}
|
|
21
|
-
>
|
|
22
|
-
{value === index && <Box sx={{ p: 3 }}>{children}</Box>}
|
|
23
|
-
</div>
|
|
24
|
-
)
|
|
25
|
-
}
|