@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.
Files changed (126) hide show
  1. package/dist/index.esm.js +5474 -4937
  2. package/dist/index.esm.js.map +1 -1
  3. package/dist/jbrowse-plugin-apollo.cjs.development.js +4609 -4089
  4. package/dist/jbrowse-plugin-apollo.cjs.development.js.map +1 -1
  5. package/dist/jbrowse-plugin-apollo.cjs.production.min.js +1 -1
  6. package/dist/jbrowse-plugin-apollo.cjs.production.min.js.map +1 -1
  7. package/dist/jbrowse-plugin-apollo.umd.development.js +3634 -3500
  8. package/dist/jbrowse-plugin-apollo.umd.development.js.map +1 -1
  9. package/dist/jbrowse-plugin-apollo.umd.production.min.js +1 -1
  10. package/dist/jbrowse-plugin-apollo.umd.production.min.js.map +1 -1
  11. package/package.json +4 -4
  12. package/src/ApolloInternetAccount/addMenuItems.ts +5 -2
  13. package/src/ApolloInternetAccount/components/AuthTypeSelector.tsx +1 -0
  14. package/src/ApolloInternetAccount/components/LoginButtons.tsx +1 -1
  15. package/src/ApolloInternetAccount/components/LoginIcons.tsx +1 -1
  16. package/src/ApolloInternetAccount/configSchema.ts +1 -1
  17. package/src/ApolloInternetAccount/model.ts +11 -10
  18. package/src/ApolloJobModel.ts +1 -1
  19. package/src/ApolloRefNameAliasAdapter/ApolloRefNameAliasAdapter.ts +8 -6
  20. package/src/ApolloRefNameAliasAdapter/index.ts +2 -2
  21. package/src/ApolloSequenceAdapter/ApolloSequenceAdapter.ts +4 -4
  22. package/src/ApolloSequenceAdapter/index.ts +1 -1
  23. package/src/ApolloTextSearchAdapter/ApolloTextSearchAdapter.ts +8 -7
  24. package/src/ApolloTextSearchAdapter/index.ts +1 -1
  25. package/src/BackendDrivers/BackendDriver.ts +7 -7
  26. package/src/BackendDrivers/CollaborationServerDriver.ts +14 -10
  27. package/src/BackendDrivers/DesktopFileDriver.ts +11 -10
  28. package/src/BackendDrivers/InMemoryFileDriver.ts +10 -6
  29. package/src/ChangeManager.ts +5 -5
  30. package/src/FeatureDetailsWidget/ApolloFeatureDetailsWidget.tsx +8 -7
  31. package/src/FeatureDetailsWidget/ApolloTranscriptDetailsWidget.tsx +35 -14
  32. package/src/FeatureDetailsWidget/AttributeKey.tsx +50 -0
  33. package/src/FeatureDetailsWidget/AttributeKeySelector.tsx +104 -0
  34. package/src/FeatureDetailsWidget/Attributes.tsx +210 -367
  35. package/src/FeatureDetailsWidget/BasicInformation.tsx +6 -5
  36. package/src/FeatureDetailsWidget/DefaultAttributeEditor.tsx +104 -0
  37. package/src/FeatureDetailsWidget/DefaultAttributeViewer.tsx +22 -0
  38. package/src/FeatureDetailsWidget/FeatureDetailsNavigation.tsx +4 -4
  39. package/src/FeatureDetailsWidget/NumberTextField.tsx +1 -1
  40. package/src/FeatureDetailsWidget/Sequence.tsx +2 -2
  41. package/src/FeatureDetailsWidget/StringTextField.tsx +1 -1
  42. package/src/FeatureDetailsWidget/TranscriptSequence.tsx +3 -3
  43. package/src/FeatureDetailsWidget/TranscriptWidgetEditLocation.tsx +21 -21
  44. package/src/FeatureDetailsWidget/TranscriptWidgetSummary.tsx +4 -4
  45. package/src/FeatureDetailsWidget/model.ts +8 -3
  46. package/src/LinearApolloDisplay/components/LinearApolloDisplay.tsx +6 -6
  47. package/src/LinearApolloDisplay/glyphs/BoxGlyph.ts +13 -14
  48. package/src/LinearApolloDisplay/glyphs/GeneGlyph.ts +9 -9
  49. package/src/LinearApolloDisplay/glyphs/GenericChildGlyph.ts +6 -5
  50. package/src/LinearApolloDisplay/glyphs/Glyph.ts +7 -7
  51. package/src/LinearApolloDisplay/stateModel/base.ts +52 -10
  52. package/src/LinearApolloDisplay/stateModel/index.ts +4 -3
  53. package/src/LinearApolloDisplay/stateModel/layouts.ts +8 -39
  54. package/src/LinearApolloDisplay/stateModel/mouseEvents.ts +13 -12
  55. package/src/LinearApolloDisplay/stateModel/rendering.ts +59 -31
  56. package/src/LinearApolloSixFrameDisplay/components/LinearApolloSixFrameDisplay.tsx +221 -0
  57. package/src/LinearApolloSixFrameDisplay/components/TrackLines.tsx +40 -0
  58. package/src/LinearApolloSixFrameDisplay/components/index.ts +2 -0
  59. package/src/LinearApolloSixFrameDisplay/configSchema.ts +7 -0
  60. package/src/LinearApolloSixFrameDisplay/glyphs/GeneGlyph.ts +821 -0
  61. package/src/LinearApolloSixFrameDisplay/glyphs/Glyph.ts +63 -0
  62. package/src/LinearApolloSixFrameDisplay/glyphs/index.ts +1 -0
  63. package/src/LinearApolloSixFrameDisplay/index.ts +2 -0
  64. package/src/LinearApolloSixFrameDisplay/stateModel/base.ts +261 -0
  65. package/src/LinearApolloSixFrameDisplay/stateModel/index.ts +27 -0
  66. package/src/LinearApolloSixFrameDisplay/stateModel/layouts.ts +236 -0
  67. package/src/LinearApolloSixFrameDisplay/stateModel/mouseEvents.ts +349 -0
  68. package/src/LinearApolloSixFrameDisplay/stateModel/rendering.ts +199 -0
  69. package/src/LinearApolloSixFrameDisplay/types.ts +1 -0
  70. package/src/OntologyManager/OntologyStore/fulltext.test.ts +1 -1
  71. package/src/OntologyManager/OntologyStore/fulltext.ts +8 -3
  72. package/src/OntologyManager/OntologyStore/index.test.ts +3 -1
  73. package/src/OntologyManager/OntologyStore/index.ts +19 -14
  74. package/src/OntologyManager/OntologyStore/indexeddb-schema.ts +6 -5
  75. package/src/OntologyManager/OntologyStore/indexeddb-storage.ts +11 -5
  76. package/src/OntologyManager/index.ts +8 -6
  77. package/src/OntologyManager/util.ts +3 -2
  78. package/src/TabularEditor/HybridGrid/ChangeHandling.ts +2 -2
  79. package/src/TabularEditor/HybridGrid/Feature.tsx +9 -7
  80. package/src/TabularEditor/HybridGrid/FeatureAttributes.tsx +1 -1
  81. package/src/TabularEditor/HybridGrid/HybridGrid.tsx +3 -2
  82. package/src/TabularEditor/HybridGrid/ToolBar.tsx +1 -1
  83. package/src/TabularEditor/HybridGrid/featureContextMenuItems.ts +6 -6
  84. package/src/TabularEditor/TabularEditorPane.tsx +1 -1
  85. package/src/TabularEditor/model.ts +2 -2
  86. package/src/TabularEditor/types.ts +5 -2
  87. package/src/components/AddAssembly.tsx +182 -179
  88. package/src/components/AddChildFeature.tsx +6 -5
  89. package/src/components/AddFeature.tsx +211 -38
  90. package/src/components/AddRefSeqAliases.tsx +14 -12
  91. package/src/components/CopyFeature.tsx +8 -7
  92. package/src/components/CreateApolloAnnotation.tsx +9 -8
  93. package/src/components/DeleteAssembly.tsx +9 -8
  94. package/src/components/DeleteFeature.tsx +5 -4
  95. package/src/components/Dialog.tsx +1 -1
  96. package/src/components/DownloadGFF3.tsx +11 -10
  97. package/src/components/FilterFeatures.tsx +6 -4
  98. package/src/components/ImportFeatures.tsx +7 -6
  99. package/src/components/LogOut.tsx +5 -4
  100. package/src/components/ManageChecks.tsx +9 -8
  101. package/src/components/ManageUsers.tsx +11 -10
  102. package/src/components/OntologyTermAutocomplete.tsx +5 -5
  103. package/src/components/OntologyTermMultiSelect.tsx +6 -6
  104. package/src/components/OpenLocalFile.tsx +4 -3
  105. package/src/components/ViewChangeLog.tsx +7 -6
  106. package/src/components/ViewCheckResults.tsx +8 -7
  107. package/src/extensions/annotationFromJBrowseFeature.test.ts +1 -0
  108. package/src/extensions/annotationFromJBrowseFeature.ts +11 -10
  109. package/src/extensions/annotationFromPileup.ts +6 -6
  110. package/src/index.ts +33 -50
  111. package/src/makeDisplayComponent.tsx +90 -37
  112. package/src/session/ClientDataStore.ts +21 -17
  113. package/src/session/session.ts +20 -26
  114. package/src/types.ts +4 -4
  115. package/src/util/annotationFeatureUtils.ts +1 -1
  116. package/src/util/index.ts +3 -3
  117. package/src/util/loadAssemblyIntoClient.ts +10 -3
  118. package/src/ApolloSixFrameRenderer/ApolloSixFrameRenderer.tsx +0 -13
  119. package/src/ApolloSixFrameRenderer/components/ApolloRendering.tsx +0 -707
  120. package/src/ApolloSixFrameRenderer/configSchema.ts +0 -7
  121. package/src/ApolloSixFrameRenderer/index.ts +0 -3
  122. package/src/SixFrameFeatureDisplay/components/TrackLines.tsx +0 -19
  123. package/src/SixFrameFeatureDisplay/components/index.ts +0 -1
  124. package/src/SixFrameFeatureDisplay/configSchema.ts +0 -21
  125. package/src/SixFrameFeatureDisplay/index.ts +0 -2
  126. 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 { IDBPDatabase, IDBPTransaction, openDB } from 'idb/with-async-ittr'
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
- import OntologyStore from '.'
14
- import { defaultTextIndexFields } from '..'
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
- import OntologyStore, { OntologyStoreOptions } from './OntologyStore'
21
- import { OntologyDBNode } from './OntologyStore/indexeddb-schema'
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 { AnnotationFeature } from '@apollo-annotation/mst'
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 { ChangeManager } from '../../ChangeManager'
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 { DisplayStateModel } from '../types'
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 { featureContextMenuItems } from './featureContextMenuItems'
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) => ({
@@ -6,7 +6,7 @@ import { observer } from 'mobx-react'
6
6
  import React from 'react'
7
7
  import { makeStyles } from 'tss-react/mui'
8
8
 
9
- import { DisplayStateModel } from '../types'
9
+ import { type DisplayStateModel } from '../types'
10
10
 
11
11
  const useStyles = makeStyles()({
12
12
  toolbar: {
@@ -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 = LinearApolloDisplay
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
- Checkbox,
26
- LinearProgress,
27
- TextField,
28
- Tooltip,
28
+ FormGroup,
29
29
  IconButton,
30
+ InputAdornment,
31
+ LinearProgress,
30
32
  Table,
31
- TableCell,
32
33
  TableBody,
33
- InputAdornment,
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 RadioButtonUncheckedIcon from '@mui/icons-material/RadioButtonUnchecked'
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
- <TableCell style={{ borderBottomWidth: 0 }}>
523
- <Box display="flex" alignItems="center">
524
- <span>FASTA</span>
525
- <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.'>
526
- <IconButton size="small">
527
- <InfoIcon sx={{ fontSize: 18 }} />
528
- </IconButton>
529
- </Tooltip>
530
- </Box>
531
- </TableCell>
532
- <TableCell style={{ borderBottomWidth: 0 }}>
533
- <input
534
- data-testid="fasta-input-file"
535
- type="file"
536
- onChange={(
537
- e: React.ChangeEvent<HTMLInputElement>,
538
- ) => {
539
- setFastaFile(e.target.files?.item(0) ?? null)
540
- }}
541
- disabled={submitted && !errorMessage}
542
- />
543
- </TableCell>
544
-
545
- <TableRow />
546
- <TableCell style={{ borderBottomWidth: 0 }}>
547
- FASTA index (.fai)
548
- </TableCell>
549
- <TableCell style={{ borderBottomWidth: 0 }}>
550
- <input
551
- data-testid="fai-input-file"
552
- type="file"
553
- onChange={(
554
- e: React.ChangeEvent<HTMLInputElement>,
555
- ) => {
556
- setFastaIndexFile(e.target.files?.item(0) ?? null)
557
- }}
558
- disabled={
559
- (submitted && !errorMessage) || sequenceIsEditable
560
- }
561
- />
562
- </TableCell>
563
-
564
- <TableRow />
565
- <TableCell style={{ borderBottomWidth: 0 }}>
566
- FASTA binary index (.gzi)
567
- </TableCell>
568
- <TableCell style={{ borderBottomWidth: 0 }}>
569
- <input
570
- data-testid="gzi-input-file"
571
- type="file"
572
- onChange={(
573
- e: React.ChangeEvent<HTMLInputElement>,
574
- ) => {
575
- setFastaGziIndexFile(
576
- e.target.files?.item(0) ?? null,
577
- )
578
- }}
579
- disabled={
580
- (submitted && !errorMessage) || sequenceIsEditable
581
- }
582
- />
583
- </TableCell>
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
- <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
-
624
- <TableRow />
625
- <TableCell style={{ borderBottomWidth: 0 }}>
626
- FASTA index (.fai)
627
- </TableCell>
628
- <TableCell style={{ borderBottomWidth: 0 }}>
629
- <TextField
630
- data-testid="fai-input-url"
631
- variant="outlined"
632
- value={fastaIndexUrl}
633
- error={!validFastaIndexUrl}
634
- onChange={(
635
- e: React.ChangeEvent<HTMLInputElement>,
636
- ) => {
637
- setFastaIndexUrl(e.target.value)
638
- }}
639
- disabled={submitted && !errorMessage}
640
- slotProps={{
641
- input: {
642
- startAdornment: (
643
- <InputAdornment position="start">
644
- <LinkIcon />
645
- </InputAdornment>
646
- ),
647
- },
648
- }}
649
- />
650
- </TableCell>
651
-
652
- <TableRow />
653
- <TableCell style={{ borderBottomWidth: 0 }}>
654
- FASTA binary index (.gzi)
655
- </TableCell>
656
- <TableCell style={{ borderBottomWidth: 0 }}>
657
- <TextField
658
- data-testid="gzi-input-url"
659
- variant="outlined"
660
- value={fastaGziIndexUrl}
661
- error={!validFastaGziIndexUrl}
662
- onChange={(
663
- e: React.ChangeEvent<HTMLInputElement>,
664
- ) => {
665
- setFastaGziIndexUrl(e.target.value)
666
- }}
667
- disabled={submitted && !errorMessage}
668
- slotProps={{
669
- input: {
670
- startAdornment: (
671
- <InputAdornment position="start">
672
- <LinkIcon />
673
- </InputAdornment>
674
- ),
675
- },
676
- }}
677
- />
678
- </TableCell>
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