@apollo-annotation/jbrowse-plugin-apollo 0.3.5 → 0.3.7
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 +6964 -4598
- package/dist/index.esm.js.map +1 -1
- package/dist/jbrowse-plugin-apollo.cjs.development.js +6610 -4261
- 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 +11563 -7493
- 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 +4 -4
- package/src/ApolloInternetAccount/addMenuItems.ts +23 -2
- package/src/ApolloInternetAccount/components/AuthTypeSelector.tsx +1 -0
- package/src/ApolloInternetAccount/components/LoginButtons.tsx +1 -1
- package/src/ApolloInternetAccount/components/LoginIcons.tsx +1 -1
- package/src/ApolloInternetAccount/configSchema.ts +1 -1
- package/src/ApolloInternetAccount/model.ts +11 -10
- package/src/ApolloJobModel.ts +1 -1
- package/src/ApolloRefNameAliasAdapter/ApolloRefNameAliasAdapter.ts +8 -6
- package/src/ApolloRefNameAliasAdapter/index.ts +2 -2
- package/src/ApolloSequenceAdapter/ApolloSequenceAdapter.ts +4 -4
- package/src/ApolloSequenceAdapter/index.ts +1 -1
- package/src/ApolloTextSearchAdapter/ApolloTextSearchAdapter.ts +8 -7
- package/src/ApolloTextSearchAdapter/index.ts +1 -1
- package/src/BackendDrivers/BackendDriver.ts +7 -7
- package/src/BackendDrivers/CollaborationServerDriver.ts +14 -10
- package/src/BackendDrivers/DesktopFileDriver.ts +11 -10
- package/src/BackendDrivers/InMemoryFileDriver.ts +10 -6
- package/src/ChangeManager.ts +15 -11
- package/src/FeatureDetailsWidget/ApolloFeatureDetailsWidget.tsx +8 -7
- package/src/FeatureDetailsWidget/ApolloTranscriptDetailsWidget.tsx +35 -14
- package/src/FeatureDetailsWidget/AttributeKey.tsx +50 -0
- package/src/FeatureDetailsWidget/AttributeKeySelector.tsx +104 -0
- package/src/FeatureDetailsWidget/Attributes.tsx +215 -367
- package/src/FeatureDetailsWidget/BasicInformation.tsx +6 -5
- package/src/FeatureDetailsWidget/DefaultAttributeEditor.tsx +104 -0
- package/src/FeatureDetailsWidget/DefaultAttributeViewer.tsx +22 -0
- package/src/FeatureDetailsWidget/FeatureDetailsNavigation.tsx +4 -4
- package/src/FeatureDetailsWidget/NumberTextField.tsx +1 -1
- package/src/FeatureDetailsWidget/Sequence.tsx +2 -2
- package/src/FeatureDetailsWidget/StringTextField.tsx +1 -1
- package/src/FeatureDetailsWidget/TranscriptSequence.tsx +15 -23
- package/src/FeatureDetailsWidget/TranscriptWidgetEditLocation.tsx +950 -196
- package/src/FeatureDetailsWidget/TranscriptWidgetSummary.tsx +8 -4
- package/src/FeatureDetailsWidget/model.ts +8 -3
- package/src/LinearApolloDisplay/components/LinearApolloDisplay.tsx +7 -7
- package/src/LinearApolloDisplay/glyphs/BoxGlyph.ts +59 -72
- package/src/LinearApolloDisplay/glyphs/GeneGlyph.ts +253 -60
- package/src/LinearApolloDisplay/glyphs/GenericChildGlyph.ts +52 -6
- package/src/LinearApolloDisplay/glyphs/Glyph.ts +16 -8
- package/src/LinearApolloDisplay/stateModel/base.ts +81 -10
- package/src/LinearApolloDisplay/stateModel/index.ts +4 -3
- package/src/LinearApolloDisplay/stateModel/layouts.ts +8 -39
- package/src/LinearApolloDisplay/stateModel/mouseEvents.ts +63 -46
- package/src/LinearApolloDisplay/stateModel/rendering.ts +60 -31
- package/src/LinearApolloSixFrameDisplay/components/LinearApolloSixFrameDisplay.tsx +226 -0
- package/src/LinearApolloSixFrameDisplay/components/TrackLines.tsx +32 -0
- package/src/LinearApolloSixFrameDisplay/components/index.ts +2 -0
- package/src/LinearApolloSixFrameDisplay/configSchema.ts +7 -0
- package/src/LinearApolloSixFrameDisplay/glyphs/GeneGlyph.ts +940 -0
- package/src/LinearApolloSixFrameDisplay/glyphs/Glyph.ts +63 -0
- package/src/LinearApolloSixFrameDisplay/glyphs/index.ts +1 -0
- package/src/LinearApolloSixFrameDisplay/index.ts +2 -0
- package/src/LinearApolloSixFrameDisplay/stateModel/base.ts +302 -0
- package/src/LinearApolloSixFrameDisplay/stateModel/index.ts +27 -0
- package/src/LinearApolloSixFrameDisplay/stateModel/layouts.ts +252 -0
- package/src/LinearApolloSixFrameDisplay/stateModel/mouseEvents.ts +368 -0
- package/src/LinearApolloSixFrameDisplay/stateModel/rendering.ts +201 -0
- package/src/LinearApolloSixFrameDisplay/types.ts +1 -0
- package/src/OntologyManager/OntologyStore/fulltext.test.ts +1 -1
- package/src/OntologyManager/OntologyStore/fulltext.ts +8 -3
- package/src/OntologyManager/OntologyStore/index.test.ts +3 -1
- package/src/OntologyManager/OntologyStore/index.ts +19 -14
- package/src/OntologyManager/OntologyStore/indexeddb-schema.ts +6 -5
- package/src/OntologyManager/OntologyStore/indexeddb-storage.ts +11 -5
- package/src/OntologyManager/index.ts +12 -7
- package/src/OntologyManager/util.ts +3 -2
- package/src/TabularEditor/HybridGrid/ChangeHandling.ts +2 -2
- package/src/TabularEditor/HybridGrid/Feature.tsx +13 -7
- package/src/TabularEditor/HybridGrid/FeatureAttributes.tsx +1 -1
- package/src/TabularEditor/HybridGrid/HybridGrid.tsx +3 -2
- package/src/TabularEditor/HybridGrid/ToolBar.tsx +1 -1
- package/src/TabularEditor/HybridGrid/featureContextMenuItems.ts +114 -22
- package/src/TabularEditor/TabularEditorPane.tsx +1 -1
- package/src/TabularEditor/model.ts +2 -2
- package/src/TabularEditor/types.ts +5 -2
- package/src/components/AddAssembly.tsx +182 -179
- package/src/components/AddAssemblyAliases.tsx +114 -0
- package/src/components/AddChildFeature.tsx +8 -10
- package/src/components/AddFeature.tsx +216 -44
- package/src/components/AddRefSeqAliases.tsx +14 -12
- package/src/components/CopyFeature.tsx +10 -11
- package/src/components/CreateApolloAnnotation.tsx +342 -158
- package/src/components/DeleteAssembly.tsx +9 -8
- package/src/components/DeleteFeature.tsx +362 -14
- package/src/components/Dialog.tsx +1 -1
- package/src/components/DownloadGFF3.tsx +31 -11
- package/src/components/FilterFeatures.tsx +6 -4
- package/src/components/FilterTranscripts.tsx +86 -0
- package/src/components/ImportFeatures.tsx +7 -6
- package/src/components/LogOut.tsx +5 -4
- package/src/components/ManageChecks.tsx +9 -8
- package/src/components/ManageUsers.tsx +11 -10
- package/src/components/MergeExons.tsx +193 -0
- package/src/components/MergeTranscripts.tsx +185 -0
- package/src/components/OntologyTermAutocomplete.tsx +5 -5
- package/src/components/OntologyTermMultiSelect.tsx +6 -6
- package/src/components/OpenLocalFile.tsx +4 -3
- package/src/components/SplitExon.tsx +134 -0
- package/src/components/ViewChangeLog.tsx +7 -6
- package/src/components/ViewCheckResults.tsx +8 -7
- package/src/components/index.ts +3 -0
- package/src/config.ts +5 -0
- package/src/extensions/annotationFromJBrowseFeature.test.ts +1 -0
- package/src/extensions/annotationFromJBrowseFeature.ts +13 -10
- package/src/extensions/annotationFromPileup.ts +104 -94
- package/src/index.ts +33 -50
- package/src/makeDisplayComponent.tsx +90 -37
- package/src/session/ClientDataStore.ts +21 -17
- package/src/session/session.ts +46 -39
- package/src/types.ts +4 -4
- package/src/util/annotationFeatureUtils.ts +66 -1
- package/src/util/copyToClipboard.ts +21 -0
- package/src/util/glyphUtils.ts +49 -0
- package/src/util/index.ts +5 -3
- package/src/util/loadAssemblyIntoClient.ts +10 -3
- package/src/util/mouseEventsUtils.ts +113 -0
- package/src/ApolloSixFrameRenderer/ApolloSixFrameRenderer.tsx +0 -13
- package/src/ApolloSixFrameRenderer/components/ApolloRendering.tsx +0 -707
- package/src/ApolloSixFrameRenderer/configSchema.ts +0 -7
- package/src/ApolloSixFrameRenderer/index.ts +0 -3
- package/src/SixFrameFeatureDisplay/components/TrackLines.tsx +0 -19
- package/src/SixFrameFeatureDisplay/components/index.ts +0 -1
- package/src/SixFrameFeatureDisplay/configSchema.ts +0 -21
- package/src/SixFrameFeatureDisplay/index.ts +0 -2
- package/src/SixFrameFeatureDisplay/stateModel.ts +0 -443
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
2
2
|
import { openLocation } from '@jbrowse/core/util/io'
|
|
3
3
|
import equal from 'fast-deep-equal/es6'
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
type IDBPDatabase,
|
|
6
|
+
type IDBPTransaction,
|
|
7
|
+
openDB,
|
|
8
|
+
} from 'idb/with-async-ittr'
|
|
9
|
+
|
|
10
|
+
import { defaultTextIndexFields } from '..'
|
|
5
11
|
|
|
6
12
|
import { PREFIXED_ID_PATH, getWords } from './fulltext'
|
|
7
13
|
import {
|
|
8
|
-
OntologyDB,
|
|
14
|
+
type OntologyDB,
|
|
9
15
|
isOntologyDBEdge,
|
|
10
16
|
isOntologyDBNode,
|
|
11
17
|
} from './indexeddb-schema'
|
|
12
|
-
import { GraphDocument } from './obo-graph-json-schema'
|
|
13
|
-
|
|
14
|
-
import
|
|
18
|
+
import { type GraphDocument } from './obo-graph-json-schema'
|
|
19
|
+
|
|
20
|
+
import type OntologyStore from '.'
|
|
15
21
|
|
|
16
22
|
/** schema version we are currently on, used for the IndexedDB schema open call */
|
|
17
23
|
const schemaVersion = 2
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
-
AnyConfigurationModel,
|
|
2
|
+
type AnyConfigurationModel,
|
|
3
3
|
ConfigurationSchema,
|
|
4
4
|
readConfObject,
|
|
5
5
|
} from '@jbrowse/core/configuration'
|
|
@@ -10,18 +10,21 @@ import {
|
|
|
10
10
|
} from '@jbrowse/core/util/types/mst'
|
|
11
11
|
import { autorun } from 'mobx'
|
|
12
12
|
import {
|
|
13
|
-
Instance,
|
|
13
|
+
type Instance,
|
|
14
14
|
addDisposer,
|
|
15
15
|
flow,
|
|
16
16
|
getRoot,
|
|
17
17
|
getSnapshot,
|
|
18
|
+
isAlive,
|
|
18
19
|
types,
|
|
19
20
|
} from 'mobx-state-tree'
|
|
20
|
-
|
|
21
|
-
import
|
|
21
|
+
|
|
22
|
+
import type ApolloPluginConfigurationSchema from '../config'
|
|
23
|
+
import { type ApolloRootModel } from '../types'
|
|
24
|
+
|
|
25
|
+
import OntologyStore, { type OntologyStoreOptions } from './OntologyStore'
|
|
26
|
+
import { type OntologyDBNode } from './OntologyStore/indexeddb-schema'
|
|
22
27
|
import { applyPrefixes, expandPrefixes } from './OntologyStore/prefixes'
|
|
23
|
-
import ApolloPluginConfigurationSchema from '../config'
|
|
24
|
-
import { ApolloRootModel } from '../types'
|
|
25
28
|
|
|
26
29
|
export { isDeprecated } from './OntologyStore/indexeddb-schema'
|
|
27
30
|
|
|
@@ -77,7 +80,9 @@ export const OntologyRecordType = types
|
|
|
77
80
|
const equivalents: string[] = terms
|
|
78
81
|
.map((term) => term.lbl)
|
|
79
82
|
.filter((term) => term != undefined)
|
|
80
|
-
self
|
|
83
|
+
if (isAlive(self)) {
|
|
84
|
+
self.setEquivalentTypes(type, equivalents)
|
|
85
|
+
}
|
|
81
86
|
}),
|
|
82
87
|
}))
|
|
83
88
|
.actions((self) => ({
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { AnnotationFeature } from '@apollo-annotation/mst'
|
|
1
|
+
import { type AnnotationFeature } from '@apollo-annotation/mst'
|
|
2
|
+
|
|
3
|
+
import type OntologyStore from './OntologyStore'
|
|
2
4
|
|
|
3
|
-
import OntologyStore from './OntologyStore'
|
|
4
5
|
import { isOntologyClass } from '.'
|
|
5
6
|
|
|
6
7
|
export async function fetchValidDescendantTerms(
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type AnnotationFeature } from '@apollo-annotation/mst'
|
|
2
2
|
import {
|
|
3
3
|
LocationEndChange,
|
|
4
4
|
LocationStartChange,
|
|
5
5
|
TypeChange,
|
|
6
6
|
} from '@apollo-annotation/shared'
|
|
7
7
|
|
|
8
|
-
import type
|
|
8
|
+
import { type ChangeManager } from '../../ChangeManager'
|
|
9
9
|
|
|
10
10
|
export function handleFeatureTypeChange(
|
|
11
11
|
changeManager: ChangeManager,
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
/* eslint-disable unicorn/no-nested-ternary */
|
|
2
2
|
/* eslint-disable @typescript-eslint/unbound-method */
|
|
3
3
|
|
|
4
|
-
import { AnnotationFeature } from '@apollo-annotation/mst'
|
|
5
|
-
import { AbstractSessionModel } from '@jbrowse/core/util'
|
|
4
|
+
import { type AnnotationFeature } from '@apollo-annotation/mst'
|
|
5
|
+
import { type AbstractSessionModel } from '@jbrowse/core/util'
|
|
6
6
|
import { observer } from 'mobx-react'
|
|
7
7
|
import React from 'react'
|
|
8
8
|
import { makeStyles } from 'tss-react/mui'
|
|
9
9
|
|
|
10
|
-
import { OntologyTermAutocomplete } from '../../components/OntologyTermAutocomplete'
|
|
11
10
|
import { isOntologyClass } from '../../OntologyManager'
|
|
12
|
-
import OntologyStore from '../../OntologyManager/OntologyStore'
|
|
13
|
-
import {
|
|
11
|
+
import type OntologyStore from '../../OntologyManager/OntologyStore'
|
|
12
|
+
import { OntologyTermAutocomplete } from '../../components/OntologyTermAutocomplete'
|
|
13
|
+
import { type DisplayStateModel } from '../types'
|
|
14
|
+
|
|
14
15
|
import {
|
|
15
16
|
handleFeatureEndChange,
|
|
16
17
|
handleFeatureStartChange,
|
|
17
18
|
handleFeatureTypeChange,
|
|
18
19
|
} from './ChangeHandling'
|
|
19
20
|
import { FeatureAttributes } from './FeatureAttributes'
|
|
20
|
-
import {
|
|
21
|
-
import type { ContextMenuState } from './HybridGrid'
|
|
21
|
+
import { type ContextMenuState } from './HybridGrid'
|
|
22
22
|
import { NumberCell } from './NumberCell'
|
|
23
|
+
import { featureContextMenuItems } from './featureContextMenuItems'
|
|
23
24
|
|
|
24
25
|
const useStyles = makeStyles()((theme) => ({
|
|
25
26
|
typeContent: {
|
|
@@ -67,6 +68,8 @@ function makeContextMenuItems(
|
|
|
67
68
|
selectedFeature,
|
|
68
69
|
session,
|
|
69
70
|
setSelectedFeature,
|
|
71
|
+
filteredTranscripts,
|
|
72
|
+
updateFilteredTranscripts,
|
|
70
73
|
} = display
|
|
71
74
|
return featureContextMenuItems(
|
|
72
75
|
feature,
|
|
@@ -76,6 +79,8 @@ function makeContextMenuItems(
|
|
|
76
79
|
setSelectedFeature,
|
|
77
80
|
session,
|
|
78
81
|
changeManager,
|
|
82
|
+
filteredTranscripts,
|
|
83
|
+
updateFilteredTranscripts,
|
|
79
84
|
)
|
|
80
85
|
}
|
|
81
86
|
|
|
@@ -132,6 +137,7 @@ export const Feature = observer(function Feature({
|
|
|
132
137
|
displayState.setApolloHover({
|
|
133
138
|
feature,
|
|
134
139
|
topLevelFeature: getTopLevelFeature(feature),
|
|
140
|
+
// @ts-expect-error TODO fix in future when moving hover logic to session.
|
|
135
141
|
glyph: displayState.getGlyph(getTopLevelFeature(feature)),
|
|
136
142
|
})
|
|
137
143
|
}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
|
2
|
-
import { AnnotationFeature } from '@apollo-annotation/mst'
|
|
2
|
+
import { type AnnotationFeature } from '@apollo-annotation/mst'
|
|
3
3
|
import { observer } from 'mobx-react'
|
|
4
4
|
import { getSnapshot } from 'mobx-state-tree'
|
|
5
5
|
import React from 'react'
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { Menu, MenuItem } from '@jbrowse/core/ui'
|
|
1
|
+
import { Menu, type MenuItem } from '@jbrowse/core/ui'
|
|
2
2
|
import { useTheme } from '@mui/material'
|
|
3
3
|
import { observer } from 'mobx-react'
|
|
4
4
|
import React, { useEffect, useRef, useState } from 'react'
|
|
5
5
|
import { makeStyles } from 'tss-react/mui'
|
|
6
6
|
|
|
7
|
-
import { DisplayStateModel } from '../types'
|
|
7
|
+
import { type DisplayStateModel } from '../types'
|
|
8
|
+
|
|
8
9
|
import { Feature } from './Feature'
|
|
9
10
|
|
|
10
11
|
const useStyles = makeStyles()((theme) => ({
|
|
@@ -1,14 +1,21 @@
|
|
|
1
|
-
import { AnnotationFeature } from '@apollo-annotation/mst'
|
|
2
|
-
import { MenuItem } from '@jbrowse/core/ui'
|
|
1
|
+
import { type AnnotationFeature } from '@apollo-annotation/mst'
|
|
2
|
+
import { type MenuItem } from '@jbrowse/core/ui'
|
|
3
3
|
import {
|
|
4
|
-
AbstractSessionModel,
|
|
5
|
-
SessionWithWidgets,
|
|
4
|
+
type AbstractSessionModel,
|
|
5
|
+
type SessionWithWidgets,
|
|
6
6
|
isSessionModelWithWidgets,
|
|
7
7
|
} from '@jbrowse/core/util'
|
|
8
8
|
|
|
9
|
-
import { ChangeManager } from '../../ChangeManager'
|
|
10
|
-
import {
|
|
11
|
-
|
|
9
|
+
import { type ChangeManager } from '../../ChangeManager'
|
|
10
|
+
import {
|
|
11
|
+
AddChildFeature,
|
|
12
|
+
CopyFeature,
|
|
13
|
+
DeleteFeature,
|
|
14
|
+
MergeExons,
|
|
15
|
+
MergeTranscripts,
|
|
16
|
+
SplitExon,
|
|
17
|
+
} from '../../components'
|
|
18
|
+
import { type ApolloSessionModel } from '../../session'
|
|
12
19
|
import { getApolloInternetAccount } from '../../util'
|
|
13
20
|
|
|
14
21
|
export function featureContextMenuItems(
|
|
@@ -19,6 +26,8 @@ export function featureContextMenuItems(
|
|
|
19
26
|
setSelectedFeature: (f: AnnotationFeature | undefined) => void,
|
|
20
27
|
session: ApolloSessionModel,
|
|
21
28
|
changeManager: ChangeManager,
|
|
29
|
+
filteredTranscripts: string[],
|
|
30
|
+
updateFilteredTranscripts: (forms: string[]) => void,
|
|
22
31
|
) {
|
|
23
32
|
const internetAccount = getApolloInternetAccount(session)
|
|
24
33
|
const role = internetAccount ? internetAccount.role : 'admin'
|
|
@@ -26,6 +35,7 @@ export function featureContextMenuItems(
|
|
|
26
35
|
const readOnly = !(role && ['admin', 'user'].includes(role))
|
|
27
36
|
const menuItems: MenuItem[] = []
|
|
28
37
|
if (feature) {
|
|
38
|
+
const featureID = feature.attributes.get('gff_id')?.toString()
|
|
29
39
|
const sourceAssemblyId = getAssemblyId(region.assemblyName)
|
|
30
40
|
const currentAssemblyId = getAssemblyId(region.assemblyName)
|
|
31
41
|
menuItems.push(
|
|
@@ -111,6 +121,72 @@ export function featureContextMenuItems(
|
|
|
111
121
|
)
|
|
112
122
|
},
|
|
113
123
|
},
|
|
124
|
+
{
|
|
125
|
+
label: 'Merge transcripts',
|
|
126
|
+
disabled: !admin,
|
|
127
|
+
onClick: () => {
|
|
128
|
+
;(session as unknown as AbstractSessionModel).queueDialog(
|
|
129
|
+
(doneCallback) => [
|
|
130
|
+
MergeTranscripts,
|
|
131
|
+
{
|
|
132
|
+
session,
|
|
133
|
+
handleClose: () => {
|
|
134
|
+
doneCallback()
|
|
135
|
+
},
|
|
136
|
+
changeManager,
|
|
137
|
+
sourceFeature: feature,
|
|
138
|
+
sourceAssemblyId: currentAssemblyId,
|
|
139
|
+
selectedFeature,
|
|
140
|
+
setSelectedFeature,
|
|
141
|
+
},
|
|
142
|
+
],
|
|
143
|
+
)
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
label: 'Merge exons',
|
|
148
|
+
disabled: !admin,
|
|
149
|
+
onClick: () => {
|
|
150
|
+
;(session as unknown as AbstractSessionModel).queueDialog(
|
|
151
|
+
(doneCallback) => [
|
|
152
|
+
MergeExons,
|
|
153
|
+
{
|
|
154
|
+
session,
|
|
155
|
+
handleClose: () => {
|
|
156
|
+
doneCallback()
|
|
157
|
+
},
|
|
158
|
+
changeManager,
|
|
159
|
+
sourceFeature: feature,
|
|
160
|
+
sourceAssemblyId: currentAssemblyId,
|
|
161
|
+
selectedFeature,
|
|
162
|
+
setSelectedFeature,
|
|
163
|
+
},
|
|
164
|
+
],
|
|
165
|
+
)
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
label: 'Split exon',
|
|
170
|
+
disabled: !admin,
|
|
171
|
+
onClick: () => {
|
|
172
|
+
;(session as unknown as AbstractSessionModel).queueDialog(
|
|
173
|
+
(doneCallback) => [
|
|
174
|
+
SplitExon,
|
|
175
|
+
{
|
|
176
|
+
session,
|
|
177
|
+
handleClose: () => {
|
|
178
|
+
doneCallback()
|
|
179
|
+
},
|
|
180
|
+
changeManager,
|
|
181
|
+
sourceFeature: feature,
|
|
182
|
+
sourceAssemblyId: currentAssemblyId,
|
|
183
|
+
selectedFeature,
|
|
184
|
+
setSelectedFeature,
|
|
185
|
+
},
|
|
186
|
+
],
|
|
187
|
+
)
|
|
188
|
+
},
|
|
189
|
+
},
|
|
114
190
|
)
|
|
115
191
|
const { featureTypeOntology } = session.apolloDataStore.ontologyManager
|
|
116
192
|
if (!featureTypeOntology) {
|
|
@@ -121,22 +197,38 @@ export function featureContextMenuItems(
|
|
|
121
197
|
featureTypeOntology.isTypeOf(feature.type, 'pseudogenic_transcript')) &&
|
|
122
198
|
isSessionModelWithWidgets(session)
|
|
123
199
|
) {
|
|
124
|
-
menuItems.push(
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
200
|
+
menuItems.push(
|
|
201
|
+
{
|
|
202
|
+
label: 'Edit transcript details',
|
|
203
|
+
onClick: () => {
|
|
204
|
+
const apolloTranscriptWidget = session.addWidget(
|
|
205
|
+
'ApolloTranscriptDetails',
|
|
206
|
+
'apolloTranscriptDetails',
|
|
207
|
+
{
|
|
208
|
+
feature,
|
|
209
|
+
assembly: currentAssemblyId,
|
|
210
|
+
changeManager,
|
|
211
|
+
refName: region.refName,
|
|
212
|
+
},
|
|
213
|
+
)
|
|
214
|
+
session.showWidget(apolloTranscriptWidget)
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
label: 'Visible',
|
|
219
|
+
type: 'checkbox',
|
|
220
|
+
checked:
|
|
221
|
+
featureID && filteredTranscripts.includes(featureID) ? false : true,
|
|
222
|
+
onClick: () => {
|
|
223
|
+
if (featureID) {
|
|
224
|
+
const newForms = filteredTranscripts.includes(featureID)
|
|
225
|
+
? filteredTranscripts.filter((form) => form !== featureID)
|
|
226
|
+
: [...filteredTranscripts, featureID]
|
|
227
|
+
updateFilteredTranscripts(newForms)
|
|
228
|
+
}
|
|
229
|
+
},
|
|
138
230
|
},
|
|
139
|
-
|
|
231
|
+
)
|
|
140
232
|
}
|
|
141
233
|
}
|
|
142
234
|
return menuItems
|
|
@@ -3,7 +3,7 @@ import React from 'react'
|
|
|
3
3
|
|
|
4
4
|
import HybridGrid from './HybridGrid'
|
|
5
5
|
import { ToolBar } from './HybridGrid/ToolBar'
|
|
6
|
-
import { DisplayStateModel } from './types'
|
|
6
|
+
import { type DisplayStateModel } from './types'
|
|
7
7
|
|
|
8
8
|
function stopPropagation(e: React.MouseEvent) {
|
|
9
9
|
e.stopPropagation()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Instance, getParent, types } from 'mobx-state-tree'
|
|
1
|
+
import { type Instance, getParent, types } from 'mobx-state-tree'
|
|
2
2
|
|
|
3
|
-
import { DisplayStateModel } from './types'
|
|
3
|
+
import { type DisplayStateModel } from './types'
|
|
4
4
|
|
|
5
5
|
export const TabularEditorStateModelType = types
|
|
6
6
|
.model('TabularEditor', {
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import { LinearApolloDisplay } from '../LinearApolloDisplay/stateModel'
|
|
1
|
+
import { type LinearApolloDisplay } from '../LinearApolloDisplay/stateModel'
|
|
2
|
+
import { type LinearApolloSixFrameDisplay } from '../LinearApolloSixFrameDisplay/stateModel'
|
|
2
3
|
|
|
3
|
-
export type DisplayStateModel =
|
|
4
|
+
export type DisplayStateModel =
|
|
5
|
+
| LinearApolloDisplay
|
|
6
|
+
| LinearApolloSixFrameDisplay
|