@apollo-annotation/jbrowse-plugin-apollo 0.1.6 → 0.1.8
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 +206 -115
- package/dist/index.esm.js.map +1 -1
- package/dist/jbrowse-plugin-apollo.cjs.development.js +206 -115
- 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 +257 -117
- 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 +6 -6
- package/src/ApolloInternetAccount/addMenuItems.ts +2 -4
- package/src/ApolloInternetAccount/components/AuthTypeSelector.tsx +14 -6
- package/src/ApolloInternetAccount/model.ts +24 -16
- package/src/ApolloJobModel.ts +2 -0
- package/src/ApolloSequenceAdapter/ApolloSequenceAdapter.ts +4 -0
- package/src/ApolloSixFrameRenderer/ApolloSixFrameRenderer.tsx +1 -0
- package/src/ApolloSixFrameRenderer/components/ApolloRendering.tsx +16 -3
- package/src/ApolloTextSearchAdapter/ApolloTextSearchAdapter.ts +5 -0
- package/src/BackendDrivers/CollaborationServerDriver.ts +10 -4
- package/src/BackendDrivers/DesktopFileDriver.ts +1 -0
- package/src/BackendDrivers/InMemoryFileDriver.ts +1 -0
- package/src/ChangeManager.ts +3 -0
- package/src/FeatureDetailsWidget/Attributes.tsx +4 -1
- package/src/FeatureDetailsWidget/BasicInformation.tsx +4 -2
- package/src/FeatureDetailsWidget/NumberTextField.tsx +4 -1
- package/src/FeatureDetailsWidget/RelatedFeature.tsx +16 -3
- package/src/FeatureDetailsWidget/Sequence.tsx +1 -0
- package/src/FeatureDetailsWidget/StringTextField.tsx +4 -1
- package/src/FeatureDetailsWidget/model.ts +2 -0
- package/src/LinearApolloDisplay/components/LinearApolloDisplay.tsx +9 -2
- package/src/LinearApolloDisplay/glyphs/BoxGlyph.ts +2 -0
- package/src/LinearApolloDisplay/glyphs/CanonicalGeneGlyph.ts +9 -4
- package/src/LinearApolloDisplay/glyphs/GenericChildGlyph.ts +4 -1
- package/src/LinearApolloDisplay/glyphs/Glyph.ts +5 -1
- package/src/LinearApolloDisplay/glyphs/ImplicitExonGeneGlyph.ts +8 -2
- package/src/LinearApolloDisplay/stateModel/base.ts +7 -2
- package/src/LinearApolloDisplay/stateModel/getGlyph.ts +1 -0
- package/src/LinearApolloDisplay/stateModel/glyphs.ts +2 -0
- package/src/LinearApolloDisplay/stateModel/layouts.ts +3 -0
- package/src/LinearApolloDisplay/stateModel/mouseEvents.ts +3 -1
- package/src/LinearApolloDisplay/stateModel/rendering.ts +3 -2
- package/src/LinearApolloDisplay/types.ts +1 -1
- package/src/OntologyManager/OntologyStore/fulltext.ts +1 -0
- package/src/OntologyManager/OntologyStore/index.test.ts +3 -1
- package/src/OntologyManager/OntologyStore/index.ts +4 -5
- package/src/OntologyManager/OntologyStore/indexeddb-storage.ts +3 -2
- package/src/SixFrameFeatureDisplay/stateModel.ts +17 -5
- package/src/TabularEditor/HybridGrid/Feature.tsx +7 -2
- package/src/TabularEditor/HybridGrid/FeatureAttributes.tsx +1 -0
- package/src/TabularEditor/HybridGrid/HybridGrid.tsx +2 -2
- package/src/TabularEditor/HybridGrid/NumberCell.tsx +3 -1
- package/src/TabularEditor/HybridGrid/ToolBar.tsx +9 -2
- package/src/components/AddAssembly.tsx +16 -8
- package/src/components/AddChildFeature.tsx +9 -4
- package/src/components/AddFeature.tsx +11 -5
- package/src/components/CopyFeature.tsx +11 -6
- package/src/components/DeleteAssembly.tsx +7 -4
- package/src/components/DeleteFeature.tsx +4 -1
- package/src/components/Dialog.tsx +1 -0
- package/src/components/DownloadGFF3.tsx +7 -2
- package/src/components/ImportFeatures.tsx +9 -3
- package/src/components/ManageChecks.tsx +10 -4
- package/src/components/ManageUsers.tsx +13 -4
- package/src/components/ModifyFeatureAttribute.tsx +4 -1
- package/src/components/OntologyTermAutocomplete.tsx +7 -4
- package/src/components/OntologyTermMultiSelect.tsx +2 -2
- package/src/components/OpenLocalFile.tsx +6 -3
- package/src/components/ViewChangeLog.tsx +13 -4
- package/src/components/ViewCheckResults.tsx +8 -2
- package/src/extensions/annotationFromPileup.ts +7 -2
- package/src/index.ts +4 -0
- package/src/makeDisplayComponent.tsx +4 -4
- package/src/session/ClientDataStore.ts +5 -0
- package/src/session/session.ts +9 -17
- package/src/util/loadAssemblyIntoClient.ts +4 -3
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
|
1
3
|
import { AnnotationFeatureI } from '@apollo-annotation/apollo-mst'
|
|
2
4
|
import { ObservableMap, observable } from 'mobx'
|
|
3
5
|
import { types } from 'mobx-state-tree'
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
1
4
|
import { AnnotationFeatureI } from '@apollo-annotation/apollo-mst'
|
|
2
5
|
import { AnyConfigurationSchemaType } from '@jbrowse/core/configuration/configurationSchema'
|
|
3
6
|
import PluginManager from '@jbrowse/core/PluginManager'
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
1
3
|
import { AnnotationFeatureI } from '@apollo-annotation/apollo-mst'
|
|
2
4
|
import { AnyConfigurationSchemaType } from '@jbrowse/core/configuration/configurationSchema'
|
|
3
5
|
import PluginManager from '@jbrowse/core/PluginManager'
|
|
@@ -193,7 +195,7 @@ export function mouseEventsSeqHightlightModelFactory(
|
|
|
193
195
|
addDisposer(
|
|
194
196
|
self,
|
|
195
197
|
autorun(
|
|
196
|
-
|
|
198
|
+
() => {
|
|
197
199
|
if (!self.lgv.initialized || self.regionCannotBeRendered()) {
|
|
198
200
|
return
|
|
199
201
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
1
2
|
import { AnyConfigurationSchemaType } from '@jbrowse/core/configuration/configurationSchema'
|
|
2
3
|
import PluginManager from '@jbrowse/core/PluginManager'
|
|
3
4
|
import { defaultCodonTable, doesIntersect2, revcom } from '@jbrowse/core/util'
|
|
@@ -174,8 +175,8 @@ function codonColorCode(letter: string, rowColorCode: string, bpPerPx: number) {
|
|
|
174
175
|
'*': '#f44336',
|
|
175
176
|
}
|
|
176
177
|
|
|
177
|
-
if (colorMap[letter
|
|
178
|
-
return colorMap[letter
|
|
178
|
+
if (colorMap[letter.toUpperCase()] !== undefined) {
|
|
179
|
+
return colorMap[letter.toUpperCase()]
|
|
179
180
|
}
|
|
180
181
|
|
|
181
182
|
return bpPerPx <= 0.1 ? rowColorCode : 'lightgray'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type CanvasMouseEvent = React.MouseEvent<HTMLCanvasElement
|
|
1
|
+
export type CanvasMouseEvent = React.MouseEvent<HTMLCanvasElement>
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
1
3
|
import path from 'node:path'
|
|
2
4
|
|
|
3
5
|
import { beforeAll, describe, expect, it, jest } from '@jest/globals'
|
|
@@ -17,7 +19,7 @@ const prefixes = new Map([
|
|
|
17
19
|
// different "Object". This intercepts calls to "query" in this test and makes
|
|
18
20
|
// sure the main scope "Object" is used.
|
|
19
21
|
jest.mock('jsonpath', () => {
|
|
20
|
-
const original = jest.requireActual('jsonpath')
|
|
22
|
+
const original = jest.requireActual<typeof import('jsonpath')>('jsonpath')
|
|
21
23
|
return {
|
|
22
24
|
...original,
|
|
23
25
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-throw-literal */
|
|
2
|
+
/* eslint-disable unicorn/no-await-expression-member */
|
|
1
3
|
import {
|
|
2
4
|
BlobLocation,
|
|
3
5
|
LocalPathLocation,
|
|
@@ -193,7 +195,7 @@ export default class OntologyStore {
|
|
|
193
195
|
return myTx.objectStore('nodes').count()
|
|
194
196
|
}
|
|
195
197
|
|
|
196
|
-
private
|
|
198
|
+
private unique<ITEM extends { id: string }>(nodes: ITEM[]) {
|
|
197
199
|
const seen = new Map<string, boolean>()
|
|
198
200
|
const result: ITEM[] = []
|
|
199
201
|
for (const node of nodes) {
|
|
@@ -303,10 +305,7 @@ export default class OntologyStore {
|
|
|
303
305
|
await Promise.all(
|
|
304
306
|
[...queryIds].map(async (queryId) => {
|
|
305
307
|
const theseResults = (
|
|
306
|
-
|
|
307
|
-
.objectStore('edges')
|
|
308
|
-
.index(queryIndex)
|
|
309
|
-
.getAll(queryId)) as OntologyDBEdge[]
|
|
308
|
+
await myTx.objectStore('edges').index(queryIndex).getAll(queryId)
|
|
310
309
|
)
|
|
311
310
|
.filter((element) => filterEdge(element))
|
|
312
311
|
.map((edge) => edge[resultProp])
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
1
2
|
import { openLocation } from '@jbrowse/core/util/io'
|
|
2
3
|
import equal from 'fast-deep-equal/es6'
|
|
3
4
|
import { IDBPDatabase, IDBPTransaction, openDB } from 'idb/with-async-ittr'
|
|
@@ -174,7 +175,7 @@ export async function isDatabaseCurrent(this: OntologyStore, db: Database) {
|
|
|
174
175
|
}
|
|
175
176
|
// check that the index paths and prefixes are the same as our current ones
|
|
176
177
|
return (
|
|
177
|
-
equal(this.options.prefixes, meta.storeOptions
|
|
178
|
-
equal(this.options.textIndexing, meta.storeOptions
|
|
178
|
+
equal(this.options.prefixes, meta.storeOptions.prefixes) &&
|
|
179
|
+
equal(this.options.textIndexing, meta.storeOptions.textIndexing)
|
|
179
180
|
)
|
|
180
181
|
}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
|
6
|
+
/* eslint-disable @typescript-eslint/unbound-method */
|
|
1
7
|
import { AnnotationFeatureI } from '@apollo-annotation/apollo-mst'
|
|
2
8
|
import { ConfigurationReference } from '@jbrowse/core/configuration'
|
|
3
9
|
import { AnyConfigurationSchemaType } from '@jbrowse/core/configuration/configurationSchema'
|
|
@@ -141,7 +147,7 @@ export function stateModelFactory(
|
|
|
141
147
|
},
|
|
142
148
|
get changeManager() {
|
|
143
149
|
const session = getSession(self) as ApolloSession
|
|
144
|
-
return session.apolloDataStore
|
|
150
|
+
return session.apolloDataStore.changeManager
|
|
145
151
|
},
|
|
146
152
|
get sequence() {
|
|
147
153
|
const { regions } = self
|
|
@@ -348,7 +354,7 @@ export function stateModelFactory(
|
|
|
348
354
|
.actions((self) => ({
|
|
349
355
|
setSelectedFeature(feature?: AnnotationFeatureI) {
|
|
350
356
|
const session = getSession(self) as ApolloSession
|
|
351
|
-
|
|
357
|
+
session.apolloSetSelectedFeature(feature)
|
|
352
358
|
},
|
|
353
359
|
setApolloFeatureUnderMouse(feature?: AnnotationFeatureI) {
|
|
354
360
|
self.apolloFeatureUnderMouse = feature
|
|
@@ -388,19 +394,25 @@ export function stateModelFactory(
|
|
|
388
394
|
label: 'Show start codons',
|
|
389
395
|
type: 'checkbox',
|
|
390
396
|
checked: self.showStartCodons,
|
|
391
|
-
onClick: () =>
|
|
397
|
+
onClick: () => {
|
|
398
|
+
self.toggleShowStartCodons()
|
|
399
|
+
},
|
|
392
400
|
},
|
|
393
401
|
{
|
|
394
402
|
label: 'Show stop codons',
|
|
395
403
|
type: 'checkbox',
|
|
396
404
|
checked: self.showStopCodons,
|
|
397
|
-
onClick: () =>
|
|
405
|
+
onClick: () => {
|
|
406
|
+
self.toggleShowStopCodons()
|
|
407
|
+
},
|
|
398
408
|
},
|
|
399
409
|
{
|
|
400
410
|
label: 'Show intron lines',
|
|
401
411
|
type: 'checkbox',
|
|
402
412
|
checked: self.showIntronLines,
|
|
403
|
-
onClick: () =>
|
|
413
|
+
onClick: () => {
|
|
414
|
+
self.toggleShowIntronLines()
|
|
415
|
+
},
|
|
404
416
|
},
|
|
405
417
|
]
|
|
406
418
|
},
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/unbound-method */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
|
1
5
|
import { AnnotationFeatureI } from '@apollo-annotation/apollo-mst'
|
|
2
6
|
import { AbstractSessionModel } from '@jbrowse/core/util'
|
|
3
7
|
import { observer } from 'mobx-react'
|
|
@@ -127,8 +131,9 @@ export const Feature = observer(function Feature({
|
|
|
127
131
|
}
|
|
128
132
|
|
|
129
133
|
// pop up a snackbar in the session notifying user of an error
|
|
130
|
-
const notifyError = (e: Error) =>
|
|
131
|
-
(session as unknown as AbstractSessionModel).notify(e.message, 'error')
|
|
134
|
+
const notifyError = (e: Error) => {
|
|
135
|
+
;(session as unknown as AbstractSessionModel).notify(e.message, 'error')
|
|
136
|
+
}
|
|
132
137
|
|
|
133
138
|
return (
|
|
134
139
|
<>
|
|
@@ -48,9 +48,9 @@ const HybridGrid = observer(function HybridGrid({
|
|
|
48
48
|
useEffect(() => {
|
|
49
49
|
const scrollContainer = scrollContainerRef.current
|
|
50
50
|
if (scrollContainer && selectedFeature) {
|
|
51
|
-
const selectedRow = scrollContainer.querySelector(
|
|
51
|
+
const selectedRow = scrollContainer.querySelector<HTMLTableRowElement>(
|
|
52
52
|
`.${classes.selectedFeature}`,
|
|
53
|
-
)
|
|
53
|
+
)
|
|
54
54
|
if (selectedRow) {
|
|
55
55
|
const currScroll = scrollContainer.scrollTop
|
|
56
56
|
const newScrollTop = selectedRow.offsetTop - 25
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/unbound-method */
|
|
1
2
|
import ClearIcon from '@mui/icons-material/Clear'
|
|
2
3
|
import UnfoldLessIcon from '@mui/icons-material/UnfoldLess'
|
|
3
4
|
import { IconButton, InputAdornment, TextField, Tooltip } from '@mui/material'
|
|
@@ -43,11 +44,17 @@ export const ToolBar = observer(function ToolBar({
|
|
|
43
44
|
value={model.filterText}
|
|
44
45
|
sx={{ marginTop: 0 }}
|
|
45
46
|
variant="outlined"
|
|
46
|
-
onChange={(event) =>
|
|
47
|
+
onChange={(event) => {
|
|
48
|
+
model.setFilterText(event.target.value)
|
|
49
|
+
}}
|
|
47
50
|
InputProps={{
|
|
48
51
|
endAdornment: (
|
|
49
52
|
<InputAdornment position="end">
|
|
50
|
-
<IconButton
|
|
53
|
+
<IconButton
|
|
54
|
+
onClick={() => {
|
|
55
|
+
model.clearFilterText()
|
|
56
|
+
}}
|
|
57
|
+
>
|
|
51
58
|
<ClearIcon />
|
|
52
59
|
</IconButton>
|
|
53
60
|
</InputAdornment>
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unsafe-enum-comparison */
|
|
2
|
+
/* eslint-disable @typescript-eslint/unbound-method */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
6
|
+
/* eslint-disable @typescript-eslint/no-misused-promises */
|
|
1
7
|
import {
|
|
2
8
|
AddAssemblyAndFeaturesFromFileChange,
|
|
3
9
|
AddAssemblyFromExternalChange,
|
|
@@ -78,7 +84,7 @@ export function AddAssembly({
|
|
|
78
84
|
const [fastaGziIndexFile, setFastaGziIndexFile] = useState('')
|
|
79
85
|
const [loading, setLoading] = useState(false)
|
|
80
86
|
|
|
81
|
-
function handleChangeInternetAccount(e: SelectChangeEvent
|
|
87
|
+
function handleChangeInternetAccount(e: SelectChangeEvent) {
|
|
82
88
|
setSubmitted(false)
|
|
83
89
|
const newlySelectedInternetAccount = apolloInternetAccounts.find(
|
|
84
90
|
(ia) => ia.internetAccountId === e.target.value,
|
|
@@ -350,9 +356,9 @@ export function AddAssembly({
|
|
|
350
356
|
fullWidth
|
|
351
357
|
variant="outlined"
|
|
352
358
|
error={!validFastaFile}
|
|
353
|
-
onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
|
|
359
|
+
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
|
354
360
|
setFastaFile(e.target.value)
|
|
355
|
-
}
|
|
361
|
+
}}
|
|
356
362
|
disabled={submitted && !errorMessage}
|
|
357
363
|
InputProps={{
|
|
358
364
|
startAdornment: (
|
|
@@ -371,9 +377,9 @@ export function AddAssembly({
|
|
|
371
377
|
fullWidth
|
|
372
378
|
variant="outlined"
|
|
373
379
|
error={!validFastaIndexFile}
|
|
374
|
-
onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
|
|
380
|
+
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
|
375
381
|
setFastaIndexFile(e.target.value)
|
|
376
|
-
}
|
|
382
|
+
}}
|
|
377
383
|
disabled={submitted && !errorMessage}
|
|
378
384
|
InputProps={{
|
|
379
385
|
startAdornment: (
|
|
@@ -392,9 +398,9 @@ export function AddAssembly({
|
|
|
392
398
|
fullWidth
|
|
393
399
|
variant="outlined"
|
|
394
400
|
error={Boolean(fastaGziIndexFile) && !validFastaGziIndexFile}
|
|
395
|
-
onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
|
|
401
|
+
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
|
396
402
|
setFastaGziIndexFile(e.target.value)
|
|
397
|
-
}
|
|
403
|
+
}}
|
|
398
404
|
disabled={submitted && !errorMessage}
|
|
399
405
|
InputProps={{
|
|
400
406
|
startAdornment: (
|
|
@@ -417,7 +423,9 @@ export function AddAssembly({
|
|
|
417
423
|
control={
|
|
418
424
|
<Checkbox
|
|
419
425
|
checked={fileType === FileType.GFF3 && importFeatures}
|
|
420
|
-
onChange={() =>
|
|
426
|
+
onChange={() => {
|
|
427
|
+
setImportFeatures(!importFeatures)
|
|
428
|
+
}}
|
|
421
429
|
disabled={
|
|
422
430
|
fileType !== FileType.GFF3 ||
|
|
423
431
|
(submitted && !errorMessage)
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-misused-promises */
|
|
1
2
|
import { AnnotationFeatureI } from '@apollo-annotation/apollo-mst'
|
|
2
3
|
import { AddFeatureChange } from '@apollo-annotation/apollo-shared'
|
|
3
4
|
import { AbstractSessionModel } from '@jbrowse/core/util'
|
|
@@ -96,7 +97,7 @@ export function AddChildFeature({
|
|
|
96
97
|
},
|
|
97
98
|
parentFeatureId: sourceFeature._id,
|
|
98
99
|
})
|
|
99
|
-
await changeManager.submit
|
|
100
|
+
await changeManager.submit(change)
|
|
100
101
|
notify('Feature added successfully', 'success')
|
|
101
102
|
handleClose()
|
|
102
103
|
event.preventDefault()
|
|
@@ -111,7 +112,7 @@ export function AddChildFeature({
|
|
|
111
112
|
setShowPhase(false)
|
|
112
113
|
}
|
|
113
114
|
}
|
|
114
|
-
|
|
115
|
+
function handleChangePhase(e: SelectChangeEvent) {
|
|
115
116
|
setErrorMessage('')
|
|
116
117
|
setPhase(e.target.value)
|
|
117
118
|
|
|
@@ -153,7 +154,9 @@ export function AddChildFeature({
|
|
|
153
154
|
fullWidth
|
|
154
155
|
variant="outlined"
|
|
155
156
|
value={start}
|
|
156
|
-
onChange={(e) =>
|
|
157
|
+
onChange={(e) => {
|
|
158
|
+
setStart(e.target.value)
|
|
159
|
+
}}
|
|
157
160
|
/>
|
|
158
161
|
<TextField
|
|
159
162
|
margin="dense"
|
|
@@ -163,7 +166,9 @@ export function AddChildFeature({
|
|
|
163
166
|
fullWidth
|
|
164
167
|
variant="outlined"
|
|
165
168
|
value={end}
|
|
166
|
-
onChange={(e) =>
|
|
169
|
+
onChange={(e) => {
|
|
170
|
+
setEnd(e.target.value)
|
|
171
|
+
}}
|
|
167
172
|
error={error}
|
|
168
173
|
helperText={error ? '"End" must be greater than "Start"' : null}
|
|
169
174
|
/>
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-misused-promises */
|
|
1
3
|
import { AddFeatureChange } from '@apollo-annotation/apollo-shared'
|
|
2
4
|
import { AbstractSessionModel, Region } from '@jbrowse/core/util/types'
|
|
3
5
|
import {
|
|
@@ -90,7 +92,7 @@ export function AddFeature({
|
|
|
90
92
|
strand,
|
|
91
93
|
},
|
|
92
94
|
})
|
|
93
|
-
await changeManager.submit
|
|
95
|
+
await changeManager.submit(change)
|
|
94
96
|
notify('Feature added successfully', 'success')
|
|
95
97
|
handleClose()
|
|
96
98
|
event.preventDefault()
|
|
@@ -107,7 +109,7 @@ export function AddFeature({
|
|
|
107
109
|
}
|
|
108
110
|
}
|
|
109
111
|
|
|
110
|
-
function handleChangeStrand(e: SelectChangeEvent
|
|
112
|
+
function handleChangeStrand(e: SelectChangeEvent) {
|
|
111
113
|
setErrorMessage('')
|
|
112
114
|
|
|
113
115
|
switch (Number(e.target.value)) {
|
|
@@ -126,7 +128,7 @@ export function AddFeature({
|
|
|
126
128
|
}
|
|
127
129
|
}
|
|
128
130
|
|
|
129
|
-
|
|
131
|
+
function handleChangePhase(e: SelectChangeEvent) {
|
|
130
132
|
setErrorMessage('')
|
|
131
133
|
setPhase(e.target.value)
|
|
132
134
|
|
|
@@ -170,7 +172,9 @@ export function AddFeature({
|
|
|
170
172
|
fullWidth
|
|
171
173
|
variant="outlined"
|
|
172
174
|
value={Number(start)}
|
|
173
|
-
onChange={(e) =>
|
|
175
|
+
onChange={(e) => {
|
|
176
|
+
setStart(e.target.value)
|
|
177
|
+
}}
|
|
174
178
|
/>
|
|
175
179
|
<TextField
|
|
176
180
|
margin="dense"
|
|
@@ -180,7 +184,9 @@ export function AddFeature({
|
|
|
180
184
|
fullWidth
|
|
181
185
|
variant="outlined"
|
|
182
186
|
value={end}
|
|
183
|
-
onChange={(e) =>
|
|
187
|
+
onChange={(e) => {
|
|
188
|
+
setEnd(e.target.value)
|
|
189
|
+
}}
|
|
184
190
|
error={error}
|
|
185
191
|
helperText={error ? '"End" must be greater than "Start"' : null}
|
|
186
192
|
/>
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-misused-promises */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
1
4
|
import {
|
|
2
5
|
AnnotationFeatureI,
|
|
3
6
|
AnnotationFeatureSnapshot,
|
|
@@ -88,7 +91,7 @@ export function CopyFeature({
|
|
|
88
91
|
const [start, setStart] = useState(sourceFeature.start)
|
|
89
92
|
const [errorMessage, setErrorMessage] = useState('')
|
|
90
93
|
|
|
91
|
-
|
|
94
|
+
function handleChangeAssembly(e: SelectChangeEvent) {
|
|
92
95
|
setSelectedAssemblyId(e.target.value)
|
|
93
96
|
}
|
|
94
97
|
|
|
@@ -113,11 +116,13 @@ export function CopyFeature({
|
|
|
113
116
|
setRefNames(newRefNames)
|
|
114
117
|
setSelectedRefSeqId(newRefNames[0]?._id || '')
|
|
115
118
|
}
|
|
116
|
-
getRefNames().catch((error) =>
|
|
119
|
+
getRefNames().catch((error) => {
|
|
120
|
+
setErrorMessage(String(error))
|
|
121
|
+
})
|
|
117
122
|
}, [selectedAssemblyId, assemblyManager])
|
|
118
123
|
|
|
119
|
-
|
|
120
|
-
const refSeq = e.target.value
|
|
124
|
+
function handleChangeRefSeq(e: SelectChangeEvent) {
|
|
125
|
+
const refSeq = e.target.value
|
|
121
126
|
setSelectedRefSeqId(refSeq)
|
|
122
127
|
}
|
|
123
128
|
|
|
@@ -133,7 +138,7 @@ export function CopyFeature({
|
|
|
133
138
|
setErrorMessage(`Assembly not found: ${selectedAssemblyId}.`)
|
|
134
139
|
return
|
|
135
140
|
}
|
|
136
|
-
const canonicalRefName = assembly
|
|
141
|
+
const canonicalRefName = assembly.getCanonicalRefName(selectedRefSeqId)
|
|
137
142
|
const region = assembly.regions?.find((r) => r.refName === canonicalRefName)
|
|
138
143
|
if (!region) {
|
|
139
144
|
setErrorMessage(`RefSeq not found: ${selectedRefSeqId}.`)
|
|
@@ -208,7 +213,7 @@ export function CopyFeature({
|
|
|
208
213
|
copyFeature: true,
|
|
209
214
|
allIds: featureIds,
|
|
210
215
|
})
|
|
211
|
-
await changeManager.submit
|
|
216
|
+
await changeManager.submit(change)
|
|
212
217
|
|
|
213
218
|
notify('Feature copied successfully', 'success')
|
|
214
219
|
handleClose()
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-misused-promises */
|
|
1
2
|
import { DeleteAssemblyChange } from '@apollo-annotation/apollo-shared'
|
|
2
3
|
import { Assembly } from '@jbrowse/core/assemblyManager/assembly'
|
|
3
4
|
import {
|
|
@@ -67,7 +68,7 @@ export function DeleteAssembly({
|
|
|
67
68
|
}
|
|
68
69
|
}, [assemblies, selectedAssembly])
|
|
69
70
|
|
|
70
|
-
function handleChangeInternetAccount(e: SelectChangeEvent
|
|
71
|
+
function handleChangeInternetAccount(e: SelectChangeEvent) {
|
|
71
72
|
setSubmitted(false)
|
|
72
73
|
const newlySelectedInternetAccount = apolloInternetAccounts.find(
|
|
73
74
|
(ia) => ia.internetAccountId === e.target.value,
|
|
@@ -80,7 +81,7 @@ export function DeleteAssembly({
|
|
|
80
81
|
setSelectedInternetAccount(newlySelectedInternetAccount)
|
|
81
82
|
}
|
|
82
83
|
|
|
83
|
-
function handleChangeAssembly(e: SelectChangeEvent
|
|
84
|
+
function handleChangeAssembly(e: SelectChangeEvent) {
|
|
84
85
|
const newAssembly = assemblies.find((asm) => asm.name === e.target.value)
|
|
85
86
|
setSelectedAssembly(newAssembly)
|
|
86
87
|
}
|
|
@@ -97,7 +98,7 @@ export function DeleteAssembly({
|
|
|
97
98
|
typeName: 'DeleteAssemblyChange',
|
|
98
99
|
assembly: selectedAssembly.name,
|
|
99
100
|
})
|
|
100
|
-
await changeManager.submit
|
|
101
|
+
await changeManager.submit(change, {
|
|
101
102
|
internetAccountId: selectedInternetAccount.internetAccountId,
|
|
102
103
|
})
|
|
103
104
|
handleClose()
|
|
@@ -154,7 +155,9 @@ export function DeleteAssembly({
|
|
|
154
155
|
control={
|
|
155
156
|
<Checkbox
|
|
156
157
|
checked={confirmDelete}
|
|
157
|
-
onChange={() =>
|
|
158
|
+
onChange={() => {
|
|
159
|
+
setconfirmDelete(!confirmDelete)
|
|
160
|
+
}}
|
|
158
161
|
/>
|
|
159
162
|
}
|
|
160
163
|
label="I understand that all assembly data will be deleted"
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-misused-promises */
|
|
1
4
|
import { AnnotationFeatureI } from '@apollo-annotation/apollo-mst'
|
|
2
5
|
import { DeleteFeatureChange } from '@apollo-annotation/apollo-shared'
|
|
3
6
|
import { AbstractSessionModel } from '@jbrowse/core/util'
|
|
@@ -51,7 +54,7 @@ export function DeleteFeature({
|
|
|
51
54
|
deletedFeature: getSnapshot(sourceFeature),
|
|
52
55
|
parentFeatureId: sourceFeature.parent?._id,
|
|
53
56
|
})
|
|
54
|
-
await changeManager.submit
|
|
57
|
+
await changeManager.submit(change)
|
|
55
58
|
notify('Feature deleted successfully', 'success')
|
|
56
59
|
handleClose()
|
|
57
60
|
event.preventDefault()
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/unbound-method */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-misused-promises */
|
|
1
6
|
import { ApolloAssembly } from '@apollo-annotation/apollo-mst'
|
|
2
7
|
import { makeGFF3Feature } from '@apollo-annotation/apollo-shared'
|
|
3
8
|
import gff, { GFF3Item } from '@gmod/gff'
|
|
@@ -48,7 +53,7 @@ export function DownloadGFF3({ handleClose, session }: DownloadGFF3Props) {
|
|
|
48
53
|
...inMemoryFileDriver.getAssemblies(),
|
|
49
54
|
]
|
|
50
55
|
|
|
51
|
-
function handleChangeAssembly(e: SelectChangeEvent
|
|
56
|
+
function handleChangeAssembly(e: SelectChangeEvent) {
|
|
52
57
|
const newAssembly = assemblies.find((asm) => asm.name === e.target.value)
|
|
53
58
|
setSelectedAssembly(newAssembly)
|
|
54
59
|
}
|
|
@@ -143,7 +148,7 @@ export function DownloadGFF3({ handleClose, session }: DownloadGFF3Props) {
|
|
|
143
148
|
})
|
|
144
149
|
}
|
|
145
150
|
for (const [, refSeq] of refSeqs) {
|
|
146
|
-
const features = refSeq
|
|
151
|
+
const { features } = refSeq
|
|
147
152
|
if (!features) {
|
|
148
153
|
continue
|
|
149
154
|
}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/unbound-method */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
6
|
+
/* eslint-disable @typescript-eslint/no-misused-promises */
|
|
1
7
|
import { AddFeaturesFromFileChange } from '@apollo-annotation/apollo-shared'
|
|
2
8
|
import { Assembly } from '@jbrowse/core/assemblyManager/assembly'
|
|
3
9
|
import { getConf } from '@jbrowse/core/configuration'
|
|
@@ -55,7 +61,7 @@ export function ImportFeatures({
|
|
|
55
61
|
}
|
|
56
62
|
const assemblies = collaborationServerDriver.getAssemblies()
|
|
57
63
|
|
|
58
|
-
function handleChangeAssembly(e: SelectChangeEvent
|
|
64
|
+
function handleChangeAssembly(e: SelectChangeEvent) {
|
|
59
65
|
const newAssembly = assemblies.find((asm) => asm.name === e.target.value)
|
|
60
66
|
setSelectedAssembly(newAssembly)
|
|
61
67
|
setSubmitted(false)
|
|
@@ -90,7 +96,7 @@ export function ImportFeatures({
|
|
|
90
96
|
assemblyId: selectedAssembly.name,
|
|
91
97
|
})
|
|
92
98
|
uri.search = searchParams.toString()
|
|
93
|
-
const fetch = apolloInternetAccount
|
|
99
|
+
const fetch = apolloInternetAccount.getFetcher({
|
|
94
100
|
locationType: 'UriLocation',
|
|
95
101
|
uri: uri.toString(),
|
|
96
102
|
})
|
|
@@ -157,7 +163,7 @@ export function ImportFeatures({
|
|
|
157
163
|
formData.append('file', file)
|
|
158
164
|
formData.append('fileName', file.name)
|
|
159
165
|
formData.append('type', 'text/x-gff3')
|
|
160
|
-
const apolloFetchFile = apolloInternetAccount
|
|
166
|
+
const apolloFetchFile = apolloInternetAccount.getFetcher({
|
|
161
167
|
locationType: 'UriLocation',
|
|
162
168
|
uri: url,
|
|
163
169
|
})
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/unbound-method */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-misused-promises */
|
|
1
3
|
import { Assembly } from '@jbrowse/core/assemblyManager/assembly'
|
|
2
4
|
import { AbstractSessionModel } from '@jbrowse/core/util'
|
|
3
5
|
import {
|
|
@@ -90,7 +92,9 @@ export function ManageChecks({ handleClose, session }: ManageChecksProps) {
|
|
|
90
92
|
const data = (await response.json()) as CheckDocument[]
|
|
91
93
|
setChecks(data)
|
|
92
94
|
}
|
|
93
|
-
getChecks().catch((error) =>
|
|
95
|
+
getChecks().catch((error) => {
|
|
96
|
+
setErrorMessage(String(error))
|
|
97
|
+
})
|
|
94
98
|
}, [selectedInternetAccount])
|
|
95
99
|
|
|
96
100
|
useEffect(() => {
|
|
@@ -119,10 +123,12 @@ export function ManageChecks({ handleClose, session }: ManageChecksProps) {
|
|
|
119
123
|
const assembly = (await response.json()) as AssemblyDocument
|
|
120
124
|
setSelectedChecks(assembly.checks)
|
|
121
125
|
}
|
|
122
|
-
getChecks().catch((error) =>
|
|
126
|
+
getChecks().catch((error) => {
|
|
127
|
+
setErrorMessage(String(error))
|
|
128
|
+
})
|
|
123
129
|
}, [selectedAssembly, selectedInternetAccount])
|
|
124
130
|
|
|
125
|
-
function handleChangeAssembly(e: SelectChangeEvent
|
|
131
|
+
function handleChangeAssembly(e: SelectChangeEvent) {
|
|
126
132
|
const newAssembly = assemblies.find((asm) => asm.name === e.target.value)
|
|
127
133
|
setSelectedAssembly(newAssembly)
|
|
128
134
|
}
|
|
@@ -182,7 +188,7 @@ export function ManageChecks({ handleClose, session }: ManageChecksProps) {
|
|
|
182
188
|
}
|
|
183
189
|
}
|
|
184
190
|
|
|
185
|
-
function handleChangeInternetAccount(e: SelectChangeEvent
|
|
191
|
+
function handleChangeInternetAccount(e: SelectChangeEvent) {
|
|
186
192
|
setSubmitted(false)
|
|
187
193
|
const newlySelectedInternetAccount = apolloInternetAccounts.find(
|
|
188
194
|
(ia) => ia.internetAccountId === e.target.value,
|