@apollo-annotation/jbrowse-plugin-apollo 0.3.5 → 0.3.6
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 +5474 -4937
- package/dist/index.esm.js.map +1 -1
- package/dist/jbrowse-plugin-apollo.cjs.development.js +4609 -4089
- 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 +3634 -3500
- 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 +5 -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 +5 -5
- 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 +210 -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 +3 -3
- package/src/FeatureDetailsWidget/TranscriptWidgetEditLocation.tsx +21 -21
- package/src/FeatureDetailsWidget/TranscriptWidgetSummary.tsx +4 -4
- package/src/FeatureDetailsWidget/model.ts +8 -3
- package/src/LinearApolloDisplay/components/LinearApolloDisplay.tsx +6 -6
- package/src/LinearApolloDisplay/glyphs/BoxGlyph.ts +13 -14
- package/src/LinearApolloDisplay/glyphs/GeneGlyph.ts +9 -9
- package/src/LinearApolloDisplay/glyphs/GenericChildGlyph.ts +6 -5
- package/src/LinearApolloDisplay/glyphs/Glyph.ts +7 -7
- package/src/LinearApolloDisplay/stateModel/base.ts +52 -10
- package/src/LinearApolloDisplay/stateModel/index.ts +4 -3
- package/src/LinearApolloDisplay/stateModel/layouts.ts +8 -39
- package/src/LinearApolloDisplay/stateModel/mouseEvents.ts +13 -12
- package/src/LinearApolloDisplay/stateModel/rendering.ts +59 -31
- package/src/LinearApolloSixFrameDisplay/components/LinearApolloSixFrameDisplay.tsx +221 -0
- package/src/LinearApolloSixFrameDisplay/components/TrackLines.tsx +40 -0
- package/src/LinearApolloSixFrameDisplay/components/index.ts +2 -0
- package/src/LinearApolloSixFrameDisplay/configSchema.ts +7 -0
- package/src/LinearApolloSixFrameDisplay/glyphs/GeneGlyph.ts +821 -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 +261 -0
- package/src/LinearApolloSixFrameDisplay/stateModel/index.ts +27 -0
- package/src/LinearApolloSixFrameDisplay/stateModel/layouts.ts +236 -0
- package/src/LinearApolloSixFrameDisplay/stateModel/mouseEvents.ts +349 -0
- package/src/LinearApolloSixFrameDisplay/stateModel/rendering.ts +199 -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 +8 -6
- package/src/OntologyManager/util.ts +3 -2
- package/src/TabularEditor/HybridGrid/ChangeHandling.ts +2 -2
- package/src/TabularEditor/HybridGrid/Feature.tsx +9 -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 +6 -6
- 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/AddChildFeature.tsx +6 -5
- package/src/components/AddFeature.tsx +211 -38
- package/src/components/AddRefSeqAliases.tsx +14 -12
- package/src/components/CopyFeature.tsx +8 -7
- package/src/components/CreateApolloAnnotation.tsx +9 -8
- package/src/components/DeleteAssembly.tsx +9 -8
- package/src/components/DeleteFeature.tsx +5 -4
- package/src/components/Dialog.tsx +1 -1
- package/src/components/DownloadGFF3.tsx +11 -10
- package/src/components/FilterFeatures.tsx +6 -4
- 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/OntologyTermAutocomplete.tsx +5 -5
- package/src/components/OntologyTermMultiSelect.tsx +6 -6
- package/src/components/OpenLocalFile.tsx +4 -3
- package/src/components/ViewChangeLog.tsx +7 -6
- package/src/components/ViewCheckResults.tsx +8 -7
- package/src/extensions/annotationFromJBrowseFeature.test.ts +1 -0
- package/src/extensions/annotationFromJBrowseFeature.ts +11 -10
- package/src/extensions/annotationFromPileup.ts +6 -6
- package/src/index.ts +33 -50
- package/src/makeDisplayComponent.tsx +90 -37
- package/src/session/ClientDataStore.ts +21 -17
- package/src/session/session.ts +20 -26
- package/src/types.ts +4 -4
- package/src/util/annotationFeatureUtils.ts +1 -1
- package/src/util/index.ts +3 -3
- package/src/util/loadAssemblyIntoClient.ts +10 -3
- 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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apollo-annotation/jbrowse-plugin-apollo",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"description": "Apollo plugin for JBrowse 2",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@apollo-annotation/common": "^0.3.
|
|
52
|
-
"@apollo-annotation/mst": "^0.3.
|
|
53
|
-
"@apollo-annotation/shared": "^0.3.
|
|
51
|
+
"@apollo-annotation/common": "^0.3.6",
|
|
52
|
+
"@apollo-annotation/mst": "^0.3.6",
|
|
53
|
+
"@apollo-annotation/shared": "^0.3.6",
|
|
54
54
|
"@emotion/react": "^11.10.6",
|
|
55
55
|
"@emotion/styled": "^11.10.6",
|
|
56
56
|
"@gmod/gff": "1.2.0",
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
type AbstractMenuManager,
|
|
3
|
+
type AbstractSessionModel,
|
|
4
|
+
} from '@jbrowse/core/util'
|
|
2
5
|
|
|
3
6
|
import {
|
|
4
7
|
AddAssembly,
|
|
@@ -7,7 +10,7 @@ import {
|
|
|
7
10
|
ImportFeatures,
|
|
8
11
|
ManageUsers,
|
|
9
12
|
} from '../components'
|
|
10
|
-
import { ApolloSessionModel } from '../session'
|
|
13
|
+
import { type ApolloSessionModel } from '../session'
|
|
11
14
|
|
|
12
15
|
export function addMenuItems(rootModel: AbstractMenuManager) {
|
|
13
16
|
rootModel.appendToMenu('Apollo', {
|
|
@@ -12,6 +12,7 @@ import { makeStyles } from 'tss-react/mui'
|
|
|
12
12
|
|
|
13
13
|
import { Dialog } from '../../components/Dialog'
|
|
14
14
|
import { createFetchErrorMessage } from '../../util'
|
|
15
|
+
|
|
15
16
|
import { GoogleButton, GuestButton, MicrosoftButton } from './LoginButtons'
|
|
16
17
|
|
|
17
18
|
const useStyles = makeStyles()((theme) => ({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration'
|
|
2
2
|
import { BaseInternetAccountConfig } from '@jbrowse/core/pluggableElementTypes'
|
|
3
|
-
import { Instance } from 'mobx-state-tree'
|
|
3
|
+
import { type Instance } from 'mobx-state-tree'
|
|
4
4
|
|
|
5
5
|
const ApolloConfigSchema = ConfigurationSchema(
|
|
6
6
|
'ApolloInternetAccount',
|
|
@@ -7,31 +7,32 @@
|
|
|
7
7
|
/* eslint-disable @typescript-eslint/no-misused-promises */
|
|
8
8
|
import { Change } from '@apollo-annotation/common'
|
|
9
9
|
import {
|
|
10
|
-
ChangeMessage,
|
|
11
|
-
CheckResultUpdate,
|
|
12
|
-
RequestUserInformationMessage,
|
|
13
|
-
UserLocation,
|
|
14
|
-
UserLocationMessage,
|
|
10
|
+
type ChangeMessage,
|
|
11
|
+
type CheckResultUpdate,
|
|
12
|
+
type RequestUserInformationMessage,
|
|
13
|
+
type UserLocation,
|
|
14
|
+
type UserLocationMessage,
|
|
15
15
|
getDecodedToken,
|
|
16
16
|
makeUserSessionId,
|
|
17
17
|
} from '@apollo-annotation/shared'
|
|
18
18
|
import { ConfigurationReference, getConf } from '@jbrowse/core/configuration'
|
|
19
19
|
import { InternetAccount } from '@jbrowse/core/pluggableElementTypes'
|
|
20
20
|
import {
|
|
21
|
-
AbstractSessionModel,
|
|
21
|
+
type AbstractSessionModel,
|
|
22
22
|
isAbstractMenuManager,
|
|
23
23
|
isElectron,
|
|
24
24
|
} from '@jbrowse/core/util'
|
|
25
25
|
import { autorun } from 'mobx'
|
|
26
|
-
import { Instance, flow, getRoot, types } from 'mobx-state-tree'
|
|
26
|
+
import { type Instance, flow, getRoot, types } from 'mobx-state-tree'
|
|
27
27
|
import { io } from 'socket.io-client'
|
|
28
28
|
|
|
29
|
-
import { Collaborator } from '../session'
|
|
30
|
-
import { ApolloRootModel } from '../types'
|
|
29
|
+
import { type Collaborator } from '../session'
|
|
30
|
+
import { type ApolloRootModel } from '../types'
|
|
31
31
|
import { createFetchErrorMessage } from '../util'
|
|
32
|
+
|
|
32
33
|
import { addMenuItems } from './addMenuItems'
|
|
33
34
|
import { AuthTypeSelector } from './components/AuthTypeSelector'
|
|
34
|
-
import { ApolloInternetAccountConfigModel } from './configSchema'
|
|
35
|
+
import { type ApolloInternetAccountConfigModel } from './configSchema'
|
|
35
36
|
|
|
36
37
|
type AuthType = 'google' | 'microsoft' | 'guest'
|
|
37
38
|
|
package/src/ApolloJobModel.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { readConfObject } from '@jbrowse/core/configuration'
|
|
2
2
|
import {
|
|
3
|
-
BaseRefNameAliasAdapter,
|
|
4
3
|
BaseAdapter,
|
|
4
|
+
type BaseRefNameAliasAdapter,
|
|
5
5
|
} from '@jbrowse/core/data_adapters/BaseAdapter'
|
|
6
|
-
import
|
|
7
|
-
import { ApolloSessionModel } from '../session'
|
|
8
|
-
import { BackendDriver } from '../BackendDrivers'
|
|
6
|
+
import type RpcServer from 'librpc-web-mod/dist/server'
|
|
9
7
|
import { nanoid } from 'nanoid'
|
|
10
|
-
|
|
8
|
+
|
|
9
|
+
import { type BackendDriver } from '../BackendDrivers'
|
|
10
|
+
import { type ApolloSessionModel } from '../session'
|
|
11
|
+
|
|
12
|
+
import { type RefNameAliases } from './../BackendDrivers/BackendDriver'
|
|
11
13
|
|
|
12
14
|
declare global {
|
|
13
15
|
const rpcServer: RpcServer
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager'
|
|
1
2
|
import AdapterType from '@jbrowse/core/pluggableElementTypes/AdapterType'
|
|
2
|
-
import PluginManager from '@jbrowse/core/PluginManager'
|
|
3
3
|
|
|
4
|
-
import configSchema from './configSchema'
|
|
5
4
|
import ApolloRefNameAliasAdapter from './ApolloRefNameAliasAdapter'
|
|
5
|
+
import configSchema from './configSchema'
|
|
6
6
|
|
|
7
7
|
export function installApolloRefNameAliasAdapter(pluginManager: PluginManager) {
|
|
8
8
|
pluginManager.addAdapterType(
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
import { readConfObject } from '@jbrowse/core/configuration'
|
|
7
7
|
import { BaseSequenceAdapter } from '@jbrowse/core/data_adapters/BaseAdapter'
|
|
8
8
|
import { ObservableCreate } from '@jbrowse/core/util/rxjs'
|
|
9
|
-
import SimpleFeature, { Feature } from '@jbrowse/core/util/simpleFeature'
|
|
10
|
-
import { NoAssemblyRegion, Region } from '@jbrowse/core/util/types'
|
|
9
|
+
import SimpleFeature, { type Feature } from '@jbrowse/core/util/simpleFeature'
|
|
10
|
+
import { type NoAssemblyRegion, type Region } from '@jbrowse/core/util/types'
|
|
11
11
|
import { nanoid } from 'nanoid'
|
|
12
12
|
|
|
13
|
-
import { BackendDriver } from '../BackendDrivers'
|
|
14
|
-
import { ApolloSessionModel } from '../session'
|
|
13
|
+
import { type BackendDriver } from '../BackendDrivers'
|
|
14
|
+
import { type ApolloSessionModel } from '../session'
|
|
15
15
|
|
|
16
16
|
// declare global {
|
|
17
17
|
// var rpcServer: import('librpc-web-mod').RpcServer
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager'
|
|
1
2
|
import AdapterType from '@jbrowse/core/pluggableElementTypes/AdapterType'
|
|
2
|
-
import PluginManager from '@jbrowse/core/PluginManager'
|
|
3
3
|
|
|
4
4
|
import { ApolloSequenceAdapter } from './ApolloSequenceAdapter'
|
|
5
5
|
import configSchema from './configSchema'
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { AnnotationFeatureSnapshot } from '@apollo-annotation/mst'
|
|
1
|
+
import { type AnnotationFeatureSnapshot } from '@apollo-annotation/mst'
|
|
2
|
+
import BaseResult from '@jbrowse/core/TextSearch/BaseResults'
|
|
3
|
+
import { type Assembly } from '@jbrowse/core/assemblyManager/assembly'
|
|
2
4
|
import { readConfObject } from '@jbrowse/core/configuration'
|
|
3
5
|
import {
|
|
4
6
|
BaseAdapter,
|
|
5
|
-
BaseTextSearchAdapter,
|
|
6
|
-
BaseTextSearchArgs,
|
|
7
|
+
type BaseTextSearchAdapter,
|
|
8
|
+
type BaseTextSearchArgs,
|
|
7
9
|
} from '@jbrowse/core/data_adapters/BaseAdapter'
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
import { ApolloSessionModel } from '../session'
|
|
11
|
-
import { Assembly } from '@jbrowse/core/assemblyManager/assembly'
|
|
10
|
+
import { type AbstractSessionModel, type UriLocation } from '@jbrowse/core/util'
|
|
11
|
+
|
|
12
|
+
import { type ApolloSessionModel } from '../session'
|
|
12
13
|
|
|
13
14
|
export class ApolloTextSearchAdapter
|
|
14
15
|
extends BaseAdapter
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type PluginManager from '@jbrowse/core/PluginManager'
|
|
1
2
|
import { TextSearchAdapterType } from '@jbrowse/core/pluggableElementTypes'
|
|
2
|
-
import PluginManager from '@jbrowse/core/PluginManager'
|
|
3
3
|
|
|
4
4
|
import { ApolloTextSearchAdapter } from './ApolloTextSearchAdapter'
|
|
5
5
|
import configSchema from './configSchema'
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Change, ClientDataStore } from '@apollo-annotation/common'
|
|
1
|
+
import { type Change, type ClientDataStore } from '@apollo-annotation/common'
|
|
2
2
|
import {
|
|
3
|
-
AnnotationFeatureSnapshot,
|
|
4
|
-
CheckResultSnapshot,
|
|
3
|
+
type AnnotationFeatureSnapshot,
|
|
4
|
+
type CheckResultSnapshot,
|
|
5
5
|
} from '@apollo-annotation/mst'
|
|
6
|
-
import { ValidationResultSet } from '@apollo-annotation/shared'
|
|
7
|
-
import { Assembly } from '@jbrowse/core/assemblyManager/assembly'
|
|
8
|
-
import { Region } from '@jbrowse/core/util'
|
|
6
|
+
import { type ValidationResultSet } from '@apollo-annotation/shared'
|
|
7
|
+
import { type Assembly } from '@jbrowse/core/assemblyManager/assembly'
|
|
8
|
+
import { type Region } from '@jbrowse/core/util'
|
|
9
9
|
|
|
10
|
-
import { SubmitOpts } from '../ChangeManager'
|
|
10
|
+
import { type SubmitOpts } from '../ChangeManager'
|
|
11
11
|
|
|
12
12
|
export interface RefNameAliases {
|
|
13
13
|
refName: string
|
|
@@ -4,21 +4,25 @@
|
|
|
4
4
|
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
5
5
|
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
|
6
6
|
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
7
|
-
import { AssemblySpecificChange, Change } from '@apollo-annotation/common'
|
|
7
|
+
import { type AssemblySpecificChange, Change } from '@apollo-annotation/common'
|
|
8
8
|
import {
|
|
9
|
-
AnnotationFeatureSnapshot,
|
|
10
|
-
ApolloRefSeqI,
|
|
11
|
-
CheckResultSnapshot,
|
|
9
|
+
type AnnotationFeatureSnapshot,
|
|
10
|
+
type ApolloRefSeqI,
|
|
11
|
+
type CheckResultSnapshot,
|
|
12
12
|
} from '@apollo-annotation/mst'
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
type ChangeMessage,
|
|
15
|
+
ValidationResultSet,
|
|
16
|
+
} from '@apollo-annotation/shared'
|
|
14
17
|
import { getConf } from '@jbrowse/core/configuration'
|
|
15
|
-
import { BaseInternetAccountModel } from '@jbrowse/core/pluggableElementTypes'
|
|
16
|
-
import { Region, getSession } from '@jbrowse/core/util'
|
|
17
|
-
import { Socket } from 'socket.io-client'
|
|
18
|
+
import { type BaseInternetAccountModel } from '@jbrowse/core/pluggableElementTypes'
|
|
19
|
+
import { type Region, getSession } from '@jbrowse/core/util'
|
|
20
|
+
import { type Socket } from 'socket.io-client'
|
|
18
21
|
|
|
19
|
-
import { ChangeManager, SubmitOpts } from '../ChangeManager'
|
|
22
|
+
import { ChangeManager, type SubmitOpts } from '../ChangeManager'
|
|
20
23
|
import { createFetchErrorMessage } from '../util'
|
|
21
|
-
|
|
24
|
+
|
|
25
|
+
import { BackendDriver, type RefNameAliases } from './BackendDriver'
|
|
22
26
|
|
|
23
27
|
export interface ApolloRefSeqResponse {
|
|
24
28
|
_id: string
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/require-await */
|
|
2
2
|
import {
|
|
3
|
-
AssemblySpecificChange,
|
|
4
|
-
Change,
|
|
3
|
+
type AssemblySpecificChange,
|
|
4
|
+
type Change,
|
|
5
5
|
isAssemblySpecificChange,
|
|
6
6
|
} from '@apollo-annotation/common'
|
|
7
7
|
import {
|
|
8
|
-
AnnotationFeatureSnapshot,
|
|
9
|
-
CheckResultSnapshot,
|
|
8
|
+
type AnnotationFeatureSnapshot,
|
|
9
|
+
type CheckResultSnapshot,
|
|
10
10
|
} from '@apollo-annotation/mst'
|
|
11
11
|
import {
|
|
12
|
-
annotationFeatureToGFF3,
|
|
13
12
|
ValidationResultSet,
|
|
13
|
+
annotationFeatureToGFF3,
|
|
14
14
|
splitStringIntoChunks,
|
|
15
15
|
} from '@apollo-annotation/shared'
|
|
16
|
-
import gff, { GFF3Item } from '@gmod/gff'
|
|
16
|
+
import gff, { type GFF3Item } from '@gmod/gff'
|
|
17
17
|
import { getConf } from '@jbrowse/core/configuration'
|
|
18
|
-
import { Region, getSession } from '@jbrowse/core/util'
|
|
18
|
+
import { type Region, getSession } from '@jbrowse/core/util'
|
|
19
19
|
import { getSnapshot } from 'mobx-state-tree'
|
|
20
20
|
|
|
21
21
|
import { checkFeatures, loadAssemblyIntoClient } from '../util'
|
|
22
|
-
|
|
22
|
+
|
|
23
|
+
import { BackendDriver, type RefNameAliases } from './BackendDriver'
|
|
23
24
|
|
|
24
25
|
export class DesktopFileDriver extends BackendDriver {
|
|
25
26
|
async loadAssembly(assemblyName: string) {
|
|
@@ -32,7 +33,7 @@ export class DesktopFileDriver extends BackendDriver {
|
|
|
32
33
|
file: string
|
|
33
34
|
}
|
|
34
35
|
|
|
35
|
-
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/consistent-type-imports
|
|
36
37
|
const fs = require('node:fs') as typeof import('fs')
|
|
37
38
|
const fileContents = await fs.promises.readFile(file, 'utf8')
|
|
38
39
|
return loadAssemblyIntoClient(assemblyName, fileContents, this.clientStore)
|
|
@@ -166,7 +167,7 @@ export class DesktopFileDriver extends BackendDriver {
|
|
|
166
167
|
|
|
167
168
|
const gff3Contents = gff.formatSync(gff3Items)
|
|
168
169
|
|
|
169
|
-
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
170
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/consistent-type-imports
|
|
170
171
|
const fs = require('node:fs') as typeof import('fs')
|
|
171
172
|
await fs.promises.writeFile(file, gff3Contents, 'utf8')
|
|
172
173
|
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/require-await */
|
|
2
|
-
import { AssemblySpecificChange, Change } from '@apollo-annotation/common'
|
|
3
2
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
type AssemblySpecificChange,
|
|
4
|
+
type Change,
|
|
5
|
+
} from '@apollo-annotation/common'
|
|
6
|
+
import {
|
|
7
|
+
type AnnotationFeatureSnapshot,
|
|
8
|
+
type CheckResultSnapshot,
|
|
6
9
|
} from '@apollo-annotation/mst'
|
|
7
10
|
import { ValidationResultSet } from '@apollo-annotation/shared'
|
|
8
11
|
import { getConf } from '@jbrowse/core/configuration'
|
|
9
|
-
import { Region, getSession } from '@jbrowse/core/util'
|
|
12
|
+
import { type Region, getSession } from '@jbrowse/core/util'
|
|
10
13
|
|
|
11
|
-
import { SubmitOpts } from '../ChangeManager'
|
|
12
|
-
import { BackendDriver, RefNameAliases } from './BackendDriver'
|
|
14
|
+
import { type SubmitOpts } from '../ChangeManager'
|
|
13
15
|
import { checkFeatures } from '../util'
|
|
14
16
|
|
|
17
|
+
import { BackendDriver, type RefNameAliases } from './BackendDriver'
|
|
18
|
+
|
|
15
19
|
export class InMemoryFileDriver extends BackendDriver {
|
|
16
20
|
async getFeatures(): Promise<
|
|
17
21
|
[AnnotationFeatureSnapshot[], CheckResultSnapshot[]]
|
package/src/ChangeManager.ts
CHANGED
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
|
3
3
|
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
4
4
|
import {
|
|
5
|
-
Change,
|
|
6
|
-
ClientDataStore,
|
|
5
|
+
type Change,
|
|
6
|
+
type ClientDataStore,
|
|
7
7
|
isAssemblySpecificChange,
|
|
8
8
|
} from '@apollo-annotation/common'
|
|
9
9
|
import {
|
|
10
|
-
ValidationResultSet,
|
|
10
|
+
type ValidationResultSet,
|
|
11
11
|
validationRegistry,
|
|
12
12
|
} from '@apollo-annotation/shared'
|
|
13
13
|
import { getSession } from '@jbrowse/core/util'
|
|
14
|
-
import { IAnyStateTreeNode } from 'mobx-state-tree'
|
|
14
|
+
import { type IAnyStateTreeNode } from 'mobx-state-tree'
|
|
15
15
|
|
|
16
|
-
import { ApolloSessionModel } from './session'
|
|
16
|
+
import { type ApolloSessionModel } from './session'
|
|
17
17
|
|
|
18
18
|
export interface SubmitOpts {
|
|
19
19
|
/** defaults to true */
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { getSession } from '@jbrowse/core/util'
|
|
2
|
-
import
|
|
3
|
-
import React, { useEffect, useState } from 'react'
|
|
4
|
-
import { makeStyles } from 'tss-react/mui'
|
|
2
|
+
import ExpandMoreIcon from '@mui/icons-material/ExpandMore'
|
|
5
3
|
import {
|
|
6
4
|
Accordion,
|
|
7
5
|
AccordionDetails,
|
|
8
6
|
AccordionSummary,
|
|
9
7
|
Typography,
|
|
10
8
|
} from '@mui/material'
|
|
11
|
-
import
|
|
9
|
+
import { observer } from 'mobx-react'
|
|
10
|
+
import React, { useEffect, useState } from 'react'
|
|
11
|
+
import { makeStyles } from 'tss-react/mui'
|
|
12
|
+
|
|
13
|
+
import { type ApolloSessionModel } from '../session'
|
|
12
14
|
|
|
13
|
-
import { ApolloSessionModel } from '../session'
|
|
14
15
|
import { Attributes } from './Attributes'
|
|
15
16
|
import { BasicInformation } from './BasicInformation'
|
|
16
|
-
import { ApolloFeatureDetailsWidget as ApolloFeatureDetails } from './model'
|
|
17
|
-
import { Sequence } from './Sequence'
|
|
18
17
|
import { FeatureDetailsNavigation } from './FeatureDetailsNavigation'
|
|
18
|
+
import { Sequence } from './Sequence'
|
|
19
|
+
import { type ApolloFeatureDetailsWidget as ApolloFeatureDetails } from './model'
|
|
19
20
|
|
|
20
21
|
const useStyles = makeStyles()((theme) => ({
|
|
21
22
|
root: {
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { type AnnotationFeature } from '@apollo-annotation/mst'
|
|
2
|
+
import styled from '@emotion/styled'
|
|
3
|
+
import {
|
|
4
|
+
type AbstractSessionModel,
|
|
5
|
+
getEnv,
|
|
6
|
+
getSession,
|
|
7
|
+
} from '@jbrowse/core/util'
|
|
8
|
+
import ExpandMoreIcon from '@mui/icons-material/ExpandMore'
|
|
9
|
+
import InfoIcon from '@mui/icons-material/Info'
|
|
6
10
|
import {
|
|
7
11
|
Accordion,
|
|
8
12
|
AccordionDetails,
|
|
@@ -10,20 +14,25 @@ import {
|
|
|
10
14
|
Tooltip,
|
|
11
15
|
Typography,
|
|
12
16
|
} from '@mui/material'
|
|
17
|
+
import { observer } from 'mobx-react'
|
|
18
|
+
import { getRoot } from 'mobx-state-tree'
|
|
19
|
+
import React, { useEffect, useState } from 'react'
|
|
20
|
+
import { makeStyles } from 'tss-react/mui'
|
|
13
21
|
|
|
14
|
-
import
|
|
15
|
-
|
|
16
|
-
import
|
|
17
|
-
import InfoIcon from '@mui/icons-material/Info'
|
|
22
|
+
import { type ApolloInternetAccountModel } from '../ApolloInternetAccount/model'
|
|
23
|
+
import { type ApolloSessionModel } from '../session'
|
|
24
|
+
import { type ApolloRootModel } from '../types'
|
|
18
25
|
|
|
19
|
-
import { ApolloInternetAccountModel } from '../ApolloInternetAccount/model'
|
|
20
|
-
import { ApolloSessionModel } from '../session'
|
|
21
|
-
import { ApolloRootModel } from '../types'
|
|
22
26
|
import { Attributes } from './Attributes'
|
|
23
27
|
import { TranscriptSequence } from './TranscriptSequence'
|
|
24
|
-
import { ApolloTranscriptDetailsWidget as ApolloTranscriptDetailsWidgetState } from './model'
|
|
25
|
-
import { TranscriptWidgetSummary } from './TranscriptWidgetSummary'
|
|
26
28
|
import { TranscriptWidgetEditLocation } from './TranscriptWidgetEditLocation'
|
|
29
|
+
import { TranscriptWidgetSummary } from './TranscriptWidgetSummary'
|
|
30
|
+
import { type ApolloTranscriptDetailsWidget as ApolloTranscriptDetailsWidgetState } from './model'
|
|
31
|
+
|
|
32
|
+
interface CustomComponentProps {
|
|
33
|
+
session: AbstractSessionModel
|
|
34
|
+
feature: AnnotationFeature
|
|
35
|
+
}
|
|
27
36
|
|
|
28
37
|
const useStyles = makeStyles()((theme) => ({
|
|
29
38
|
root: {
|
|
@@ -40,6 +49,10 @@ export const StyledAccordionSummary = styled(AccordionSummary)(() => ({
|
|
|
40
49
|
},
|
|
41
50
|
}))
|
|
42
51
|
|
|
52
|
+
function NoOpCustomComponent(_props: CustomComponentProps) {
|
|
53
|
+
return null
|
|
54
|
+
}
|
|
55
|
+
|
|
43
56
|
export const ApolloTranscriptDetailsWidget = observer(
|
|
44
57
|
function ApolloTranscriptDetails(props: {
|
|
45
58
|
model: ApolloTranscriptDetailsWidgetState
|
|
@@ -57,6 +70,7 @@ export const ApolloTranscriptDetailsWidget = observer(
|
|
|
57
70
|
}, [feature])
|
|
58
71
|
|
|
59
72
|
const session = getSession(model) as unknown as AbstractSessionModel
|
|
73
|
+
const { pluginManager } = getEnv(session)
|
|
60
74
|
const apolloSession = getSession(model) as unknown as ApolloSessionModel
|
|
61
75
|
const currentAssembly =
|
|
62
76
|
apolloSession.apolloDataStore.assemblies.get(assembly)
|
|
@@ -92,6 +106,12 @@ export const ApolloTranscriptDetailsWidget = observer(
|
|
|
92
106
|
}
|
|
93
107
|
}
|
|
94
108
|
|
|
109
|
+
const CustomComponent = pluginManager.evaluateExtensionPoint(
|
|
110
|
+
'Apollo-TranscriptDetailsCustomComponent',
|
|
111
|
+
NoOpCustomComponent,
|
|
112
|
+
props,
|
|
113
|
+
) as React.ElementType<CustomComponentProps>
|
|
114
|
+
|
|
95
115
|
return (
|
|
96
116
|
<div className={classes.root}>
|
|
97
117
|
<Accordion
|
|
@@ -113,6 +133,7 @@ export const ApolloTranscriptDetailsWidget = observer(
|
|
|
113
133
|
<TranscriptWidgetSummary feature={feature} refName={refName} />
|
|
114
134
|
</AccordionDetails>
|
|
115
135
|
</Accordion>
|
|
136
|
+
<CustomComponent session={session} feature={feature} />
|
|
116
137
|
<Accordion
|
|
117
138
|
style={{ marginTop: 5 }}
|
|
118
139
|
expanded={panelState.includes('location')}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import {
|
|
2
|
+
gffInternalToColumn,
|
|
3
|
+
internalToGFF,
|
|
4
|
+
isGFFColumnInternal,
|
|
5
|
+
isGFFInternalAttribute,
|
|
6
|
+
} from '@apollo-annotation/shared'
|
|
7
|
+
import InfoIcon from '@mui/icons-material/Info'
|
|
8
|
+
import { Chip, Tooltip, Typography } from '@mui/material'
|
|
9
|
+
import React from 'react'
|
|
10
|
+
import { makeStyles } from 'tss-react/mui'
|
|
11
|
+
|
|
12
|
+
const useStyles = makeStyles()((theme) => ({
|
|
13
|
+
attributeKey: {
|
|
14
|
+
fontWeight: 'bold',
|
|
15
|
+
marginRight: theme.spacing(2),
|
|
16
|
+
},
|
|
17
|
+
}))
|
|
18
|
+
|
|
19
|
+
export function AttributeKey({ attributeKey: key }: { attributeKey: string }) {
|
|
20
|
+
const { classes } = useStyles()
|
|
21
|
+
|
|
22
|
+
const startsWithCapital = /^[A-Z]/.test(key)
|
|
23
|
+
let displayKey = key
|
|
24
|
+
let titleText: string | undefined
|
|
25
|
+
if (isGFFInternalAttribute(key)) {
|
|
26
|
+
displayKey = internalToGFF[key]
|
|
27
|
+
titleText = `On GFF3 export, this will be assigned to the GFF3's reserved "${displayKey}" attribute`
|
|
28
|
+
} else if (isGFFColumnInternal(key)) {
|
|
29
|
+
displayKey = gffInternalToColumn[key]
|
|
30
|
+
titleText = `On GFF3 export, this will be placed in the GFF3's "${displayKey}" column`
|
|
31
|
+
} else if (startsWithCapital) {
|
|
32
|
+
titleText =
|
|
33
|
+
'On GFF3 export, this attribute will be changed to start with a lower-case letter because attributes starting with an upper-case letter are reserved in GFF3'
|
|
34
|
+
}
|
|
35
|
+
return (
|
|
36
|
+
<div style={{ display: 'flex' }}>
|
|
37
|
+
<Typography className={classes.attributeKey}>{displayKey}</Typography>
|
|
38
|
+
{titleText ? (
|
|
39
|
+
<Tooltip title={titleText}>
|
|
40
|
+
<Chip
|
|
41
|
+
icon={<InfoIcon />}
|
|
42
|
+
label="GFF3"
|
|
43
|
+
size="small"
|
|
44
|
+
variant="outlined"
|
|
45
|
+
/>
|
|
46
|
+
</Tooltip>
|
|
47
|
+
) : null}
|
|
48
|
+
</div>
|
|
49
|
+
)
|
|
50
|
+
}
|