@apollo-annotation/jbrowse-plugin-apollo 0.1.18 → 0.1.20
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/index.esm.js +3189 -3575
- package/dist/index.esm.js.map +1 -1
- package/dist/jbrowse-plugin-apollo.cjs.development.js +3185 -3570
- package/dist/jbrowse-plugin-apollo.cjs.development.js.map +1 -1
- package/dist/jbrowse-plugin-apollo.cjs.production.min.js +1 -1
- package/dist/jbrowse-plugin-apollo.cjs.production.min.js.map +1 -1
- package/dist/jbrowse-plugin-apollo.umd.development.js +14884 -15905
- package/dist/jbrowse-plugin-apollo.umd.development.js.map +1 -1
- package/dist/jbrowse-plugin-apollo.umd.production.min.js +1 -1
- package/dist/jbrowse-plugin-apollo.umd.production.min.js.map +1 -1
- package/package.json +33 -33
- package/src/ApolloInternetAccount/addMenuItems.ts +18 -0
- package/src/ApolloInternetAccount/components/AuthTypeSelector.tsx +1 -0
- package/src/ApolloInternetAccount/configSchema.ts +5 -2
- package/src/ApolloInternetAccount/model.ts +14 -5
- package/src/ApolloRefNameAliasAdapter/ApolloRefNameAliasAdapter.ts +94 -0
- package/src/ApolloRefNameAliasAdapter/configSchema.ts +12 -0
- package/src/ApolloRefNameAliasAdapter/index.ts +21 -0
- package/src/ApolloSequenceAdapter/ApolloSequenceAdapter.ts +1 -0
- package/src/ApolloSixFrameRenderer/components/ApolloRendering.tsx +10 -10
- package/src/ApolloTextSearchAdapter/ApolloTextSearchAdapter.ts +35 -32
- package/src/BackendDrivers/BackendDriver.ts +8 -0
- package/src/BackendDrivers/CollaborationServerDriver.ts +49 -1
- package/src/BackendDrivers/DesktopFileDriver.ts +14 -1
- package/src/BackendDrivers/InMemoryFileDriver.ts +17 -1
- package/src/ChangeManager.ts +1 -1
- package/src/FeatureDetailsWidget/ApolloFeatureDetailsWidget.tsx +5 -25
- package/src/FeatureDetailsWidget/ApolloTranscriptDetailsWidget.tsx +82 -0
- package/src/FeatureDetailsWidget/Attributes.tsx +11 -3
- package/src/FeatureDetailsWidget/BasicInformation.tsx +38 -30
- package/src/FeatureDetailsWidget/Sequence.tsx +7 -7
- package/src/FeatureDetailsWidget/TranscriptBasic.tsx +446 -0
- package/src/FeatureDetailsWidget/TranscriptSequence.tsx +365 -0
- package/src/FeatureDetailsWidget/index.ts +2 -0
- package/src/FeatureDetailsWidget/model.ts +77 -9
- package/src/LinearApolloDisplay/components/LinearApolloDisplay.tsx +0 -2
- package/src/LinearApolloDisplay/glyphs/BoxGlyph.ts +453 -380
- package/src/LinearApolloDisplay/glyphs/GeneGlyph.ts +520 -0
- package/src/LinearApolloDisplay/glyphs/GenericChildGlyph.ts +138 -134
- package/src/LinearApolloDisplay/glyphs/Glyph.ts +38 -370
- package/src/LinearApolloDisplay/glyphs/index.ts +1 -2
- package/src/LinearApolloDisplay/stateModel/base.ts +3 -6
- package/src/LinearApolloDisplay/stateModel/getGlyph.ts +30 -30
- package/src/LinearApolloDisplay/stateModel/index.ts +5 -1
- package/src/LinearApolloDisplay/stateModel/layouts.ts +32 -24
- package/src/LinearApolloDisplay/stateModel/mouseEvents.ts +206 -217
- package/src/LinearApolloDisplay/stateModel/rendering.ts +43 -67
- package/src/OntologyManager/OntologyStore/fulltext.ts +1 -1
- package/src/OntologyManager/OntologyStore/index.ts +2 -1
- package/src/OntologyManager/index.ts +6 -2
- package/src/OntologyManager/util.ts +2 -2
- package/src/SixFrameFeatureDisplay/stateModel.ts +15 -10
- package/src/TabularEditor/HybridGrid/ChangeHandling.ts +21 -46
- package/src/TabularEditor/HybridGrid/Feature.tsx +31 -82
- package/src/TabularEditor/HybridGrid/FeatureAttributes.tsx +3 -2
- package/src/TabularEditor/HybridGrid/HybridGrid.tsx +2 -3
- package/src/TabularEditor/HybridGrid/NumberCell.tsx +1 -0
- package/src/TabularEditor/HybridGrid/featureContextMenuItems.ts +46 -5
- package/src/TabularEditor/model.ts +5 -3
- package/src/components/AddAssembly.tsx +15 -9
- package/src/components/AddChildFeature.tsx +7 -73
- package/src/components/AddFeature.tsx +2 -57
- package/src/components/AddRefSeqAliases.tsx +285 -0
- package/src/components/CopyFeature.tsx +16 -33
- package/src/components/DeleteFeature.tsx +4 -6
- package/src/components/ImportFeatures.tsx +6 -3
- package/src/components/LogOut.tsx +105 -0
- package/src/components/ManageChecks.tsx +1 -0
- package/src/components/ManageUsers.tsx +21 -1
- package/src/components/ModifyFeatureAttribute.tsx +2 -2
- package/src/components/OntologyTermAutocomplete.tsx +0 -2
- package/src/components/OntologyTermMultiSelect.tsx +1 -0
- package/src/components/OpenLocalFile.tsx +6 -5
- package/src/components/ViewChangeLog.tsx +1 -0
- package/src/components/ViewCheckResults.tsx +1 -0
- package/src/components/index.ts +4 -0
- package/src/extensions/annotationFromPileup.ts +10 -16
- package/src/index.ts +57 -3
- package/src/session/ClientDataStore.ts +49 -46
- package/src/session/session.ts +186 -114
- package/src/util/loadAssemblyIntoClient.ts +4 -210
- package/src/FeatureDetailsWidget/RelatedFeature.tsx +0 -97
- package/src/LinearApolloDisplay/glyphs/CanonicalGeneGlyph.ts +0 -1204
- package/src/LinearApolloDisplay/glyphs/ImplicitExonGeneGlyph.ts +0 -716
- package/src/LinearApolloDisplay/stateModel/glyphs.ts +0 -47
package/src/ChangeManager.ts
CHANGED
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
import { BaseInternetAccountModel } from '@jbrowse/core/pluggableElementTypes'
|
|
2
1
|
import { getSession } from '@jbrowse/core/util'
|
|
3
2
|
import { observer } from 'mobx-react'
|
|
4
|
-
import
|
|
5
|
-
import React, { useMemo } from 'react'
|
|
3
|
+
import React from 'react'
|
|
6
4
|
import { makeStyles } from 'tss-react/mui'
|
|
7
5
|
|
|
8
|
-
import { ApolloInternetAccountModel } from '../ApolloInternetAccount/model'
|
|
9
6
|
import { ApolloSessionModel } from '../session'
|
|
10
|
-
import { ApolloRootModel } from '../types'
|
|
11
7
|
import { Attributes } from './Attributes'
|
|
12
8
|
import { BasicInformation } from './BasicInformation'
|
|
13
9
|
import { ApolloFeatureDetailsWidget as ApolloFeatureDetails } from './model'
|
|
14
|
-
import { RelatedFeatures } from './RelatedFeature'
|
|
15
10
|
import { Sequence } from './Sequence'
|
|
16
11
|
|
|
17
12
|
const useStyles = makeStyles()((theme) => ({
|
|
@@ -27,14 +22,6 @@ export const ApolloFeatureDetailsWidget = observer(
|
|
|
27
22
|
const session = getSession(model) as unknown as ApolloSessionModel
|
|
28
23
|
const currentAssembly = session.apolloDataStore.assemblies.get(assembly)
|
|
29
24
|
const { classes } = useStyles()
|
|
30
|
-
const { internetAccounts } = getRoot<ApolloRootModel>(session)
|
|
31
|
-
const internetAccount = useMemo(() => {
|
|
32
|
-
return internetAccounts.find(
|
|
33
|
-
(ia: BaseInternetAccountModel) => ia.type === 'ApolloInternetAccount',
|
|
34
|
-
) as ApolloInternetAccountModel | undefined
|
|
35
|
-
}, [internetAccounts])
|
|
36
|
-
const role = internetAccount ? internetAccount.role : 'admin'
|
|
37
|
-
const editable = ['admin', 'user'].includes(role ?? '')
|
|
38
25
|
|
|
39
26
|
if (!(feature && currentAssembly)) {
|
|
40
27
|
return null
|
|
@@ -43,11 +30,11 @@ export const ApolloFeatureDetailsWidget = observer(
|
|
|
43
30
|
if (!refSeq) {
|
|
44
31
|
return null
|
|
45
32
|
}
|
|
46
|
-
const {
|
|
47
|
-
const sequence = refSeq.getSequence(
|
|
33
|
+
const { max, min } = feature
|
|
34
|
+
const sequence = refSeq.getSequence(min, max)
|
|
48
35
|
if (!sequence) {
|
|
49
36
|
void session.apolloDataStore.loadRefSeq([
|
|
50
|
-
{ assemblyName: assembly, refName, start, end },
|
|
37
|
+
{ assemblyName: assembly, refName, start: min, end: max },
|
|
51
38
|
])
|
|
52
39
|
}
|
|
53
40
|
|
|
@@ -63,7 +50,7 @@ export const ApolloFeatureDetailsWidget = observer(
|
|
|
63
50
|
feature={feature}
|
|
64
51
|
session={session}
|
|
65
52
|
assembly={currentAssembly._id}
|
|
66
|
-
editable={
|
|
53
|
+
editable={true}
|
|
67
54
|
/>
|
|
68
55
|
<hr />
|
|
69
56
|
<Sequence
|
|
@@ -72,13 +59,6 @@ export const ApolloFeatureDetailsWidget = observer(
|
|
|
72
59
|
assembly={currentAssembly._id}
|
|
73
60
|
refName={refName}
|
|
74
61
|
/>
|
|
75
|
-
<hr />
|
|
76
|
-
<RelatedFeatures
|
|
77
|
-
feature={feature}
|
|
78
|
-
refName={refName}
|
|
79
|
-
session={session}
|
|
80
|
-
assembly={currentAssembly._id}
|
|
81
|
-
/>
|
|
82
62
|
</div>
|
|
83
63
|
)
|
|
84
64
|
},
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { AbstractSessionModel, getSession } from '@jbrowse/core/util'
|
|
2
|
+
import { observer } from 'mobx-react'
|
|
3
|
+
import { getRoot } from 'mobx-state-tree'
|
|
4
|
+
import React from 'react'
|
|
5
|
+
import { makeStyles } from 'tss-react/mui'
|
|
6
|
+
|
|
7
|
+
import { ApolloInternetAccountModel } from '../ApolloInternetAccount/model'
|
|
8
|
+
import { ApolloSessionModel } from '../session'
|
|
9
|
+
import { ApolloRootModel } from '../types'
|
|
10
|
+
import { Attributes } from './Attributes'
|
|
11
|
+
import { TranscriptBasicInformation } from './TranscriptBasic'
|
|
12
|
+
import { TranscriptSequence } from './TranscriptSequence'
|
|
13
|
+
import { ApolloTranscriptDetailsWidget as ApolloTranscriptDetailsWidgetState } from './model'
|
|
14
|
+
|
|
15
|
+
const useStyles = makeStyles()((theme) => ({
|
|
16
|
+
root: {
|
|
17
|
+
padding: theme.spacing(2),
|
|
18
|
+
},
|
|
19
|
+
}))
|
|
20
|
+
|
|
21
|
+
export const ApolloTranscriptDetailsWidget = observer(
|
|
22
|
+
function ApolloTranscriptDetails(props: {
|
|
23
|
+
model: ApolloTranscriptDetailsWidgetState
|
|
24
|
+
}) {
|
|
25
|
+
const { classes } = useStyles()
|
|
26
|
+
const { model } = props
|
|
27
|
+
const { assembly, feature, refName } = model
|
|
28
|
+
const session = getSession(model) as unknown as AbstractSessionModel
|
|
29
|
+
const apolloSession = getSession(model) as unknown as ApolloSessionModel
|
|
30
|
+
const currentAssembly =
|
|
31
|
+
apolloSession.apolloDataStore.assemblies.get(assembly)
|
|
32
|
+
const { internetAccounts } = getRoot<ApolloRootModel>(session)
|
|
33
|
+
|
|
34
|
+
const apolloInternetAccount = internetAccounts.find(
|
|
35
|
+
(ia) => ia.type === 'ApolloInternetAccount',
|
|
36
|
+
) as ApolloInternetAccountModel | undefined
|
|
37
|
+
const role = apolloInternetAccount ? apolloInternetAccount.role : 'admin'
|
|
38
|
+
const editable = ['admin', 'user'].includes(role ?? '')
|
|
39
|
+
|
|
40
|
+
if (!(feature && currentAssembly)) {
|
|
41
|
+
return null
|
|
42
|
+
}
|
|
43
|
+
const refSeq = currentAssembly.getByRefName(refName)
|
|
44
|
+
if (!refSeq) {
|
|
45
|
+
return null
|
|
46
|
+
}
|
|
47
|
+
const { max, min } = feature
|
|
48
|
+
|
|
49
|
+
const sequence = refSeq.getSequence(min, max)
|
|
50
|
+
if (!sequence) {
|
|
51
|
+
void apolloSession.apolloDataStore.loadRefSeq([
|
|
52
|
+
{ assemblyName: assembly, refName, start: min, end: max },
|
|
53
|
+
])
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<div className={classes.root}>
|
|
58
|
+
<TranscriptBasicInformation
|
|
59
|
+
feature={feature}
|
|
60
|
+
session={apolloSession}
|
|
61
|
+
assembly={currentAssembly._id || ''}
|
|
62
|
+
refName={refName}
|
|
63
|
+
/>
|
|
64
|
+
<hr />
|
|
65
|
+
<Attributes
|
|
66
|
+
feature={feature}
|
|
67
|
+
session={apolloSession}
|
|
68
|
+
assembly={currentAssembly._id || ''}
|
|
69
|
+
editable={editable}
|
|
70
|
+
/>
|
|
71
|
+
<hr />
|
|
72
|
+
<TranscriptSequence
|
|
73
|
+
feature={feature}
|
|
74
|
+
session={apolloSession}
|
|
75
|
+
assembly={currentAssembly._id || ''}
|
|
76
|
+
refName={refName}
|
|
77
|
+
/>
|
|
78
|
+
</div>
|
|
79
|
+
)
|
|
80
|
+
},
|
|
81
|
+
)
|
|
82
|
+
export default ApolloTranscriptDetailsWidget
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/unbound-method */
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
3
3
|
/* eslint-disable @typescript-eslint/no-misused-promises */
|
|
4
|
-
import {
|
|
4
|
+
import { AnnotationFeature } from '@apollo-annotation/mst'
|
|
5
5
|
import { FeatureAttributeChange } from '@apollo-annotation/shared'
|
|
6
6
|
import { AbstractSessionModel } from '@jbrowse/core/util'
|
|
7
7
|
import DeleteIcon from '@mui/icons-material/Delete'
|
|
@@ -91,7 +91,7 @@ export const Attributes = observer(function Attributes({
|
|
|
91
91
|
feature,
|
|
92
92
|
session,
|
|
93
93
|
}: {
|
|
94
|
-
feature:
|
|
94
|
+
feature: AnnotationFeature
|
|
95
95
|
session: ApolloSessionModel
|
|
96
96
|
assembly: string
|
|
97
97
|
editable: boolean
|
|
@@ -242,9 +242,17 @@ export const Attributes = observer(function Attributes({
|
|
|
242
242
|
|
|
243
243
|
return (
|
|
244
244
|
<>
|
|
245
|
-
<Typography
|
|
245
|
+
<Typography
|
|
246
|
+
style={{ display: 'inline', marginLeft: '15px' }}
|
|
247
|
+
variant="h5"
|
|
248
|
+
>
|
|
249
|
+
Attributes
|
|
250
|
+
</Typography>
|
|
246
251
|
<Grid container direction="column" spacing={1}>
|
|
247
252
|
{Object.entries(attributes).map(([key, value]) => {
|
|
253
|
+
if (key === '') {
|
|
254
|
+
return null
|
|
255
|
+
}
|
|
248
256
|
const EditorComponent =
|
|
249
257
|
reservedKeys.get(key) ?? CustomAttributeValueEditor
|
|
250
258
|
return (
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/use-unknown-in-catch-callback-variable */
|
|
1
2
|
/* eslint-disable @typescript-eslint/no-misused-promises */
|
|
2
|
-
import {
|
|
3
|
+
import { AnnotationFeature } from '@apollo-annotation/mst'
|
|
3
4
|
import {
|
|
4
5
|
LocationEndChange,
|
|
5
6
|
LocationStartChange,
|
|
@@ -7,15 +8,7 @@ import {
|
|
|
7
8
|
TypeChange,
|
|
8
9
|
} from '@apollo-annotation/shared'
|
|
9
10
|
import { AbstractSessionModel } from '@jbrowse/core/util'
|
|
10
|
-
import {
|
|
11
|
-
FormControl,
|
|
12
|
-
FormControlLabel,
|
|
13
|
-
FormLabel,
|
|
14
|
-
Radio,
|
|
15
|
-
RadioGroup,
|
|
16
|
-
TextField,
|
|
17
|
-
Typography,
|
|
18
|
-
} from '@mui/material'
|
|
11
|
+
import { TextField, Typography } from '@mui/material'
|
|
19
12
|
import { observer } from 'mobx-react'
|
|
20
13
|
import React, { useState } from 'react'
|
|
21
14
|
|
|
@@ -31,14 +24,14 @@ export const BasicInformation = observer(function BasicInformation({
|
|
|
31
24
|
feature,
|
|
32
25
|
session,
|
|
33
26
|
}: {
|
|
34
|
-
feature:
|
|
27
|
+
feature: AnnotationFeature
|
|
35
28
|
session: ApolloSessionModel
|
|
36
29
|
assembly: string
|
|
37
30
|
}) {
|
|
38
31
|
const [errorMessage, setErrorMessage] = useState('')
|
|
39
32
|
const [typeWarningText, setTypeWarningText] = useState('')
|
|
40
33
|
|
|
41
|
-
const { _id, assemblyId,
|
|
34
|
+
const { _id, assemblyId, max, min, strand, type } = feature
|
|
42
35
|
|
|
43
36
|
const notifyError = (e: Error) => {
|
|
44
37
|
;(session as unknown as AbstractSessionModel).notify(e.message, 'error')
|
|
@@ -79,7 +72,7 @@ export const BasicInformation = observer(function BasicInformation({
|
|
|
79
72
|
typeName: 'LocationStartChange',
|
|
80
73
|
changedIds: [_id],
|
|
81
74
|
featureId: _id,
|
|
82
|
-
oldStart:
|
|
75
|
+
oldStart: min,
|
|
83
76
|
newStart,
|
|
84
77
|
assembly,
|
|
85
78
|
})
|
|
@@ -91,7 +84,7 @@ export const BasicInformation = observer(function BasicInformation({
|
|
|
91
84
|
typeName: 'LocationEndChange',
|
|
92
85
|
changedIds: [_id],
|
|
93
86
|
featureId: _id,
|
|
94
|
-
oldEnd:
|
|
87
|
+
oldEnd: max,
|
|
95
88
|
newEnd,
|
|
96
89
|
assembly,
|
|
97
90
|
})
|
|
@@ -99,7 +92,7 @@ export const BasicInformation = observer(function BasicInformation({
|
|
|
99
92
|
}
|
|
100
93
|
|
|
101
94
|
async function fetchValidTerms(
|
|
102
|
-
parentFeature:
|
|
95
|
+
parentFeature: undefined | AnnotationFeature,
|
|
103
96
|
ontologyStore: OntologyStore,
|
|
104
97
|
_signal: AbortSignal,
|
|
105
98
|
) {
|
|
@@ -119,14 +112,14 @@ export const BasicInformation = observer(function BasicInformation({
|
|
|
119
112
|
|
|
120
113
|
return (
|
|
121
114
|
<>
|
|
122
|
-
<Typography variant="
|
|
115
|
+
<Typography variant="h5">Basic information</Typography>
|
|
123
116
|
<NumberTextField
|
|
124
117
|
margin="dense"
|
|
125
118
|
id="start"
|
|
126
119
|
label="Start"
|
|
127
120
|
fullWidth
|
|
128
121
|
variant="outlined"
|
|
129
|
-
value={
|
|
122
|
+
value={min + 1}
|
|
130
123
|
onChangeCommitted={handleStartChange}
|
|
131
124
|
/>
|
|
132
125
|
<NumberTextField
|
|
@@ -135,7 +128,7 @@ export const BasicInformation = observer(function BasicInformation({
|
|
|
135
128
|
label="End"
|
|
136
129
|
fullWidth
|
|
137
130
|
variant="outlined"
|
|
138
|
-
value={
|
|
131
|
+
value={max}
|
|
139
132
|
onChangeCommitted={handleEndChange}
|
|
140
133
|
/>
|
|
141
134
|
<OntologyTermAutocomplete
|
|
@@ -160,18 +153,33 @@ export const BasicInformation = observer(function BasicInformation({
|
|
|
160
153
|
}
|
|
161
154
|
}}
|
|
162
155
|
/>
|
|
163
|
-
<
|
|
164
|
-
<
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
156
|
+
<label>
|
|
157
|
+
<input
|
|
158
|
+
type="radio"
|
|
159
|
+
value="1"
|
|
160
|
+
checked={strand === 1}
|
|
161
|
+
onChange={handleStrandChange}
|
|
162
|
+
/>
|
|
163
|
+
Positive Strand (+)
|
|
164
|
+
</label>
|
|
165
|
+
<label>
|
|
166
|
+
<input
|
|
167
|
+
type="radio"
|
|
168
|
+
value="-1"
|
|
169
|
+
checked={strand === -1}
|
|
170
|
+
onChange={handleStrandChange}
|
|
171
|
+
/>
|
|
172
|
+
Negative Strand (-)
|
|
173
|
+
</label>
|
|
174
|
+
<label>
|
|
175
|
+
<input
|
|
176
|
+
type="radio"
|
|
177
|
+
value=""
|
|
178
|
+
checked={strand === undefined}
|
|
179
|
+
onChange={handleStrandChange}
|
|
180
|
+
/>
|
|
181
|
+
No Strand Information
|
|
182
|
+
</label>
|
|
175
183
|
{errorMessage ? (
|
|
176
184
|
<Typography color="error">{errorMessage}</Typography>
|
|
177
185
|
) : null}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
2
|
-
import {
|
|
2
|
+
import { AnnotationFeature } from '@apollo-annotation/mst'
|
|
3
3
|
import { splitStringIntoChunks } from '@apollo-annotation/shared'
|
|
4
4
|
import { Button, Typography } from '@mui/material'
|
|
5
5
|
import { observer } from 'mobx-react'
|
|
@@ -35,7 +35,7 @@ export const Sequence = observer(function Sequence({
|
|
|
35
35
|
session,
|
|
36
36
|
}: {
|
|
37
37
|
assembly: string
|
|
38
|
-
feature:
|
|
38
|
+
feature: AnnotationFeature
|
|
39
39
|
refName: string
|
|
40
40
|
session: ApolloSessionModel
|
|
41
41
|
}) {
|
|
@@ -54,22 +54,22 @@ export const Sequence = observer(function Sequence({
|
|
|
54
54
|
if (!refSeq) {
|
|
55
55
|
return null
|
|
56
56
|
}
|
|
57
|
-
const {
|
|
57
|
+
const { max, min } = feature
|
|
58
58
|
let sequence = ''
|
|
59
59
|
if (showSequence) {
|
|
60
|
-
sequence = refSeq.getSequence(
|
|
60
|
+
sequence = refSeq.getSequence(min, max)
|
|
61
61
|
if (sequence) {
|
|
62
|
-
sequence = formatSequence(sequence, refName,
|
|
62
|
+
sequence = formatSequence(sequence, refName, min, max)
|
|
63
63
|
} else {
|
|
64
64
|
void session.apolloDataStore.loadRefSeq([
|
|
65
|
-
{ assemblyName: assembly, refName, start, end },
|
|
65
|
+
{ assemblyName: assembly, refName, start: min, end: max },
|
|
66
66
|
])
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
return (
|
|
71
71
|
<>
|
|
72
|
-
<Typography variant="
|
|
72
|
+
<Typography variant="h5">Sequence</Typography>
|
|
73
73
|
<Button variant="contained" onClick={onButtonClick}>
|
|
74
74
|
{showSequence ? 'Hide sequence' : 'Show sequence'}
|
|
75
75
|
</Button>
|