@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
|
@@ -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
|
)}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { AddAssemblyAliasesChange } from '@apollo-annotation/shared'
|
|
2
|
+
import { Box, DialogContent, DialogContentText } from '@mui/material'
|
|
3
|
+
import { DataGrid, type GridColDef, type GridRowModel } from '@mui/x-data-grid'
|
|
4
|
+
import React from 'react'
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
type ApolloInternetAccount,
|
|
8
|
+
type CollaborationServerDriver,
|
|
9
|
+
} from '../BackendDrivers'
|
|
10
|
+
import { type ChangeManager } from '../ChangeManager'
|
|
11
|
+
import { type ApolloSessionModel } from '../session'
|
|
12
|
+
|
|
13
|
+
import { Dialog } from './Dialog'
|
|
14
|
+
|
|
15
|
+
interface AddAssemblyAliasProps {
|
|
16
|
+
session: ApolloSessionModel
|
|
17
|
+
handleClose: () => void
|
|
18
|
+
changeManager: ChangeManager
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const columns: GridColDef[] = [
|
|
22
|
+
{
|
|
23
|
+
field: 'name',
|
|
24
|
+
headerName: 'Assembly Name',
|
|
25
|
+
width: 150,
|
|
26
|
+
editable: false,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
field: 'aliases',
|
|
30
|
+
headerName: 'Aliases',
|
|
31
|
+
width: 300,
|
|
32
|
+
editable: true,
|
|
33
|
+
},
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
interface AssemblyAlias {
|
|
37
|
+
id: string
|
|
38
|
+
name: string
|
|
39
|
+
aliases: string
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function AddAssemblyAliases({
|
|
43
|
+
changeManager,
|
|
44
|
+
handleClose,
|
|
45
|
+
session,
|
|
46
|
+
}: AddAssemblyAliasProps) {
|
|
47
|
+
const { apolloDataStore } = session
|
|
48
|
+
const { collaborationServerDriver } = apolloDataStore as {
|
|
49
|
+
collaborationServerDriver: CollaborationServerDriver
|
|
50
|
+
getInternetAccount(
|
|
51
|
+
assemblyName?: string,
|
|
52
|
+
internetAccountId?: string,
|
|
53
|
+
): ApolloInternetAccount
|
|
54
|
+
}
|
|
55
|
+
const assemblies = collaborationServerDriver.getAssemblies()
|
|
56
|
+
|
|
57
|
+
const rows: AssemblyAlias[] = assemblies.map((assembly) => {
|
|
58
|
+
return {
|
|
59
|
+
id: assembly.name,
|
|
60
|
+
name: assembly.displayName ?? assembly.name,
|
|
61
|
+
aliases: assembly.aliases.join(', '),
|
|
62
|
+
} as AssemblyAlias
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
const [errorMessage, setErrorMessage] = React.useState('')
|
|
66
|
+
|
|
67
|
+
const processRowUpdate = (newRow: GridRowModel, _oldRow: GridRowModel) => {
|
|
68
|
+
const change = new AddAssemblyAliasesChange({
|
|
69
|
+
typeName: 'AddAssemblyAliasesChange',
|
|
70
|
+
assembly: newRow.id as string,
|
|
71
|
+
aliases: (newRow.aliases as string).split(','),
|
|
72
|
+
})
|
|
73
|
+
void changeManager.submit(change).catch(() => {
|
|
74
|
+
setErrorMessage('Error submitting change')
|
|
75
|
+
})
|
|
76
|
+
handleClose()
|
|
77
|
+
return newRow
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return (
|
|
81
|
+
<Dialog
|
|
82
|
+
open
|
|
83
|
+
title="Add assembly aliases"
|
|
84
|
+
handleClose={handleClose}
|
|
85
|
+
maxWidth={'sm'}
|
|
86
|
+
data-testid="add-assembly-alias"
|
|
87
|
+
fullWidth
|
|
88
|
+
>
|
|
89
|
+
<DialogContent style={{ display: 'flex', flexDirection: 'column' }}>
|
|
90
|
+
<Box sx={{ height: 400, width: '100%' }}>
|
|
91
|
+
<DataGrid
|
|
92
|
+
rows={rows}
|
|
93
|
+
columns={columns}
|
|
94
|
+
initialState={{
|
|
95
|
+
pagination: {
|
|
96
|
+
paginationModel: {
|
|
97
|
+
pageSize: 5,
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
}}
|
|
101
|
+
pageSizeOptions={[5]}
|
|
102
|
+
processRowUpdate={processRowUpdate}
|
|
103
|
+
disableRowSelectionOnClick
|
|
104
|
+
/>
|
|
105
|
+
</Box>
|
|
106
|
+
</DialogContent>
|
|
107
|
+
{errorMessage ? (
|
|
108
|
+
<DialogContent>
|
|
109
|
+
<DialogContentText color="error">{errorMessage}</DialogContentText>
|
|
110
|
+
</DialogContent>
|
|
111
|
+
) : null}
|
|
112
|
+
</Dialog>
|
|
113
|
+
)
|
|
114
|
+
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/unbound-method */
|
|
2
|
-
|
|
3
|
-
import { AnnotationFeature } from '@apollo-annotation/mst'
|
|
2
|
+
|
|
3
|
+
import { type AnnotationFeature } from '@apollo-annotation/mst'
|
|
4
4
|
import { AddFeatureChange } from '@apollo-annotation/shared'
|
|
5
|
-
import { AbstractSessionModel } from '@jbrowse/core/util'
|
|
6
5
|
import {
|
|
7
6
|
Button,
|
|
8
7
|
DialogActions,
|
|
@@ -13,11 +12,12 @@ import {
|
|
|
13
12
|
import ObjectID from 'bson-objectid'
|
|
14
13
|
import React, { useState } from 'react'
|
|
15
14
|
|
|
16
|
-
import { ChangeManager } from '../ChangeManager'
|
|
15
|
+
import { type ChangeManager } from '../ChangeManager'
|
|
17
16
|
import { isOntologyClass } from '../OntologyManager'
|
|
18
|
-
import OntologyStore from '../OntologyManager/OntologyStore'
|
|
17
|
+
import type OntologyStore from '../OntologyManager/OntologyStore'
|
|
19
18
|
import { fetchValidDescendantTerms } from '../OntologyManager/util'
|
|
20
|
-
import { ApolloSessionModel } from '../session'
|
|
19
|
+
import { type ApolloSessionModel } from '../session'
|
|
20
|
+
|
|
21
21
|
import { Dialog } from './Dialog'
|
|
22
22
|
import { OntologyTermAutocomplete } from './OntologyTermAutocomplete'
|
|
23
23
|
|
|
@@ -36,7 +36,6 @@ export function AddChildFeature({
|
|
|
36
36
|
sourceAssemblyId,
|
|
37
37
|
sourceFeature,
|
|
38
38
|
}: AddChildFeatureProps) {
|
|
39
|
-
const { notify } = session as unknown as AbstractSessionModel
|
|
40
39
|
const [end, setEnd] = useState(String(sourceFeature.max))
|
|
41
40
|
const [start, setStart] = useState(String(sourceFeature.min + 1))
|
|
42
41
|
const [type, setType] = useState('')
|
|
@@ -62,7 +61,7 @@ export function AddChildFeature({
|
|
|
62
61
|
return terms
|
|
63
62
|
}
|
|
64
63
|
|
|
65
|
-
|
|
64
|
+
function onSubmit(event: React.FormEvent<HTMLFormElement>) {
|
|
66
65
|
event.preventDefault()
|
|
67
66
|
setErrorMessage('')
|
|
68
67
|
const change = new AddFeatureChange({
|
|
@@ -78,8 +77,7 @@ export function AddChildFeature({
|
|
|
78
77
|
},
|
|
79
78
|
parentFeatureId: sourceFeature._id,
|
|
80
79
|
})
|
|
81
|
-
|
|
82
|
-
notify('Feature added successfully', 'success')
|
|
80
|
+
void changeManager.submit(change)
|
|
83
81
|
handleClose()
|
|
84
82
|
event.preventDefault()
|
|
85
83
|
}
|