jbrowse-plugin-msaview 2.0.5 → 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/AddHighlightModel/GenomeMouseoverHighlight.d.ts +1 -1
- package/dist/AddHighlightModel/GenomeMouseoverHighlight.js.map +1 -1
- package/dist/AddHighlightModel/HighlightComponents.d.ts +1 -1
- package/dist/AddHighlightModel/HighlightComponents.js +0 -1
- package/dist/AddHighlightModel/HighlightComponents.js.map +1 -1
- package/dist/AddHighlightModel/MsaToGenomeHighlight.d.ts +1 -1
- package/dist/AddHighlightModel/MsaToGenomeHighlight.js +0 -1
- package/dist/AddHighlightModel/MsaToGenomeHighlight.js.map +1 -1
- package/dist/AddHighlightModel/index.js +0 -1
- package/dist/AddHighlightModel/index.js.map +1 -1
- 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 -15
- 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/NcbiBlastPanel.js +6 -5
- package/dist/LaunchMsaView/components/NewNCBIBlastQuery/NcbiBlastPanel.js.map +1 -1
- 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/ncbiBlastLaunchView.d.ts +2 -2
- package/dist/LaunchMsaView/components/NewNCBIBlastQuery/ncbiBlastLaunchView.js.map +1 -1
- 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 -11
- package/dist/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.js.map +1 -1
- package/dist/LaunchMsaView/components/PreLoadedMSA/preCalculatedLaunchView.d.ts +1 -1
- package/dist/LaunchMsaView/components/PreLoadedMSA/preCalculatedLaunchView.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/index.js +0 -2
- package/dist/LaunchMsaView/index.js.map +1 -1
- package/dist/LaunchMsaView/util.js +2 -2
- package/dist/MsaViewPanel/components/LoadingBLAST.js +0 -1
- package/dist/MsaViewPanel/components/LoadingBLAST.js.map +1 -1
- package/dist/MsaViewPanel/components/MsaViewPanel.js.map +1 -1
- package/dist/MsaViewPanel/components/RIDLink.js +0 -1
- package/dist/MsaViewPanel/components/RIDLink.js.map +1 -1
- package/dist/MsaViewPanel/index.js +0 -1
- package/dist/MsaViewPanel/index.js.map +1 -1
- package/dist/MsaViewPanel/model.d.ts +24 -11
- package/dist/MsaViewPanel/model.js +9 -1
- package/dist/MsaViewPanel/model.js.map +1 -1
- package/dist/MsaViewPanel/msaCoordToGenomeCoord.js.map +1 -1
- package/dist/OpenInNewIcon.d.ts +1 -1
- package/dist/OpenInNewIcon.js.map +1 -1
- package/dist/TextField2.d.ts +1 -1
- package/dist/TextField2.js.map +1 -1
- package/dist/config.json +8 -0
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- 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 +2 -2
- package/src/AddHighlightModel/GenomeMouseoverHighlight.tsx +2 -1
- package/src/AddHighlightModel/HighlightComponents.tsx +2 -2
- package/src/AddHighlightModel/MsaToGenomeHighlight.tsx +2 -3
- package/src/AddHighlightModel/index.tsx +2 -2
- 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 -21
- 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/NcbiBlastPanel.tsx +8 -6
- package/src/LaunchMsaView/components/NewNCBIBlastQuery/calculateProteinSequence.ts +6 -20
- package/src/LaunchMsaView/components/NewNCBIBlastQuery/fetchSeq.ts +37 -0
- package/src/LaunchMsaView/components/NewNCBIBlastQuery/ncbiBlastLaunchView.ts +2 -3
- 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 +12 -18
- package/src/LaunchMsaView/components/PreLoadedMSA/preCalculatedLaunchView.ts +2 -1
- package/src/LaunchMsaView/components/TabPanel.tsx +19 -0
- package/src/LaunchMsaView/index.ts +1 -4
- package/src/LaunchMsaView/util.ts +2 -2
- package/src/MsaViewPanel/components/LoadingBLAST.tsx +0 -2
- package/src/MsaViewPanel/components/MsaViewPanel.tsx +0 -1
- package/src/MsaViewPanel/components/RIDLink.tsx +0 -1
- package/src/MsaViewPanel/index.ts +0 -1
- package/src/MsaViewPanel/model.ts +14 -4
- package/src/MsaViewPanel/msaCoordToGenomeCoord.ts +0 -1
- package/src/OpenInNewIcon.tsx +3 -1
- package/src/TextField2.tsx +3 -1
- package/src/index.ts +0 -3
- 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
|
@@ -6,12 +6,10 @@ import {
|
|
|
6
6
|
Feature,
|
|
7
7
|
getContainingView,
|
|
8
8
|
} from '@jbrowse/core/util'
|
|
9
|
-
import { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view'
|
|
10
9
|
import { Button, DialogActions, DialogContent, MenuItem } from '@mui/material'
|
|
11
10
|
import { observer } from 'mobx-react'
|
|
12
11
|
import { makeStyles } from 'tss-react/mui'
|
|
13
12
|
|
|
14
|
-
// locals
|
|
15
13
|
import { getProteinSequence } from './calculateProteinSequence'
|
|
16
14
|
import { ncbiBlastLaunchView } from './ncbiBlastLaunchView'
|
|
17
15
|
import { useFeatureSequence } from './useFeatureSequence'
|
|
@@ -23,6 +21,8 @@ import {
|
|
|
23
21
|
getTranscriptFeatures,
|
|
24
22
|
} from '../../util'
|
|
25
23
|
|
|
24
|
+
import type { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view'
|
|
25
|
+
|
|
26
26
|
const useStyles = makeStyles()({
|
|
27
27
|
dialogContent: {
|
|
28
28
|
width: '80em',
|
|
@@ -121,10 +121,12 @@ const NcbiBlastPanel = observer(function NcbiBlastPanel2({
|
|
|
121
121
|
? `>${getTranscriptDisplayName(selectedTranscript)}\n${proteinSequence}`
|
|
122
122
|
: 'Loading...'
|
|
123
123
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
124
|
+
slotProps={{
|
|
125
|
+
input: {
|
|
126
|
+
readOnly: true,
|
|
127
|
+
classes: {
|
|
128
|
+
input: classes.textAreaFont,
|
|
129
|
+
},
|
|
128
130
|
},
|
|
129
131
|
}}
|
|
130
132
|
/>
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
-
Feature,
|
|
3
2
|
defaultCodonTable,
|
|
4
3
|
generateCodonTable,
|
|
5
4
|
revcom,
|
|
6
5
|
} from '@jbrowse/core/util'
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
end: number
|
|
11
|
-
type: string
|
|
12
|
-
}
|
|
7
|
+
import type { Feat } from './types'
|
|
8
|
+
import type { Feature } from '@jbrowse/core/util'
|
|
13
9
|
|
|
14
10
|
export function stitch(subfeats: Feat[], sequence: string) {
|
|
15
11
|
return subfeats.map(sub => sequence.slice(sub.start, sub.end)).join('')
|
|
@@ -33,10 +29,7 @@ export function calculateProteinSequence({
|
|
|
33
29
|
return protein
|
|
34
30
|
}
|
|
35
31
|
|
|
36
|
-
export function revlist(
|
|
37
|
-
list: { start: number; end: number; type: string }[],
|
|
38
|
-
seqlen: number,
|
|
39
|
-
) {
|
|
32
|
+
export function revlist(list: Feat[], seqlen: number) {
|
|
40
33
|
return list
|
|
41
34
|
.map(sub => ({
|
|
42
35
|
...sub,
|
|
@@ -65,23 +58,16 @@ export function getProteinSequence({
|
|
|
65
58
|
seq: string
|
|
66
59
|
selectedTranscript: Feature
|
|
67
60
|
}) {
|
|
68
|
-
|
|
69
|
-
const f = selectedTranscript.toJSON() as {
|
|
70
|
-
start: number
|
|
71
|
-
end: number
|
|
72
|
-
strand: number
|
|
73
|
-
type: string
|
|
74
|
-
subfeatures: { start: number; end: number; type: string }[]
|
|
75
|
-
}
|
|
61
|
+
const f = selectedTranscript.toJSON()
|
|
76
62
|
const cds = dedupe(
|
|
77
63
|
f.subfeatures
|
|
78
|
-
|
|
64
|
+
?.sort((a, b) => a.start - b.start)
|
|
79
65
|
.map(sub => ({
|
|
80
66
|
...sub,
|
|
81
67
|
start: sub.start - f.start,
|
|
82
68
|
end: sub.end - f.start,
|
|
83
69
|
}))
|
|
84
|
-
.filter(f => f.type === 'CDS'),
|
|
70
|
+
.filter(f => f.type === 'CDS') || [],
|
|
85
71
|
)
|
|
86
72
|
|
|
87
73
|
return calculateProteinSequence({
|
|
@@ -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,8 +1,7 @@
|
|
|
1
1
|
import { Feature, getSession } from '@jbrowse/core/util'
|
|
2
|
-
import { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view'
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
import {
|
|
3
|
+
import type { JBrowsePluginMsaViewModel } from '../../../MsaViewPanel/model'
|
|
4
|
+
import type { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view'
|
|
6
5
|
|
|
7
6
|
export function ncbiBlastLaunchView({
|
|
8
7
|
newViewTitle,
|
|
@@ -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,
|
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
getContainingView,
|
|
8
8
|
getSession,
|
|
9
9
|
} from '@jbrowse/core/util'
|
|
10
|
-
import { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view'
|
|
11
10
|
import {
|
|
12
11
|
Button,
|
|
13
12
|
DialogActions,
|
|
@@ -19,7 +18,6 @@ import {
|
|
|
19
18
|
import { observer } from 'mobx-react'
|
|
20
19
|
import { makeStyles } from 'tss-react/mui'
|
|
21
20
|
|
|
22
|
-
// locals
|
|
23
21
|
import { fetchGeneList } from './fetchGeneList'
|
|
24
22
|
import { preCalculatedLaunchView } from './preCalculatedLaunchView'
|
|
25
23
|
import {
|
|
@@ -29,6 +27,8 @@ import {
|
|
|
29
27
|
getTranscriptFeatures,
|
|
30
28
|
} from '../../util'
|
|
31
29
|
|
|
30
|
+
import type { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view'
|
|
31
|
+
|
|
32
32
|
const useStyles = makeStyles()({
|
|
33
33
|
dialogContent: {
|
|
34
34
|
width: '80em',
|
|
@@ -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
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { AbstractSessionModel, Feature } from '@jbrowse/core/util'
|
|
2
|
-
import { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view'
|
|
3
2
|
import { ungzip } from 'pako'
|
|
4
3
|
|
|
4
|
+
import type { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view'
|
|
5
|
+
|
|
5
6
|
async function myfetch(url: string) {
|
|
6
7
|
const res = await fetch(url)
|
|
7
8
|
if (!res.ok) {
|
|
@@ -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
|
+
}
|
|
@@ -4,13 +4,10 @@ import DisplayType from '@jbrowse/core/pluggableElementTypes/DisplayType'
|
|
|
4
4
|
import { MenuItem } from '@jbrowse/core/ui'
|
|
5
5
|
import { Feature, getContainingTrack, getSession } from '@jbrowse/core/util'
|
|
6
6
|
import AddIcon from '@mui/icons-material/Add'
|
|
7
|
-
import { IAnyModelType } from 'mobx-state-tree'
|
|
8
7
|
|
|
9
|
-
// icons
|
|
10
|
-
|
|
11
|
-
// locals
|
|
12
8
|
import LaunchMsaViewDialog from './components/LaunchMsaViewDialog'
|
|
13
9
|
|
|
10
|
+
import type { IAnyModelType } from 'mobx-state-tree'
|
|
14
11
|
|
|
15
12
|
function isDisplay(elt: { name: string }): elt is DisplayType {
|
|
16
13
|
return elt.name === 'LinearBasicDisplay'
|
|
@@ -12,7 +12,7 @@ export function getTranscriptFeatures(feature: Feature) {
|
|
|
12
12
|
)
|
|
13
13
|
}
|
|
14
14
|
export function getId(val?: Feature): string {
|
|
15
|
-
return val?.get('name')
|
|
15
|
+
return val?.get('name') ?? val?.get('id') ?? ''
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export function getTranscriptDisplayName(val?: Feature) {
|
|
@@ -24,7 +24,7 @@ export function getTranscriptDisplayName(val?: Feature) {
|
|
|
24
24
|
export function getGeneDisplayName(val?: Feature) {
|
|
25
25
|
return val === undefined
|
|
26
26
|
? ''
|
|
27
|
-
: [val.get('gene_name')
|
|
27
|
+
: [val.get('gene_name') ?? val.get('name'), val.get('id')]
|
|
28
28
|
.filter(f => !!f)
|
|
29
29
|
.join(' ')
|
|
30
30
|
}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { BaseViewModel } from '@jbrowse/core/pluggableElementTypes'
|
|
2
|
-
import {
|
|
3
|
-
import { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view'
|
|
2
|
+
import { getSession } from '@jbrowse/core/util'
|
|
4
3
|
import { genomeToTranscriptSeqMapping } from 'g2p_mapper'
|
|
5
4
|
import { autorun } from 'mobx'
|
|
6
|
-
import {
|
|
5
|
+
import { addDisposer, cast, types } from 'mobx-state-tree'
|
|
7
6
|
import { MSAModelF } from 'react-msaview'
|
|
8
7
|
|
|
9
|
-
// locals
|
|
10
8
|
import { doLaunchBlast } from './doLaunchBlast'
|
|
11
9
|
import { genomeToMSA } from './genomeToMSA'
|
|
12
10
|
import { msaCoordToGenomeCoord } from './msaCoordToGenomeCoord'
|
|
13
11
|
|
|
12
|
+
import type { Feature } from '@jbrowse/core/util'
|
|
13
|
+
import type { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view'
|
|
14
|
+
import type { Instance } from 'mobx-state-tree'
|
|
14
15
|
|
|
15
16
|
type LGV = LinearGenomeViewModel
|
|
16
17
|
|
|
@@ -72,8 +73,17 @@ export default function stateModelFactory() {
|
|
|
72
73
|
)
|
|
73
74
|
|
|
74
75
|
.volatile(() => ({
|
|
76
|
+
/**
|
|
77
|
+
* #volatile
|
|
78
|
+
*/
|
|
75
79
|
rid: undefined as string | undefined,
|
|
80
|
+
/**
|
|
81
|
+
* #volatile
|
|
82
|
+
*/
|
|
76
83
|
progress: '',
|
|
84
|
+
/**
|
|
85
|
+
* #volatile
|
|
86
|
+
*/
|
|
77
87
|
error: undefined as unknown,
|
|
78
88
|
}))
|
|
79
89
|
|
package/src/OpenInNewIcon.tsx
CHANGED
package/src/TextField2.tsx
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import Plugin from '@jbrowse/core/Plugin'
|
|
2
2
|
import PluginManager from '@jbrowse/core/PluginManager'
|
|
3
3
|
import { AbstractSessionModel, isAbstractMenuManager } from '@jbrowse/core/util'
|
|
4
|
-
|
|
5
|
-
// icons
|
|
6
4
|
import GridOn from '@mui/icons-material/GridOn'
|
|
7
5
|
|
|
8
|
-
// locals
|
|
9
6
|
import { version } from '../package.json'
|
|
10
7
|
import AddHighlightModelF from './AddHighlightModel'
|
|
11
8
|
import LaunchMsaViewF from './LaunchMsaView'
|
|
@@ -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
|
-
}
|