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
|
@@ -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"}
|
package/dist/OpenInNewIcon.d.ts
DELETED
package/dist/OpenInNewIcon.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SvgIcon } from '@mui/material';
|
|
3
|
-
export default function OpenInNewIcon(props) {
|
|
4
|
-
return (React.createElement(SvgIcon, { ...props },
|
|
5
|
-
React.createElement("path", { d: "M0 0h24v24H0z", fill: "none" }),
|
|
6
|
-
React.createElement("path", { d: "M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z" })));
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=OpenInNewIcon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OpenInNewIcon.js","sourceRoot":"","sources":["../src/OpenInNewIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAIvC,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAmB;IACvD,OAAO,CACL,oBAAC,OAAO,OAAK,KAAK;QAChB,8BAAM,CAAC,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,GAAG;QACtC,8BAAM,CAAC,EAAC,oIAAoI,GAAG,CACvI,CACX,CAAA;AACH,CAAC"}
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react'
|
|
2
|
-
|
|
3
|
-
import { ErrorMessage } from '@jbrowse/core/ui'
|
|
4
|
-
import {
|
|
5
|
-
AbstractTrackModel,
|
|
6
|
-
Feature,
|
|
7
|
-
getContainingView,
|
|
8
|
-
} from '@jbrowse/core/util'
|
|
9
|
-
import { Button, DialogActions, DialogContent, MenuItem } from '@mui/material'
|
|
10
|
-
import { observer } from 'mobx-react'
|
|
11
|
-
import { makeStyles } from 'tss-react/mui'
|
|
12
|
-
|
|
13
|
-
import { getProteinSequence } from './calculateProteinSequence'
|
|
14
|
-
import { ncbiBlastLaunchView } from './ncbiBlastLaunchView'
|
|
15
|
-
import { useFeatureSequence } from './useFeatureSequence'
|
|
16
|
-
import TextField2 from '../../../TextField2'
|
|
17
|
-
import {
|
|
18
|
-
getGeneDisplayName,
|
|
19
|
-
getId,
|
|
20
|
-
getTranscriptDisplayName,
|
|
21
|
-
getTranscriptFeatures,
|
|
22
|
-
} from '../../util'
|
|
23
|
-
|
|
24
|
-
import type { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view'
|
|
25
|
-
|
|
26
|
-
const useStyles = makeStyles()({
|
|
27
|
-
dialogContent: {
|
|
28
|
-
width: '80em',
|
|
29
|
-
},
|
|
30
|
-
textAreaFont: {
|
|
31
|
-
fontFamily: 'Courier New',
|
|
32
|
-
},
|
|
33
|
-
})
|
|
34
|
-
|
|
35
|
-
const NcbiBlastPanel = observer(function NcbiBlastPanel2({
|
|
36
|
-
handleClose,
|
|
37
|
-
feature,
|
|
38
|
-
model,
|
|
39
|
-
}: {
|
|
40
|
-
model: AbstractTrackModel
|
|
41
|
-
feature: Feature
|
|
42
|
-
handleClose: () => void
|
|
43
|
-
}) {
|
|
44
|
-
const { classes } = useStyles()
|
|
45
|
-
const view = getContainingView(model) as LinearGenomeViewModel
|
|
46
|
-
const [blastDatabase, setBlastDatabase] = useState('nr')
|
|
47
|
-
const [msaAlgorithm, setMsaAlgorithm] = useState('clustalo')
|
|
48
|
-
|
|
49
|
-
const options = getTranscriptFeatures(feature)
|
|
50
|
-
const [userSelection, setUserSelection] = useState(getId(options[0]))
|
|
51
|
-
const selectedTranscript = options.find(val => getId(val) === userSelection)!
|
|
52
|
-
const { sequence, error } = useFeatureSequence({
|
|
53
|
-
view,
|
|
54
|
-
feature: selectedTranscript,
|
|
55
|
-
})
|
|
56
|
-
const proteinSequence =
|
|
57
|
-
sequence && !('error' in sequence)
|
|
58
|
-
? getProteinSequence({
|
|
59
|
-
seq: sequence.seq,
|
|
60
|
-
selectedTranscript,
|
|
61
|
-
})
|
|
62
|
-
: ''
|
|
63
|
-
|
|
64
|
-
const blastDatabaseOptions = ['nr', 'nr_cluster_seq']
|
|
65
|
-
const msaAlgorithms = ['clustalo', 'muscle', 'kalign', 'mafft']
|
|
66
|
-
return (
|
|
67
|
-
<DialogContent className={classes.dialogContent}>
|
|
68
|
-
{error ? <ErrorMessage error={error} /> : null}
|
|
69
|
-
<TextField2
|
|
70
|
-
value={blastDatabase}
|
|
71
|
-
onChange={event => {
|
|
72
|
-
setBlastDatabase(event.target.value)
|
|
73
|
-
}}
|
|
74
|
-
label="BLAST blastDatabase"
|
|
75
|
-
select
|
|
76
|
-
>
|
|
77
|
-
{blastDatabaseOptions.map(val => (
|
|
78
|
-
<MenuItem value={val} key={val}>
|
|
79
|
-
{val}
|
|
80
|
-
</MenuItem>
|
|
81
|
-
))}
|
|
82
|
-
</TextField2>
|
|
83
|
-
|
|
84
|
-
<TextField2
|
|
85
|
-
value={msaAlgorithm}
|
|
86
|
-
onChange={event => {
|
|
87
|
-
setMsaAlgorithm(event.target.value)
|
|
88
|
-
}}
|
|
89
|
-
label="MSA Algorithm"
|
|
90
|
-
select
|
|
91
|
-
>
|
|
92
|
-
{msaAlgorithms.map(val => (
|
|
93
|
-
<MenuItem value={val} key={val}>
|
|
94
|
-
{val}
|
|
95
|
-
</MenuItem>
|
|
96
|
-
))}
|
|
97
|
-
</TextField2>
|
|
98
|
-
|
|
99
|
-
<TextField2
|
|
100
|
-
value={userSelection}
|
|
101
|
-
onChange={event => {
|
|
102
|
-
setUserSelection(event.target.value)
|
|
103
|
-
}}
|
|
104
|
-
label="Choose isoform to BLAST"
|
|
105
|
-
select
|
|
106
|
-
>
|
|
107
|
-
{options.map(val => (
|
|
108
|
-
<MenuItem value={getId(val)} key={val.id()}>
|
|
109
|
-
{getGeneDisplayName(feature)} - {getTranscriptDisplayName(val)}
|
|
110
|
-
</MenuItem>
|
|
111
|
-
))}
|
|
112
|
-
</TextField2>
|
|
113
|
-
<TextField2
|
|
114
|
-
variant="outlined"
|
|
115
|
-
multiline
|
|
116
|
-
minRows={5}
|
|
117
|
-
maxRows={10}
|
|
118
|
-
fullWidth
|
|
119
|
-
value={
|
|
120
|
-
proteinSequence
|
|
121
|
-
? `>${getTranscriptDisplayName(selectedTranscript)}\n${proteinSequence}`
|
|
122
|
-
: 'Loading...'
|
|
123
|
-
}
|
|
124
|
-
slotProps={{
|
|
125
|
-
input: {
|
|
126
|
-
readOnly: true,
|
|
127
|
-
classes: {
|
|
128
|
-
input: classes.textAreaFont,
|
|
129
|
-
},
|
|
130
|
-
},
|
|
131
|
-
}}
|
|
132
|
-
/>
|
|
133
|
-
|
|
134
|
-
<DialogActions>
|
|
135
|
-
<Button
|
|
136
|
-
color="primary"
|
|
137
|
-
variant="contained"
|
|
138
|
-
onClick={() => {
|
|
139
|
-
const newView = ncbiBlastLaunchView({
|
|
140
|
-
feature: selectedTranscript,
|
|
141
|
-
view,
|
|
142
|
-
newViewTitle: `NCBI BLAST - ${getGeneDisplayName(feature)} - ${getTranscriptDisplayName(selectedTranscript)} - ${msaAlgorithm}`,
|
|
143
|
-
})
|
|
144
|
-
newView.setBlastParams({
|
|
145
|
-
blastProgram: 'blastp',
|
|
146
|
-
blastDatabase,
|
|
147
|
-
msaAlgorithm,
|
|
148
|
-
selectedTranscript,
|
|
149
|
-
proteinSequence,
|
|
150
|
-
})
|
|
151
|
-
handleClose()
|
|
152
|
-
}}
|
|
153
|
-
disabled={!proteinSequence}
|
|
154
|
-
>
|
|
155
|
-
Submit
|
|
156
|
-
</Button>
|
|
157
|
-
<Button
|
|
158
|
-
color="secondary"
|
|
159
|
-
variant="contained"
|
|
160
|
-
onClick={() => {
|
|
161
|
-
handleClose()
|
|
162
|
-
}}
|
|
163
|
-
>
|
|
164
|
-
Cancel
|
|
165
|
-
</Button>
|
|
166
|
-
</DialogActions>
|
|
167
|
-
</DialogContent>
|
|
168
|
-
)
|
|
169
|
-
})
|
|
170
|
-
|
|
171
|
-
export default NcbiBlastPanel
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Feature,
|
|
3
|
-
defaultCodonTable,
|
|
4
|
-
generateCodonTable,
|
|
5
|
-
revcom,
|
|
6
|
-
} from '@jbrowse/core/util'
|
|
7
|
-
|
|
8
|
-
export interface Feat {
|
|
9
|
-
start: number
|
|
10
|
-
end: number
|
|
11
|
-
type: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export function stitch(subfeats: Feat[], sequence: string) {
|
|
15
|
-
return subfeats.map(sub => sequence.slice(sub.start, sub.end)).join('')
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export function calculateProteinSequence({
|
|
19
|
-
cds,
|
|
20
|
-
sequence,
|
|
21
|
-
codonTable,
|
|
22
|
-
}: {
|
|
23
|
-
cds: Feat[]
|
|
24
|
-
sequence: string
|
|
25
|
-
codonTable: Record<string, string>
|
|
26
|
-
}) {
|
|
27
|
-
const str = stitch(cds, sequence)
|
|
28
|
-
let protein = ''
|
|
29
|
-
for (let i = 0; i < str.length; i += 3) {
|
|
30
|
-
// use & symbol for undefined codon, or partial slice
|
|
31
|
-
protein += codonTable[str.slice(i, i + 3)] ?? '&'
|
|
32
|
-
}
|
|
33
|
-
return protein
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export function revlist(
|
|
37
|
-
list: { start: number; end: number; type: string }[],
|
|
38
|
-
seqlen: number,
|
|
39
|
-
) {
|
|
40
|
-
return list
|
|
41
|
-
.map(sub => ({
|
|
42
|
-
...sub,
|
|
43
|
-
start: seqlen - sub.end,
|
|
44
|
-
end: seqlen - sub.start,
|
|
45
|
-
}))
|
|
46
|
-
.sort((a, b) => a.start - b.start)
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// filter items if they have the same "ID" or location
|
|
50
|
-
function getItemId(feat: Feat) {
|
|
51
|
-
return `${feat.start}-${feat.end}`
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// filters if successive elements share same start/end
|
|
55
|
-
export function dedupe(list: Feat[]) {
|
|
56
|
-
return list.filter(
|
|
57
|
-
(item, pos, ary) => !pos || getItemId(item) !== getItemId(ary[pos - 1]!),
|
|
58
|
-
)
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export function getProteinSequence({
|
|
62
|
-
selectedTranscript,
|
|
63
|
-
seq,
|
|
64
|
-
}: {
|
|
65
|
-
seq: string
|
|
66
|
-
selectedTranscript: Feature
|
|
67
|
-
}) {
|
|
68
|
-
// @ts-expect-error
|
|
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
|
-
}
|
|
76
|
-
const cds = dedupe(
|
|
77
|
-
f.subfeatures
|
|
78
|
-
.sort((a, b) => a.start - b.start)
|
|
79
|
-
.map(sub => ({
|
|
80
|
-
...sub,
|
|
81
|
-
start: sub.start - f.start,
|
|
82
|
-
end: sub.end - f.start,
|
|
83
|
-
}))
|
|
84
|
-
.filter(f => f.type === 'CDS'),
|
|
85
|
-
)
|
|
86
|
-
|
|
87
|
-
return calculateProteinSequence({
|
|
88
|
-
cds: f.strand === -1 ? revlist(cds, seq.length) : cds,
|
|
89
|
-
sequence: f.strand === -1 ? revcom(seq) : seq,
|
|
90
|
-
codonTable: generateCodonTable(defaultCodonTable),
|
|
91
|
-
})
|
|
92
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './NcbiBlastPanel'
|
|
@@ -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
|
-
}
|
package/src/OpenInNewIcon.tsx
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
import { SvgIcon } from '@mui/material'
|
|
4
|
-
|
|
5
|
-
import type { SvgIconProps } from '@mui/material'
|
|
6
|
-
|
|
7
|
-
export default function OpenInNewIcon(props: SvgIconProps) {
|
|
8
|
-
return (
|
|
9
|
-
<SvgIcon {...props}>
|
|
10
|
-
<path d="M0 0h24v24H0z" fill="none" />
|
|
11
|
-
<path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z" />
|
|
12
|
-
</SvgIcon>
|
|
13
|
-
)
|
|
14
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|