@apollo-annotation/jbrowse-plugin-apollo 0.3.6 → 0.3.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 +4603 -2045
- package/dist/index.esm.js.map +1 -1
- package/dist/jbrowse-plugin-apollo.cjs.development.js +4611 -2039
- 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 +9387 -4016
- 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 +15 -15
- package/src/ApolloInternetAccount/model.ts +48 -13
- package/src/BackendDrivers/CollaborationServerDriver.ts +23 -2
- package/src/ChangeManager.ts +42 -18
- package/src/FeatureDetailsWidget/ApolloTranscriptDetailsWidget.tsx +64 -5
- package/src/FeatureDetailsWidget/Attributes.tsx +8 -3
- package/src/FeatureDetailsWidget/TranscriptSequence.tsx +70 -81
- package/src/FeatureDetailsWidget/TranscriptWidgetEditLocation.tsx +946 -190
- package/src/FeatureDetailsWidget/TranscriptWidgetSummary.tsx +4 -0
- package/src/LinearApolloDisplay/components/LinearApolloDisplay.tsx +61 -73
- package/src/LinearApolloDisplay/glyphs/BoxGlyph.ts +55 -211
- package/src/LinearApolloDisplay/glyphs/GeneGlyph.ts +562 -108
- package/src/LinearApolloDisplay/glyphs/GenericChildGlyph.ts +78 -14
- package/src/LinearApolloDisplay/glyphs/Glyph.ts +15 -9
- package/src/LinearApolloDisplay/stateModel/base.ts +63 -43
- package/src/LinearApolloDisplay/stateModel/layouts.ts +3 -2
- package/src/LinearApolloDisplay/stateModel/mouseEvents.ts +79 -292
- package/src/LinearApolloDisplay/stateModel/rendering.ts +45 -344
- package/src/LinearApolloReferenceSequenceDisplay/components/LinearApolloReferenceSequenceDisplay.tsx +87 -0
- package/src/LinearApolloReferenceSequenceDisplay/components/index.ts +1 -0
- package/src/LinearApolloReferenceSequenceDisplay/configSchema.ts +7 -0
- package/src/LinearApolloReferenceSequenceDisplay/index.ts +3 -0
- package/src/LinearApolloReferenceSequenceDisplay/stateModel/base.ts +227 -0
- package/src/LinearApolloReferenceSequenceDisplay/stateModel/index.ts +25 -0
- package/src/LinearApolloReferenceSequenceDisplay/stateModel/rendering.ts +481 -0
- package/src/LinearApolloSixFrameDisplay/components/LinearApolloSixFrameDisplay.tsx +102 -40
- package/src/LinearApolloSixFrameDisplay/components/TrackLines.tsx +12 -20
- package/src/LinearApolloSixFrameDisplay/glyphs/GeneGlyph.ts +382 -243
- package/src/LinearApolloSixFrameDisplay/glyphs/Glyph.ts +12 -8
- package/src/LinearApolloSixFrameDisplay/stateModel/base.ts +83 -4
- package/src/LinearApolloSixFrameDisplay/stateModel/layouts.ts +23 -11
- package/src/LinearApolloSixFrameDisplay/stateModel/mouseEvents.ts +118 -123
- package/src/LinearApolloSixFrameDisplay/stateModel/rendering.ts +53 -63
- package/src/OntologyManager/index.ts +4 -1
- package/src/TabularEditor/HybridGrid/Feature.tsx +20 -14
- package/src/TabularEditor/HybridGrid/HybridGrid.tsx +7 -5
- package/src/TabularEditor/HybridGrid/featureContextMenuItems.ts +108 -16
- package/src/components/AddAssembly.tsx +1 -1
- package/src/components/AddAssemblyAliases.tsx +114 -0
- package/src/components/AddChildFeature.tsx +7 -7
- package/src/components/AddFeature.tsx +20 -15
- package/src/components/AddRefSeqAliases.tsx +9 -9
- package/src/components/CopyFeature.tsx +4 -4
- package/src/components/CreateApolloAnnotation.tsx +335 -151
- package/src/components/DeleteAssembly.tsx +1 -1
- package/src/components/DeleteFeature.tsx +358 -11
- package/src/components/DownloadGFF3.tsx +20 -1
- package/src/components/EditZoomThresholdDialog.tsx +69 -0
- package/src/components/FilterFeatures.tsx +7 -7
- package/src/components/FilterTranscripts.tsx +86 -0
- package/src/components/ImportFeatures.tsx +1 -1
- package/src/components/ManageChecks.tsx +1 -1
- package/src/components/MergeExons.tsx +193 -0
- package/src/components/MergeTranscripts.tsx +182 -0
- package/src/components/OntologyTermMultiSelect.tsx +11 -11
- package/src/components/OpenLocalFile.tsx +11 -7
- package/src/components/SplitExon.tsx +134 -0
- package/src/components/ViewCheckResults.tsx +1 -1
- package/src/components/index.ts +4 -0
- package/src/config.ts +11 -0
- package/src/extensions/annotationFromJBrowseFeature.ts +2 -0
- package/src/extensions/annotationFromPileup.ts +99 -89
- package/src/index.ts +42 -105
- package/src/makeDisplayComponent.tsx +0 -1
- package/src/menus/index.ts +1 -0
- package/src/{ApolloInternetAccount/addMenuItems.ts → menus/topLevelMenu.ts} +60 -33
- package/src/menus/topLevelMenuAdmin.ts +154 -0
- package/src/session/session.ts +163 -104
- package/src/util/annotationFeatureUtils.ts +59 -0
- package/src/util/copyToClipboard.ts +21 -0
- package/src/util/displayUtils.ts +149 -0
- package/src/util/glyphUtils.ts +201 -0
- package/src/util/index.ts +2 -0
- package/src/util/mouseEventsUtils.ts +145 -0
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/unbound-method */
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
import { type AnnotationFeatureSnapshot } from '@apollo-annotation/mst'
|
|
5
5
|
import { AddFeatureChange } from '@apollo-annotation/shared'
|
|
6
|
-
import {
|
|
7
|
-
type AbstractSessionModel,
|
|
8
|
-
type Region,
|
|
9
|
-
} from '@jbrowse/core/util/types'
|
|
6
|
+
import { type Region } from '@jbrowse/core/util/types'
|
|
10
7
|
import InfoIcon from '@mui/icons-material/Info'
|
|
11
8
|
import {
|
|
12
9
|
Box,
|
|
@@ -96,7 +93,6 @@ export function AddFeature({
|
|
|
96
93
|
region,
|
|
97
94
|
session,
|
|
98
95
|
}: AddFeatureProps) {
|
|
99
|
-
const { notify } = session as unknown as AbstractSessionModel
|
|
100
96
|
const [end, setEnd] = useState(String(region.end))
|
|
101
97
|
const [start, setStart] = useState(String(region.start + 1))
|
|
102
98
|
const [type, setType] = useState<NewFeature>(NewFeature.GENE_AND_SUBFEATURES)
|
|
@@ -104,7 +100,7 @@ export function AddFeature({
|
|
|
104
100
|
const [strand, setStrand] = useState<1 | -1 | undefined>()
|
|
105
101
|
const [errorMessage, setErrorMessage] = useState('')
|
|
106
102
|
|
|
107
|
-
|
|
103
|
+
function onSubmit(event: React.FormEvent<HTMLFormElement>) {
|
|
108
104
|
event.preventDefault()
|
|
109
105
|
setErrorMessage('')
|
|
110
106
|
|
|
@@ -120,7 +116,9 @@ export function AddFeature({
|
|
|
120
116
|
}
|
|
121
117
|
|
|
122
118
|
if (!refSeqId) {
|
|
123
|
-
setErrorMessage(
|
|
119
|
+
setErrorMessage(
|
|
120
|
+
'Invalid refseq id. Make sure you have the Apollo annotation track open',
|
|
121
|
+
)
|
|
124
122
|
return
|
|
125
123
|
}
|
|
126
124
|
|
|
@@ -149,8 +147,9 @@ export function AddFeature({
|
|
|
149
147
|
children,
|
|
150
148
|
},
|
|
151
149
|
})
|
|
152
|
-
|
|
153
|
-
|
|
150
|
+
void changeManager.submit(change).then(() => {
|
|
151
|
+
session.apolloSetSelectedFeature(id)
|
|
152
|
+
})
|
|
154
153
|
handleClose()
|
|
155
154
|
return
|
|
156
155
|
}
|
|
@@ -167,8 +166,9 @@ export function AddFeature({
|
|
|
167
166
|
assembly: region.assemblyName,
|
|
168
167
|
addedFeature: mRNA,
|
|
169
168
|
})
|
|
170
|
-
|
|
171
|
-
|
|
169
|
+
void changeManager.submit(change).then(() => {
|
|
170
|
+
session.apolloSetSelectedFeature(mRNA._id)
|
|
171
|
+
})
|
|
172
172
|
handleClose()
|
|
173
173
|
return
|
|
174
174
|
}
|
|
@@ -191,8 +191,9 @@ export function AddFeature({
|
|
|
191
191
|
strand,
|
|
192
192
|
},
|
|
193
193
|
})
|
|
194
|
-
|
|
195
|
-
|
|
194
|
+
void changeManager.submit(change).then(() => {
|
|
195
|
+
session.apolloSetSelectedFeature(id)
|
|
196
|
+
})
|
|
196
197
|
handleClose()
|
|
197
198
|
return
|
|
198
199
|
}
|
|
@@ -231,7 +232,11 @@ export function AddFeature({
|
|
|
231
232
|
}
|
|
232
233
|
|
|
233
234
|
let submitDisabled: boolean = Boolean(error) || !(start && end && type)
|
|
234
|
-
if (
|
|
235
|
+
if (
|
|
236
|
+
(type === NewFeature.CUSTOM && !customType) ||
|
|
237
|
+
(!strand && type === NewFeature.GENE_AND_SUBFEATURES) ||
|
|
238
|
+
(!strand && type === NewFeature.TRANSCRIPT_AND_SUBFEATURES)
|
|
239
|
+
) {
|
|
235
240
|
submitDisabled = true
|
|
236
241
|
}
|
|
237
242
|
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
DialogContent,
|
|
11
11
|
DialogContentText,
|
|
12
12
|
FormControl,
|
|
13
|
-
|
|
13
|
+
Grid,
|
|
14
14
|
InputLabel,
|
|
15
15
|
MenuItem,
|
|
16
16
|
Select,
|
|
@@ -212,8 +212,8 @@ export function AddRefSeqAliases({
|
|
|
212
212
|
fullWidth
|
|
213
213
|
>
|
|
214
214
|
<DialogContent style={{ display: 'flex', flexDirection: 'column' }}>
|
|
215
|
-
<
|
|
216
|
-
<
|
|
215
|
+
<Grid container spacing={2}>
|
|
216
|
+
<Grid>
|
|
217
217
|
<FormControl disabled={enableSubmit && !errorMessage} fullWidth>
|
|
218
218
|
<InputLabel id="demo-simple-select-label">Assembly</InputLabel>
|
|
219
219
|
<Select
|
|
@@ -225,13 +225,13 @@ export function AddRefSeqAliases({
|
|
|
225
225
|
>
|
|
226
226
|
{assemblies.map((option) => (
|
|
227
227
|
<MenuItem key={option.name} value={option.name}>
|
|
228
|
-
{option.displayName
|
|
228
|
+
{option.displayName}
|
|
229
229
|
</MenuItem>
|
|
230
230
|
))}
|
|
231
231
|
</Select>
|
|
232
232
|
</FormControl>
|
|
233
|
-
</
|
|
234
|
-
<
|
|
233
|
+
</Grid>
|
|
234
|
+
<Grid>
|
|
235
235
|
<InputLabel>Load RefName alias</InputLabel>
|
|
236
236
|
<input
|
|
237
237
|
type="file"
|
|
@@ -239,8 +239,8 @@ export function AddRefSeqAliases({
|
|
|
239
239
|
ref={fileRef}
|
|
240
240
|
disabled={(enableSubmit && !errorMessage) || !selectedAssembly}
|
|
241
241
|
/>
|
|
242
|
-
</
|
|
243
|
-
</
|
|
242
|
+
</Grid>
|
|
243
|
+
</Grid>
|
|
244
244
|
{selectedAssembly && refNameAliasMap.size > 0 ? (
|
|
245
245
|
<div style={{ height: 200, width: '100%', marginTop: 20 }}>
|
|
246
246
|
<InputLabel>
|
|
@@ -256,7 +256,7 @@ export function AddRefSeqAliases({
|
|
|
256
256
|
}}
|
|
257
257
|
pageSizeOptions={[5, 10]}
|
|
258
258
|
onRowSelectionModelChange={(ids) => {
|
|
259
|
-
rowSelectionChange(ids as number[])
|
|
259
|
+
rowSelectionChange(ids as unknown as number[])
|
|
260
260
|
}}
|
|
261
261
|
processRowUpdate={processRowUpdate}
|
|
262
262
|
checkboxSelection
|
|
@@ -83,7 +83,7 @@ export function CopyFeature({
|
|
|
83
83
|
sourceAssemblyId,
|
|
84
84
|
sourceFeature,
|
|
85
85
|
}: CopyFeatureProps) {
|
|
86
|
-
const { assemblyManager
|
|
86
|
+
const { assemblyManager } = session as unknown as AbstractSessionModel
|
|
87
87
|
const assemblies = assemblyManager.assemblyList
|
|
88
88
|
|
|
89
89
|
const [selectedAssemblyId, setSelectedAssemblyId] = useState<
|
|
@@ -203,9 +203,9 @@ export function CopyFeature({
|
|
|
203
203
|
copyFeature: true,
|
|
204
204
|
allIds: featureIds,
|
|
205
205
|
})
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
206
|
+
void changeManager.submit(change).then(() => {
|
|
207
|
+
session.apolloSetSelectedFeature(newFeatureLine._id)
|
|
208
|
+
})
|
|
209
209
|
handleClose()
|
|
210
210
|
event.preventDefault()
|
|
211
211
|
}
|