@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
|
@@ -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,20 @@ 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
18
|
types,
|
|
19
19
|
} from 'mobx-state-tree'
|
|
20
|
-
|
|
21
|
-
import
|
|
20
|
+
|
|
21
|
+
import type ApolloPluginConfigurationSchema from '../config'
|
|
22
|
+
import { type ApolloRootModel } from '../types'
|
|
23
|
+
|
|
24
|
+
import OntologyStore, { type OntologyStoreOptions } from './OntologyStore'
|
|
25
|
+
import { type OntologyDBNode } from './OntologyStore/indexeddb-schema'
|
|
22
26
|
import { applyPrefixes, expandPrefixes } from './OntologyStore/prefixes'
|
|
23
|
-
import ApolloPluginConfigurationSchema from '../config'
|
|
24
|
-
import { ApolloRootModel } from '../types'
|
|
25
27
|
|
|
26
28
|
export { isDeprecated } from './OntologyStore/indexeddb-schema'
|
|
27
29
|
|
|
@@ -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: {
|
|
@@ -132,6 +133,7 @@ export const Feature = observer(function Feature({
|
|
|
132
133
|
displayState.setApolloHover({
|
|
133
134
|
feature,
|
|
134
135
|
topLevelFeature: getTopLevelFeature(feature),
|
|
136
|
+
// @ts-expect-error TODO fix in future when moving hover logic to session.
|
|
135
137
|
glyph: displayState.getGlyph(getTopLevelFeature(feature)),
|
|
136
138
|
})
|
|
137
139
|
}}
|
|
@@ -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,14 @@
|
|
|
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'
|
|
9
|
+
import { type ChangeManager } from '../../ChangeManager'
|
|
10
10
|
import { AddChildFeature, CopyFeature, DeleteFeature } from '../../components'
|
|
11
|
-
import { ApolloSessionModel } from '../../session'
|
|
11
|
+
import { type ApolloSessionModel } from '../../session'
|
|
12
12
|
import { getApolloInternetAccount } from '../../util'
|
|
13
13
|
|
|
14
14
|
export function featureContextMenuItems(
|
|
@@ -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
|
|
@@ -9,49 +9,46 @@ import {
|
|
|
9
9
|
AddAssemblyFromFileChange,
|
|
10
10
|
} from '@apollo-annotation/shared'
|
|
11
11
|
import { readConfObject } from '@jbrowse/core/configuration'
|
|
12
|
-
import { AbstractSessionModel } from '@jbrowse/core/util'
|
|
12
|
+
import { type AbstractSessionModel } from '@jbrowse/core/util'
|
|
13
|
+
import InfoIcon from '@mui/icons-material/Info'
|
|
14
|
+
import LinkIcon from '@mui/icons-material/Link'
|
|
15
|
+
import RadioButtonCheckedIcon from '@mui/icons-material/RadioButtonChecked'
|
|
16
|
+
import RadioButtonUncheckedIcon from '@mui/icons-material/RadioButtonUnchecked'
|
|
13
17
|
import {
|
|
18
|
+
Accordion,
|
|
19
|
+
AccordionDetails,
|
|
20
|
+
AccordionSummary,
|
|
21
|
+
Box,
|
|
14
22
|
Button,
|
|
23
|
+
Checkbox,
|
|
15
24
|
DialogActions,
|
|
16
25
|
DialogContent,
|
|
17
26
|
DialogContentText,
|
|
18
|
-
Accordion,
|
|
19
|
-
AccordionSummary,
|
|
20
|
-
AccordionDetails,
|
|
21
|
-
Typography,
|
|
22
|
-
Box,
|
|
23
|
-
FormGroup,
|
|
24
27
|
FormControlLabel,
|
|
25
|
-
|
|
26
|
-
LinearProgress,
|
|
27
|
-
TextField,
|
|
28
|
-
Tooltip,
|
|
28
|
+
FormGroup,
|
|
29
29
|
IconButton,
|
|
30
|
+
InputAdornment,
|
|
31
|
+
LinearProgress,
|
|
30
32
|
Table,
|
|
31
|
-
TableCell,
|
|
32
33
|
TableBody,
|
|
33
|
-
|
|
34
|
+
TableCell,
|
|
34
35
|
TableRow,
|
|
36
|
+
TextField,
|
|
37
|
+
Tooltip,
|
|
38
|
+
Typography,
|
|
35
39
|
} from '@mui/material'
|
|
36
|
-
|
|
37
|
-
import { makeStyles } from 'tss-react/mui'
|
|
38
|
-
|
|
39
40
|
import ObjectID from 'bson-objectid'
|
|
40
41
|
import { getRoot } from 'mobx-state-tree'
|
|
41
42
|
import React, { useEffect, useState } from 'react'
|
|
43
|
+
import { makeStyles } from 'tss-react/mui'
|
|
42
44
|
|
|
43
|
-
import { ApolloInternetAccountModel } from '../ApolloInternetAccount/model'
|
|
44
|
-
import { ChangeManager } from '../ChangeManager'
|
|
45
|
-
import { ApolloSessionModel } from '../session'
|
|
46
|
-
import { ApolloRootModel } from '../types'
|
|
45
|
+
import { type ApolloInternetAccountModel } from '../ApolloInternetAccount/model'
|
|
46
|
+
import { type ChangeManager } from '../ChangeManager'
|
|
47
|
+
import { type ApolloSessionModel } from '../session'
|
|
48
|
+
import { type ApolloRootModel } from '../types'
|
|
47
49
|
import { createFetchErrorMessage } from '../util'
|
|
48
|
-
import { Dialog } from './Dialog'
|
|
49
50
|
|
|
50
|
-
import
|
|
51
|
-
import RadioButtonCheckedIcon from '@mui/icons-material/RadioButtonChecked'
|
|
52
|
-
|
|
53
|
-
import InfoIcon from '@mui/icons-material/Info'
|
|
54
|
-
import LinkIcon from '@mui/icons-material/Link'
|
|
51
|
+
import { Dialog } from './Dialog'
|
|
55
52
|
|
|
56
53
|
interface AddAssemblyProps {
|
|
57
54
|
session: ApolloSessionModel
|
|
@@ -518,164 +515,170 @@ export function AddAssembly({
|
|
|
518
515
|
fileType === FileType.GFF3 ? (
|
|
519
516
|
<Table size="small" sx={{ mt: 2 }}>
|
|
520
517
|
<TableBody>
|
|
521
|
-
<TableRow
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
<
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
<
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
518
|
+
<TableRow>
|
|
519
|
+
<TableCell style={{ borderBottomWidth: 0 }}>
|
|
520
|
+
<Box display="flex" alignItems="center">
|
|
521
|
+
<span>FASTA</span>
|
|
522
|
+
<Tooltip title='Unless "Store sequence in database" enabled, FASTA input must be compressed with bgzip and indexed with samtools faidx (or equivalent). Compression is optional for sequences stored in the database.'>
|
|
523
|
+
<IconButton size="small">
|
|
524
|
+
<InfoIcon sx={{ fontSize: 18 }} />
|
|
525
|
+
</IconButton>
|
|
526
|
+
</Tooltip>
|
|
527
|
+
</Box>
|
|
528
|
+
</TableCell>
|
|
529
|
+
<TableCell style={{ borderBottomWidth: 0 }}>
|
|
530
|
+
<input
|
|
531
|
+
data-testid="fasta-input-file"
|
|
532
|
+
type="file"
|
|
533
|
+
onChange={(
|
|
534
|
+
e: React.ChangeEvent<HTMLInputElement>,
|
|
535
|
+
) => {
|
|
536
|
+
setFastaFile(e.target.files?.item(0) ?? null)
|
|
537
|
+
}}
|
|
538
|
+
disabled={submitted && !errorMessage}
|
|
539
|
+
/>
|
|
540
|
+
</TableCell>
|
|
541
|
+
</TableRow>
|
|
542
|
+
|
|
543
|
+
<TableRow>
|
|
544
|
+
<TableCell style={{ borderBottomWidth: 0 }}>
|
|
545
|
+
FASTA index (.fai)
|
|
546
|
+
</TableCell>
|
|
547
|
+
<TableCell style={{ borderBottomWidth: 0 }}>
|
|
548
|
+
<input
|
|
549
|
+
data-testid="fai-input-file"
|
|
550
|
+
type="file"
|
|
551
|
+
onChange={(
|
|
552
|
+
e: React.ChangeEvent<HTMLInputElement>,
|
|
553
|
+
) => {
|
|
554
|
+
setFastaIndexFile(e.target.files?.item(0) ?? null)
|
|
555
|
+
}}
|
|
556
|
+
disabled={
|
|
557
|
+
(submitted && !errorMessage) || sequenceIsEditable
|
|
558
|
+
}
|
|
559
|
+
/>
|
|
560
|
+
</TableCell>
|
|
561
|
+
</TableRow>
|
|
562
|
+
|
|
563
|
+
<TableRow>
|
|
564
|
+
<TableCell style={{ borderBottomWidth: 0 }}>
|
|
565
|
+
FASTA binary index (.gzi)
|
|
566
|
+
</TableCell>
|
|
567
|
+
<TableCell style={{ borderBottomWidth: 0 }}>
|
|
568
|
+
<input
|
|
569
|
+
data-testid="gzi-input-file"
|
|
570
|
+
type="file"
|
|
571
|
+
onChange={(
|
|
572
|
+
e: React.ChangeEvent<HTMLInputElement>,
|
|
573
|
+
) => {
|
|
574
|
+
setFastaGziIndexFile(
|
|
575
|
+
e.target.files?.item(0) ?? null,
|
|
576
|
+
)
|
|
577
|
+
}}
|
|
578
|
+
disabled={
|
|
579
|
+
(submitted && !errorMessage) || sequenceIsEditable
|
|
580
|
+
}
|
|
581
|
+
/>
|
|
582
|
+
</TableCell>
|
|
583
|
+
</TableRow>
|
|
584
584
|
</TableBody>
|
|
585
585
|
</Table>
|
|
586
586
|
) : (
|
|
587
587
|
<Table size="small" sx={{ mt: 2 }}>
|
|
588
588
|
<TableBody>
|
|
589
|
-
<TableRow
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
<
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
<
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
<
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
589
|
+
<TableRow>
|
|
590
|
+
<TableCell style={{ borderBottomWidth: 0 }}>
|
|
591
|
+
<Box display="flex" alignItems="center">
|
|
592
|
+
<span>FASTA</span>
|
|
593
|
+
<Tooltip title="Remote FASTA input must be compressed with bgzip and indexed with samtools faidx (or equivalent)">
|
|
594
|
+
<IconButton size="small">
|
|
595
|
+
<InfoIcon sx={{ fontSize: 18 }} />
|
|
596
|
+
</IconButton>
|
|
597
|
+
</Tooltip>
|
|
598
|
+
</Box>
|
|
599
|
+
</TableCell>
|
|
600
|
+
<TableCell style={{ borderBottomWidth: 0 }}>
|
|
601
|
+
<TextField
|
|
602
|
+
data-testid="fasta-input-url"
|
|
603
|
+
variant="outlined"
|
|
604
|
+
value={fastaUrl}
|
|
605
|
+
error={!validFastaUrl}
|
|
606
|
+
onChange={(
|
|
607
|
+
e: React.ChangeEvent<HTMLInputElement>,
|
|
608
|
+
) => {
|
|
609
|
+
setFastaUrl(e.target.value)
|
|
610
|
+
}}
|
|
611
|
+
disabled={submitted && !errorMessage}
|
|
612
|
+
slotProps={{
|
|
613
|
+
input: {
|
|
614
|
+
startAdornment: (
|
|
615
|
+
<InputAdornment position="start">
|
|
616
|
+
<LinkIcon />
|
|
617
|
+
</InputAdornment>
|
|
618
|
+
),
|
|
619
|
+
},
|
|
620
|
+
}}
|
|
621
|
+
/>
|
|
622
|
+
</TableCell>
|
|
623
|
+
</TableRow>
|
|
624
|
+
|
|
625
|
+
<TableRow>
|
|
626
|
+
<TableCell style={{ borderBottomWidth: 0 }}>
|
|
627
|
+
FASTA index (.fai)
|
|
628
|
+
</TableCell>
|
|
629
|
+
<TableCell style={{ borderBottomWidth: 0 }}>
|
|
630
|
+
<TextField
|
|
631
|
+
data-testid="fai-input-url"
|
|
632
|
+
variant="outlined"
|
|
633
|
+
value={fastaIndexUrl}
|
|
634
|
+
error={!validFastaIndexUrl}
|
|
635
|
+
onChange={(
|
|
636
|
+
e: React.ChangeEvent<HTMLInputElement>,
|
|
637
|
+
) => {
|
|
638
|
+
setFastaIndexUrl(e.target.value)
|
|
639
|
+
}}
|
|
640
|
+
disabled={submitted && !errorMessage}
|
|
641
|
+
slotProps={{
|
|
642
|
+
input: {
|
|
643
|
+
startAdornment: (
|
|
644
|
+
<InputAdornment position="start">
|
|
645
|
+
<LinkIcon />
|
|
646
|
+
</InputAdornment>
|
|
647
|
+
),
|
|
648
|
+
},
|
|
649
|
+
}}
|
|
650
|
+
/>
|
|
651
|
+
</TableCell>
|
|
652
|
+
</TableRow>
|
|
653
|
+
|
|
654
|
+
<TableRow>
|
|
655
|
+
<TableCell style={{ borderBottomWidth: 0 }}>
|
|
656
|
+
FASTA binary index (.gzi)
|
|
657
|
+
</TableCell>
|
|
658
|
+
<TableCell style={{ borderBottomWidth: 0 }}>
|
|
659
|
+
<TextField
|
|
660
|
+
data-testid="gzi-input-url"
|
|
661
|
+
variant="outlined"
|
|
662
|
+
value={fastaGziIndexUrl}
|
|
663
|
+
error={!validFastaGziIndexUrl}
|
|
664
|
+
onChange={(
|
|
665
|
+
e: React.ChangeEvent<HTMLInputElement>,
|
|
666
|
+
) => {
|
|
667
|
+
setFastaGziIndexUrl(e.target.value)
|
|
668
|
+
}}
|
|
669
|
+
disabled={submitted && !errorMessage}
|
|
670
|
+
slotProps={{
|
|
671
|
+
input: {
|
|
672
|
+
startAdornment: (
|
|
673
|
+
<InputAdornment position="start">
|
|
674
|
+
<LinkIcon />
|
|
675
|
+
</InputAdornment>
|
|
676
|
+
),
|
|
677
|
+
},
|
|
678
|
+
}}
|
|
679
|
+
/>
|
|
680
|
+
</TableCell>
|
|
681
|
+
</TableRow>
|
|
679
682
|
</TableBody>
|
|
680
683
|
</Table>
|
|
681
684
|
)}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/unbound-method */
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-misused-promises */
|
|
3
|
-
import { AnnotationFeature } from '@apollo-annotation/mst'
|
|
3
|
+
import { type AnnotationFeature } from '@apollo-annotation/mst'
|
|
4
4
|
import { AddFeatureChange } from '@apollo-annotation/shared'
|
|
5
|
-
import { AbstractSessionModel } from '@jbrowse/core/util'
|
|
5
|
+
import { type AbstractSessionModel } from '@jbrowse/core/util'
|
|
6
6
|
import {
|
|
7
7
|
Button,
|
|
8
8
|
DialogActions,
|
|
@@ -13,11 +13,12 @@ import {
|
|
|
13
13
|
import ObjectID from 'bson-objectid'
|
|
14
14
|
import React, { useState } from 'react'
|
|
15
15
|
|
|
16
|
-
import { ChangeManager } from '../ChangeManager'
|
|
16
|
+
import { type ChangeManager } from '../ChangeManager'
|
|
17
17
|
import { isOntologyClass } from '../OntologyManager'
|
|
18
|
-
import OntologyStore from '../OntologyManager/OntologyStore'
|
|
18
|
+
import type OntologyStore from '../OntologyManager/OntologyStore'
|
|
19
19
|
import { fetchValidDescendantTerms } from '../OntologyManager/util'
|
|
20
|
-
import { ApolloSessionModel } from '../session'
|
|
20
|
+
import { type ApolloSessionModel } from '../session'
|
|
21
|
+
|
|
21
22
|
import { Dialog } from './Dialog'
|
|
22
23
|
import { OntologyTermAutocomplete } from './OntologyTermAutocomplete'
|
|
23
24
|
|